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

hibernate - How to load global settings frequently used in application in Java -

objective c - Ownership modifiers with manual reference counting -

python 3.x - Mapping specific letters onto a list of words -