Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-01-23 : 07:59:27
|
Donovan Sobrero writes "Hello i have been looking to be able to do a "Dos batch script in sql" for some time but i'm not really big in sql. my goal is to restore 3 database.Livedata_Dosrun.BAKLiveData_CustDB1.BAKLiveData_Sys.BAKfrom a directory called "d:\stream\livedata\data"it would also be great if i could have the SQL data to be stored on drive "D:\SQLDATA" IE:D:\SQLDATA\Livedata_Dosrun.mdfD:\SQLDATA\Livedata_Dosrun_Log.ldfD:\SQLDATA\LiveData_CustDB1.mdfD:\SQLDATA\LiveData_CustDB1_Log.ldfD:\SQLDATA\LiveData_Sys.mdfD:\SQLDATA\LiveData_Sys_log.ldfAnd have the "SA" account assigned ownership. Is this possible? and if so could i get a copy of the .cmd file please it would be really help me out a LOT!!Please reply to me atDonovan@networkmechanics.net" |
|
Kristen
Test
22859 Posts |
Posted - 2006-01-23 : 12:08:10
|
You can run standard SQL commands from "DOS prompt / batch file" by using OSQL.EXE, which comes with SQL Server Client Utilities.That will enable you to write a standard RESTORE command which should do the job.But I don't have the time to write it all for you ...Kristen |
 |
|
|
|
|