Showing posts with label snapshot. Show all posts
Showing posts with label snapshot. Show all posts

Sunday, March 11, 2012

automatic backup / restore to another db

we have a "snapshot" database used for development testing we it constantly
(wly only) synced with the development database (on same server) I wanted
to set up a schedule that will backup the database called development every
sunday morning, then restore that onto the "devsnapshot" database right
after that sucessfully completed... is there any easy way to do this in sql
server 2005? if so how? i dont want mirrored data (aka realtime change
tracking) but i want to have the DML and data all copied so its a 1:1 copy..
thanksIn your job that performs the backups why not just add one more job step.
It woudl contain something like this:
IF (SELECT DATENAME ( wday ,getdate() )) = 'Sunday'
BEGIN
RESTORE DATABASE...
--send email
--...anything else?
END
Keith Kratochvil
"Smokey Grindle" <nospamhere@.dontspam.net> wrote in message
news:ukwlBCniGHA.2220@.TK2MSFTNGP05.phx.gbl...
> we have a "snapshot" database used for development testing we it
> constantly (wly only) synced with the development database (on same
> server) I wanted to set up a schedule that will backup the database called
> development every sunday morning, then restore that onto the
> "devsnapshot" database right after that sucessfully completed... is there
> any easy way to do this in sql server 2005? if so how? i dont want
> mirrored data (aka realtime change tracking) but i want to have the DML
> and data all copied so its a 1:1 copy.. thanks
>|||thanks! thats just what I did
"Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
news:OKeTrIniGHA.2456@.TK2MSFTNGP04.phx.gbl...
> In your job that performs the backups why not just add one more job step.
> It woudl contain something like this:
> IF (SELECT DATENAME ( wday ,getdate() )) = 'Sunday'
> BEGIN
> RESTORE DATABASE...
> --send email
> --...anything else?
> END
>
> --
> Keith Kratochvil
>
> "Smokey Grindle" <nospamhere@.dontspam.net> wrote in message
> news:ukwlBCniGHA.2220@.TK2MSFTNGP05.phx.gbl...
>

Thursday, March 8, 2012

Automated Generation of Snapshots

I have a database which contains more than a hundred publications and the clients need a snapshot for each one. Is there a way of automating this process of creating a snapshot? Like a job or something.

Does the snapshot not exist already? Or do you want to re-initialize all of them?

Can you describe more about your scenario? When do you want the snapshots created...

http://msdn2.microsoft.com/en-us/library/ms174958.aspx

Gary

Wednesday, March 7, 2012

Automate inclusion of new tables?

I'm running snapshot replication, and there will often be new tables (and
other objects) added to the publisher that I'd like to automatically include
in the subscription. Any ideas on how to do this? I've thought about creating
a script that lists all the tables, etc., in a publisher, and then including
each of those in the subscription, but I have no idea if/how it would work.
Any help would be appreciated. Thanks!
You could use sp_addarticle and sp_addsubscription for each new table.
Finding the new tables depends on how you have this set up. If it is all the
tables, you could find tables from information_schema.tables which are not
in sysarticles, and use a cursor to iterate through and run the stored procs
ablve.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)