Onega

a lot of VC++ posts, a few C# posts, and some miscellaneous stuff

Monday, January 17, 2005

restore database with osql.exe

osql.exe needs absolute path to the backup file.
osql -S "cn-040320" -U "sa" -P "sa" -Q "USE master RESTORE DATABASE [2005test] FROM DISK ='C:\Program Files\Microsoft SQL Server\80\Tools\Binn\2000RT_bk.mdf'"

0 Comments:

Post a Comment

<< Home