Rod:
 
I wouldn't be shutting down SQL, I would simply detach and re-attach the databases.
 
Take a look at the docs for the SmSqkBi command line for SMSQL.
 
Glenn (the other one)


From: owner-toasters@mathworks.com [mailto:owner-toasters@mathworks.com] On Behalf Of Rod Newcomb
Sent: Tuesday, February 06, 2007 10:18 AM
To: toasters@mathworks.com
Subject: Script to automate Dev System from Production.

I am looking for some help.

 

We have two MS SQL servers.  One is running in production, and we are snapmirroring the data over to an offsite location.

 

Since Snapmirrors are read only, we would like to use Flexclone to create a writeable copy of this LUN for our off-site SQL server to use.

 

We also have SnapDrive and Snap Managager/SQL software available to us.

 

The trick is that I would like to automate the following process:

 

Snapmirror to our offsite location (done using SMSQL)

Shut down SQL at our offsite location. (No Problem)

Disconnect the LUN (Using SDCLI ?)

Create a new flexclone from our Snapmirrored copy.  (Lun Create ?)

Reconnect to the new Flexclone LUN (????)

Start up SQL Services. (No problem)

 

I would like this process to run automatically every 24 hours.

 

Does anyone have any scripts or suggestions on how I can do this?

 

Rod Newcomb