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
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
Hey Rod,
On 2/6/07, Rod Newcomb rodn@dice.com wrote:
Snapmirror to our offsite location (done using SMSQL)
Shut down SQL at our offsite location. (No Problem)
This isn't really needed anymore, you can also attach without shutting, as meantioned earlier
Disconnect the LUN (Using SDCLI ?)
Create a new flexclone from our Snapmirrored copy. (Lun Create ?)
Have a look at the 'lun clone' command!
Reconnect to the new Flexclone LUN (????)
Use either sdcli or SMSQL for that. Probably SMSQL (SmSqkBi) is most suited
Start up SQL Services. (No problem)
Which is offcourse only needed if you stopped them to begin with ;)
I would like this process to run automatically every 24 hours.
You can run it from a script (NT Scheduler) on your active DB server to fire off SMSQL with SnapMirror, then use rsh for the lun clone / lun split commands and remotely mount the lun using SDCLI (maybe the last part can also be done with SMSQL, havent tried)
Hope this helps you on your way!
/Nils