Tuesday, March 20, 2012

Copying of database

I tried to write a batch script which copies a database by making full
backup, then copying the backup file to another location and restoring it.
The backup schedule of the my database is this:
full backup on sunday at 23 h stored in file1
differential backup every day except sunday at 23h stored in file2
Now i'm not sure what will happen with my differential scheduled backups
when i delete the temporary backup file that is made only for copying during
the w. It's stored in another file (let's call it file3). I see that SQL
Server remembers every full backup, is there a way to tell it not to write
to backup history tables?
I'm thinking of another ways of copying database. One is to detach the
database or to stop the server but i think it's not good. Another way is DTS
package. Can you tell me if it can do the trick? Is there another way?
Thank you in advance
Georgi PeshterskiWays of copying a database:
1. Certainly backup and restore is an option, but not the first I would take
.
2. Detach, copy and attach also works, but it is kludgy.
3. Snapshot replication works well if you desire a snapshot to copy at any
one time (ie, the update is the entire database and instant update of data i
s
not important).
4. Transaction replication works well if you need real time updates
5. DTS works, as well, but can end up with unnecessary locking on the
original database while you are migrating. You have some control over this,
of course, but it gets more advanced.
I would aim for replication or DTS long before using a backup/restore or
detach/copy/attach scenario.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"George Peshterski" wrote:

> I tried to write a batch script which copies a database by making full
> backup, then copying the backup file to another location and restoring it.
> The backup schedule of the my database is this:
> full backup on sunday at 23 h stored in file1
> differential backup every day except sunday at 23h stored in file2
> Now i'm not sure what will happen with my differential scheduled backup
s
> when i delete the temporary backup file that is made only for copying duri
ng
> the w. It's stored in another file (let's call it file3). I see that SQ
L
> Server remembers every full backup, is there a way to tell it not to write
> to backup history tables?
> I'm thinking of another ways of copying database. One is to detach the
> database or to stop the server but i think it's not good. Another way is D
TS
> package. Can you tell me if it can do the trick? Is there another way?
> Thank you in advance
> Georgi Peshterski
>
>|||Thank you, i'm working to do it with DTS
"Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld@.comcast.netNoSpamM> wrote
in message news:F34C25E5-AD13-4255-B1E0-38CBD3481C5F@.microsoft.com...
> Ways of copying a database:
> 1. Certainly backup and restore is an option, but not the first I would
take.
> 2. Detach, copy and attach also works, but it is kludgy.
> 3. Snapshot replication works well if you desire a snapshot to copy at any
> one time (ie, the update is the entire database and instant update of data
is
> not important).
> 4. Transaction replication works well if you need real time updates
> 5. DTS works, as well, but can end up with unnecessary locking on the
> original database while you are migrating. You have some control over
this,
> of course, but it gets more advanced.
> I would aim for replication or DTS long before using a backup/restore or
> detach/copy/attach scenario.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> ***************************
> Think Outside the Box!
> ***************************
> "George Peshterski" wrote:
>
full
it.
backups
during
SQL
write
the
DTS

No comments:

Post a Comment