|
Posted by Erland Sommarskog on 09/25/07 22:09
Piero 'Giops' Giorgi (giorgi.piero@gmail.com) writes:
> Not anymore... :-)
>
> Is this right? (Files will go in the F:\Main_CrimDB path)
>
> Start with
>
> ALTER DATABASE CrimDB SET OFFLINE
>
> Then move the CrimDB.mdf and CrimDB_log.ldf files to F:\Main_CrimDB
> and F:\Main_CrimDB\Log directories
>
> And then
>
> ALTER DATABASE CrimDB MODIFY FILE ( NAME = CrimDB, FILENAME = 'F:
> \Main_CrimDB\' )
> ALTER DATABASE CrimDB MODIFY FILE ( NAME = CrimDB_Log, FILENAME = 'F:
> \Main_CrimDB\Log' )
>
> ALTER DATABASE CrimDB SET ONLINE
>
> And after that, the script to show the result
>
> SELECT name, physical_name AS CurrentLocation, state_desc
> FROM sys.master_files
> WHERE database_id = DB_ID(N'CrimDB');
>
>
> ... right?
If it's says so in Books Online, I guess it's OK. I haven't this
very often myself.
If you are uncertain of the procedures, create a toy database first
and play with that one.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|