|
Posted by Piero 'Giops' Giorgi on 09/25/07 21:34
On Sep 25, 1:50 pm, Erland Sommarskog <esq...@sommarskog.se> wrote:
> In the copy of Books Online I have it suggests ALTER DATABASE SET OFFLINE.
> Does it really say sp_detach_db in yours?
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?
P
[Back to original message]
|