var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Creating DB using command line
I was given a task of coming up with the script to recreate an existing database using a command line. I would use this script in case when the server is down and I can't get to Query Analyzer or EM to recreate it. I am not sure where to start. Any ideas are greatly appreciated.
If the server is down, how would you be able to create a database? Other than that, look up the OSQL utility.
I'm assuming they have another server with sql server installed...
And you should have sql server client tools installed on your desktop so you can connect to any server...no need to log on to a particular box
And how do you want o create a "new" database?
I'm assuming from a backup...is the backup copied to another box?
If not, then when the server is down, you are sol
It is a clustered SQL Server, so dev will stand for prod. Yes, the backup is being copied to a drive on a dev box.
OK, so create a *.sql file that does the restore and either create a bat file, or type this in the command line
osql /U <login> /P <password>/i <filename>.sql