Move SQL Server file and the Master database file -


how can move sql server database .mdf , .ldf log files, alongside usernames , passwords? because copy pasting master.mdf causing service not start.

you should use alter database modify file

an example be:

use master; go alter database test set offline; go -- copy files new destination alter database test      modify file ( name = test_log,                    filename = 'c:\temp\test_ldf.ldf'); alter database test      modify file ( name = test,                    filename = 'c:\temp\test.mdf');  go  alter database test set online; go 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -