SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Copy/Refresh a database in the night


Copy/Refresh a database in the night

Author
Message
Repriser-991084
Repriser-991084
SSC-Enthusiastic
SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)

Group: General Forum Members
Points: 160 Visits: 469
Comments posted to this topic are about the item Copy/Refresh a database in the night
mpilchard@gmail.com
mpilchard@gmail.com
SSC Rookie
SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)

Group: General Forum Members
Points: 32 Visits: 565
Exactly what I was looking for, so thank you for posting the article. (http://www.sqlservercentral.com/scripts/backup+restore+log+shipping/68673/)

Quick question - Is it common for most DBAs to have different passwords for accounts in the development or test environments?
Madhu R
Madhu R
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 43
hi,

Thanks for your script.

Is that this script is works on single machine? Where can I pass the parameter if the DB's are sitting in differnt physical servers?

And one more thing to confirm, the script is doing backup the whole db from source system and restore into destignation system?
jswong05
jswong05
SSC Veteran
SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)

Group: General Forum Members
Points: 247 Visits: 476
This is based on one serve host. If you want to run this script between server A and server B (and your backup files could be on either one or network somewhere) You have to use linkserver and UNC path to specify A and B. If you spend several minutes, you could figure it out.

Madhu, This is a teaching script. Modify refactor for your own needs (publish back to us after). If you have a custom need, I will be happy to construct a contract business deal with you. At that point, we can write for you anything you desire.

Jason
http://dbace.us
:-P
Steve Jones
Steve Jones
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: Administrators
Points: 65153 Visits: 19118
I have never had the same passwords in production as test/dev

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
GRussell31
GRussell31
SSC-Enthusiastic
SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)

Group: General Forum Members
Points: 184 Visits: 156
We have a slightly more complicated scenario...

Our production database is backed up up using a 3rd party system which does not appear in the msdb tables, on top of that the log files are backed up every 15 minutes.

Is it possible to use this approach (but introducing a SQL backup to the steps) to backup and restore the database without the backup truncating the logs?

The database is unfortunately SQL 2000 but running in SQL 7 compatibility mode.

Thanks...
Lawrence M. Meklemburg
Lawrence M. Meklemburg
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1027 Visits: 156
Really liked the concept, but I ran into one issue. The object backupmediafamily.physical_device_name is nvarchar(260) so I changed @filename to nvarchar(260).

Thanks for the clear and concise article(s).

Larry
jswong05
jswong05
SSC Veteran
SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)

Group: General Forum Members
Points: 247 Visits: 476
GRussell31 (7/16/2010)
We have a slightly more complicated scenario...

Our production database is backed up up using a 3rd party system which does not appear in the msdb tables, on top of that the log files are backed up every 15 minutes.

Is it possible to use this approach (but introducing a SQL backup to the steps) to backup and restore the database without the backup truncating the logs?

The database is unfortunately SQL 2000 but running in SQL 7 compatibility mode.

Thanks...


Where do they store backup info? You just use the same concept and change code to accommodate the scenario. The script operates entirely on backup only. Nothing to do with [backup truncating the logs?]

Jason
http://dbace.us
:-P
GRussell31
GRussell31
SSC-Enthusiastic
SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)

Group: General Forum Members
Points: 184 Visits: 156
Hi jswong05,

My understanding is that when a backup is performed it will truncate the transaction logs (and I couldn't find a way to stop this), as trancating the logs will mean that the 3rd party system which backs them up every fifteen minutes would be missing some information.

Hope that helps explain things?

jswong05 (9/30/2010)
GRussell31 (7/16/2010)
We have a slightly more complicated scenario...

Our production database is backed up up using a 3rd party system which does not appear in the msdb tables, on top of that the log files are backed up every 15 minutes.

Is it possible to use this approach (but introducing a SQL backup to the steps) to backup and restore the database without the backup truncating the logs?

The database is unfortunately SQL 2000 but running in SQL 7 compatibility mode.

Thanks...


Where do they store backup info? You just use the same concept and change code to accommodate the scenario. The script operates entirely on backup only. Nothing to do with [backup truncating the logs?]

jswong05
jswong05
SSC Veteran
SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)

Group: General Forum Members
Points: 247 Visits: 476
GRussell31 (10/1/2010)
Hi jswong05,

My understanding is that when a backup is performed it will truncate the transaction logs (and I couldn't find a way to stop this), as trancating the logs will mean that the 3rd party system which backs them up every fifteen minutes would be missing some information.

Hope that helps explain things?



It does not stop you from using this script as long as your backup files can be worked with RESTORe command; if not, that is your pain of using 3rd party.

Jason
http://dbace.us
:-P
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search