Hello all,
I am very new to SQL server 2005, and have been tasked with scripting out a database restore into SQL server 2005. I am using a batch file which is executed on the SQL Server 2005 machine to copy the database backup from the remote machine (SQL server 2000 standard) to the local machine, and then would like to run an SQL query from the local machine (c:\software\queries\db_restore.sql). Can this be done using OSQL? And if so, does anyone know what the syntax would be?
Here's what I think it might be:
osql -U webmaster -P password -i c:\software\queries\db_restore.sql"
Thanks in advance,
Sheel Shah
I am very new to SQL server 2005, and have been tasked with scripting out a database restore into SQL server 2005. I am using a batch file which is executed on the SQL Server 2005 machine to copy the database backup from the remote machine (SQL server 2000 standard) to the local machine, and then would like to run an SQL query from the local machine (c:\software\queries\db_restore.sql). Can this be done using OSQL? And if so, does anyone know what the syntax would be?
Here's what I think it might be:
osql -U webmaster -P password -i c:\software\queries\db_restore.sql"
Thanks in advance,
Sheel Shah