all groups > sql server replication > december 2003 >
You're in the

sql server replication

group:

Need Help/Advice with Snapshot Backup API


Need Help/Advice with Snapshot Backup API quake_dude NO[at]SPAM hotmail.com
12/28/2003 3:59:43 PM
sql server replication:
Hello All,

Please excuse this message if it is a little simplistic, but I'm very
new to the concept of using the Snapshot API and SQL Snapshots in
general.

I'm after some information or advice regarding the API which is used
to pause/resume the SQL Server for the purpose of carrying out a
Snapshot backup. I'm currently working on a hardware platform which is
capable of carrying out snapshot backups (SAN) and would like to
develop an application which can pause/resume the server using the API
commands provided in the SQL backup SDK.

Is this something that I need to develop, or is this functionality
already provided by some part of SQL which I haven't yet discovered?
I've been hunting around the web and the newsgroups, and have been
left a little confused as to whether this is something that I need to
develop at all, as my impression is that this can be automated
possibly in some other way without having to code an app to do it.

Any help would be greatly appreciated!

Regards,

Re: Need Help/Advice with Snapshot Backup API Allan Mitchell
12/29/2003 9:08:58 AM
Which SAN are you using ? We use EMC and we use Business Continuity
Volumes. For this to be effective EMC has to Freeze then Thaw the SQL Server
IO. It does this through it's own software.

Can you elaborate on what you are doing and how it relates to Replication ?

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



[quoted text, click to view]

Re: Need Help/Advice with Snapshot Backup API quake_dude NO[at]SPAM hotmail.com
12/30/2003 3:00:43 PM
Hi Allan,

Firstly, thanks for the reply.

We're running a Hitachi San, I'm not sure of the actual model, as its
all in place and running, and I've just started in this particular
role. My manager has basically said that the san supports Snapshot
backups, and that he wants me to develop an app which will "Freeze and
Thaw" the transactions to the server so we can perform a snapshot.
From my understanding, they've developed all the other scripts needed
to do the work, the only component missing is something to issue a
pause and resume to the SQL server. I know Hitachi sell a package
which does all this, but its rather expensive, and they've already got
90% of the functionality in place (just missing this bit), hence my
need to develop this component. Hopefully this all makes sense.

We run a backup server, with an additional server in a Disaster
recovery site, so my understanding is that this app is all they
require to finish off their solution.

Again, I've come into this one after its all been set up, so my focus
is whether this application is going to be a feasable option or not!

Thanks Kindly,

Emil.


[quoted text, click to view]
Re: Need Help/Advice with Snapshot Backup API Allan Mitchell
1/4/2004 11:02:18 AM
You are going to have to somehow PAUSE SQL Server.

You can use NET PAUSE <<service name>>

I have never done this and am unsure of the implications. Applications will
not be able to connect to SQL Server during this period so you will need to
make sure it is an "Off" period.
After the snapshot has been taken you can issue NET CONTINUE <<service
name>>

Our SAN server snapshots take ~3secs for 450GB

This may be the way EMC do it as well. Some applications have spiralled out
of control when the thaw didn't happen as expected but that was remedied
easily.

I would suggest you will need a lot of testing.

If you can guarantee the time this is done will be devoid of activity then
you can easily STOP SQL Server and then issue a RESTART. This will cause
transactions and applications to be exited gracefully with reliable error
messages that mean something.
--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


[quoted text, click to view]

Re: Need Help/Advice with Snapshot Backup API quake_dude NO[at]SPAM hotmail.com
1/4/2004 4:22:17 PM
Hi Allan,

Microsoft has a "Microsoft SQL Server Virutal backup Device
Specification" SDK which details how you can create a virtual snapshot
device in memory, which provides the fastest snapshot method.. As part
of the SDK, they ship some API calls which have the potential to
"freeze" and "thaw" the transaction process, without interrupting the
running process whatsoever. How this works internally within SQL I'm
not sure, but my understanding was that this API could be used to
issue the Freeze and Thaw commands. I guess what I'm hoping to be able
to do is to write a small application which can do this. the sample
code they supply with the SDK doesn't specifically show the freeze and
thaw process, as it seems to be part of the Snapshot flow.. The only
example I've seen of someone being able to do this is the Hitachi
quicksnap.exe application, which they charge like wounded bulls for.
I'm guessing that no one outside of them has done anything similar -
there certainly seems to be a lack of information on the web about the
specifics of the API calls, from what I can see.

Thanks!

Regards,

Emil.



[quoted text, click to view]
Re: Need Help/Advice with Snapshot Backup API Allan Mitchell
1/5/2004 10:04:43 AM
Ahhh good. I learnt something new today. Perhaps EMC also use this API.
Let me see if I can't find an example.

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



[quoted text, click to view]

Re: Need Help/Advice with Snapshot Backup API quake_dude NO[at]SPAM hotmail.com
1/6/2004 4:17:07 PM
Hi Allan,

yes, I most certainly have. Unfortunately I'm not a C++ coder, so the
samples are tantalisingly close to what I need, but I can't quite
understand how the freeze and unfreeze components are called! If I can
capture the api components that need to be called, I've basically got
my solution.

Kindest Regards,

Emil.



[quoted text, click to view]
Re: Need Help/Advice with Snapshot Backup API Allan Mitchell
1/6/2004 6:04:45 PM
Have you looked at this page

http://www.microsoft.com/sql/downloads/virtualbackup.asp

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


[quoted text, click to view]

Re: Need Help/Advice with Snapshot Backup API Allan Mitchell
1/7/2004 8:11:51 AM
I am neither a C++ coder. I am assured though that this is what you want.

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


[quoted text, click to view]

AddThis Social Bookmark Button