UNSOLVED

praful2

updated

18 years ago

P

praful2

2 Posts

0

1012

February 19th, 2009 12:00

SNAPVIEW Clone script for SQL server database on Windows 2003 server

We would to automate SNAPVIEW clone process for SQL server database on Windows 2003 server. We would like to automate synchronization, verification that sync is complete, fracture clone, mount and use clone on second host for reporting. repeat this process 4 times a day using the script. We are using Naviseccli commands manually for this process but No script. Does anybody have script to run on Windows 2003 server? Thank you.
  • RRR

    6 Operator

    •

    5739 Posts

    212

    0

    Posted April 20th, 2009 04:00

    Kick up.
    I'm sorry I don't have examples for you, but perhaps this kicking up will trigger people to help you out.
  • praful2

    2 Posts

    212

    0

    Posted June 11th, 2009 12:00

    After some trial & errors, inhouse developed script resolved this problem.
  • depreze

    2 Posts

    212

    0

    Posted September 4th, 2009 13:00

    Will you share your script?
    We have to do something similar but on an ad hoc basis.
  • hersh1

    197 Posts

    212

    0

    Posted September 8th, 2009 11:00

    I can't seem to find any of my clone scripts, i guess i never completed them. I did find a very simple snapshot script that might be helpful (had to recreate some it because I made some changes specific to another task).

    Just need to pass the variables to the script (ie file.vbs VAR1 VAR2 VAR3 VAR4).

    Dim lun, snapshot, session, storage_group
    Set args = WScript.Arguments

    If WScript.Arguments.Count < 4 then
    WScript.Echo "Not enough Arguments Supplied"
    Wscript.Echo "ALU# - Snapshot - Session - Storagegroup"
    Wscript.Quit
    Else

    lun = args.Item(0) 'ALU for Lun being snapped
    snapshot = args.Item(1) 'Snapshot name
    session = args.Item(2) 'Session name
    storage_group = args.Item(3) 'Storage group name
    End if


    objshell.Run "%comspec% /c naviseccli -h IP_ADDRESS snapview -createsnapshot " & lun & " -snapshotname " & snapshot,,True
    objshell.Run "%comspec% /c naviseccli -h IP_ADDRESS snapview -startsession " & session & " -snapshotname " & snapshot,,True
    objshell.Run "%comspec% /c naviseccli -h IP_ADDRESS storagegroup -addsnapshot -gname " & storage_group & " -snapshotname " & snapshot,,True
    objshell.Run "%comspec% /c naviseccli -h IP_ADDRESS snapview -activatesnapshot " & session & " -snapshotname " & snapshot,,True

    Wscript.Quit(1)