Showing posts with label current. Show all posts
Showing posts with label current. Show all posts

Thursday, March 8, 2012

Backup and zip the Transaction log file

Once the procedure is executed the database transaction log would be backed up and zipped with a blank text file which has the
the current date DD/MM/yyyy as the text file name

exec ('exec master..xp_cmdshell ''dtsrun /SItchy /Usa /PF!gl@.59b#fl@.#f!uxr /N'+@.defaultCSVFeed_DTS+''' ')
exec ('exec master..xp_cmdshell ''E:\Inetpub\wwwroot\BIASS\wzzip.exe E:\Inetpub\wwwroot\'+@.SiteFolder+'\Admin\BIA_DataF eed\'+@.FileName+'.zip E:\Inetpub\wwwroot\'+@.SiteFolder+'\Admin\BIA_DataF eed\'+@.FileName+'.'+@.defaultCSVFeed_FileType+''' ')

Pls let me know how can i zip the backup file with a blank text file with the date as the file name of the blank text file...hey... its URGENT.... pls can anybody help me on this...... :(

Backup and zip the Transaction log file

Once the procedure is executed the database transaction log would be backed up and zipped with a blank text file which has the
the current date DD/MM/yyyy as the text file name

exec ('exec master..xp_cmdshell ''dtsrun /SItchy /Usa /PF!gl@.59b#fl@.#f!uxr /N'+@.defaultCSVFeed_DTS+''' ')
exec ('exec master..xp_cmdshell ''E:\Inetpub\wwwroot\BIASS\wzzip.exe E:\Inetpub\wwwroot\'+@.SiteFolder+'\Admin\BIA_DataF eed\'+@.FileName+'.zip E:\Inetpub\wwwroot\'+@.SiteFolder+'\Admin\BIA_DataF eed\'+@.FileName+'.'+@.defaultCSVFeed_FileType+''' ')

Pls let me know how can i zip the backup file with a blank text file with the date as the file name of the blank text file...As you have posted a question in the articles section it is being moved to SQL Server Forum.

MODERATOR.

Saturday, February 25, 2012

Backup and Restore best practices

I have recently been asked to produce a document recommending backup and
restore best practices in a new company.
They current use a very large backup script in a stored procedure (with
parameters) which is used across all servers that automates things to a large
degree. Whilst I can see the advantages of this I can see more bad than good.
This script is obviously scheduled within a job, this has many steps of
other operations.
Does anyone have any good references for the best backup procedures/ setup
that will help me come to some kind of decision?
e.g. For instance setup of the jobs/ setps, storage locations of files,
frequency, types (e.g. Full, Diff, Tran), Recovery models, usage of
sqlBackupDevices (or not), alerting etc etc.
I have many many books that I can look at, so I'm not looking for
information on how to do stuff, only Best Practice (or Functional)
recommendations
Thanks in advance.
Best Regards,
Mark Broadbent
Mark
http://vyaskn.tripod.com/sql_server_...ices.htm#Step1
--administaiting best practices
"Mark Broadbent" <nospam@.nospam.com> wrote in message
news:2FEF6FE9-DA88-41C4-B640-C42AB1733FA2@.microsoft.com...
>I have recently been asked to produce a document recommending backup and
> restore best practices in a new company.
> They current use a very large backup script in a stored procedure (with
> parameters) which is used across all servers that automates things to a
> large
> degree. Whilst I can see the advantages of this I can see more bad than
> good.
> This script is obviously scheduled within a job, this has many steps of
> other operations.
> Does anyone have any good references for the best backup procedures/ setup
> that will help me come to some kind of decision?
> e.g. For instance setup of the jobs/ setps, storage locations of files,
> frequency, types (e.g. Full, Diff, Tran), Recovery models, usage of
> sqlBackupDevices (or not), alerting etc etc.
> I have many many books that I can look at, so I'm not looking for
> information on how to do stuff, only Best Practice (or Functional)
> recommendations
> Thanks in advance.
> --
> Best Regards,
> Mark Broadbent
|||Had already found this URI, but am hoping for more detailed information (or
Microsoft recommend docs/ links).
Thanks anyway for your input.
Best Regards,
Mark Broadbent
"Uri Dimant" wrote:

> Mark
> http://vyaskn.tripod.com/sql_server_...ices.htm#Step1
> --administaiting best practices
>
>
>
> "Mark Broadbent" <nospam@.nospam.com> wrote in message
> news:2FEF6FE9-DA88-41C4-B640-C42AB1733FA2@.microsoft.com...
>
>
|||The Operations Guide has some information as well. Not just
the backup and restore section but the Administrative tasks
and other areas in the section on Systems Administration:
http://www.microsoft.com/technet/pro...n/sqlops4.mspx
-Sue
On Wed, 27 Sep 2006 07:33:02 -0700, Mark Broadbent
<nospam@.nospam.com> wrote:

>Had already found this URI, but am hoping for more detailed information (or
>Microsoft recommend docs/ links).
>Thanks anyway for your input.

Backup and Restore best practices

I have recently been asked to produce a document recommending backup and
restore best practices in a new company.
They current use a very large backup script in a stored procedure (with
parameters) which is used across all servers that automates things to a large
degree. Whilst I can see the advantages of this I can see more bad than good.
This script is obviously scheduled within a job, this has many steps of
other operations.
Does anyone have any good references for the best backup procedures/ setup
that will help me come to some kind of decision?
e.g. For instance setup of the jobs/ setps, storage locations of files,
frequency, types (e.g. Full, Diff, Tran), Recovery models, usage of
sqlBackupDevices (or not), alerting etc etc.
I have many many books that I can look at, so I'm not looking for
information on how to do stuff, only Best Practice (or Functional)
recommendations
Thanks in advance.
--
Best Regards,
Mark BroadbentMark
http://vyaskn.tripod.com/sql_server_administration_best_practices.htm#Step1
--administaiting best practices
"Mark Broadbent" <nospam@.nospam.com> wrote in message
news:2FEF6FE9-DA88-41C4-B640-C42AB1733FA2@.microsoft.com...
>I have recently been asked to produce a document recommending backup and
> restore best practices in a new company.
> They current use a very large backup script in a stored procedure (with
> parameters) which is used across all servers that automates things to a
> large
> degree. Whilst I can see the advantages of this I can see more bad than
> good.
> This script is obviously scheduled within a job, this has many steps of
> other operations.
> Does anyone have any good references for the best backup procedures/ setup
> that will help me come to some kind of decision?
> e.g. For instance setup of the jobs/ setps, storage locations of files,
> frequency, types (e.g. Full, Diff, Tran), Recovery models, usage of
> sqlBackupDevices (or not), alerting etc etc.
> I have many many books that I can look at, so I'm not looking for
> information on how to do stuff, only Best Practice (or Functional)
> recommendations
> Thanks in advance.
> --
> Best Regards,
> Mark Broadbent|||Had already found this URI, but am hoping for more detailed information (or
Microsoft recommend docs/ links).
Thanks anyway for your input.
--
Best Regards,
Mark Broadbent
"Uri Dimant" wrote:
> Mark
> http://vyaskn.tripod.com/sql_server_administration_best_practices.htm#Step1
> --administaiting best practices
>
>
>
> "Mark Broadbent" <nospam@.nospam.com> wrote in message
> news:2FEF6FE9-DA88-41C4-B640-C42AB1733FA2@.microsoft.com...
> >I have recently been asked to produce a document recommending backup and
> > restore best practices in a new company.
> >
> > They current use a very large backup script in a stored procedure (with
> > parameters) which is used across all servers that automates things to a
> > large
> > degree. Whilst I can see the advantages of this I can see more bad than
> > good.
> > This script is obviously scheduled within a job, this has many steps of
> > other operations.
> >
> > Does anyone have any good references for the best backup procedures/ setup
> > that will help me come to some kind of decision?
> >
> > e.g. For instance setup of the jobs/ setps, storage locations of files,
> > frequency, types (e.g. Full, Diff, Tran), Recovery models, usage of
> > sqlBackupDevices (or not), alerting etc etc.
> >
> > I have many many books that I can look at, so I'm not looking for
> > information on how to do stuff, only Best Practice (or Functional)
> > recommendations
> >
> > Thanks in advance.
> > --
> > Best Regards,
> >
> > Mark Broadbent
>
>|||The Operations Guide has some information as well. Not just
the backup and restore section but the Administrative tasks
and other areas in the section on Systems Administration:
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlops4.mspx
-Sue
On Wed, 27 Sep 2006 07:33:02 -0700, Mark Broadbent
<nospam@.nospam.com> wrote:
>Had already found this URI, but am hoping for more detailed information (or
>Microsoft recommend docs/ links).
>Thanks anyway for your input.

Backup and Restore best practices

I have recently been asked to produce a document recommending backup and
restore best practices in a new company.
They current use a very large backup script in a stored procedure (with
parameters) which is used across all servers that automates things to a larg
e
degree. Whilst I can see the advantages of this I can see more bad than good
.
This script is obviously scheduled within a job, this has many steps of
other operations.
Does anyone have any good references for the best backup procedures/ setup
that will help me come to some kind of decision?
e.g. For instance setup of the jobs/ setps, storage locations of files,
frequency, types (e.g. Full, Diff, Tran), Recovery models, usage of
sqlBackupDevices (or not), alerting etc etc.
I have many many books that I can look at, so I'm not looking for
information on how to do stuff, only Best Practice (or Functional)
recommendations
Thanks in advance.
--
Best Regards,
Mark BroadbentMark
http://vyaskn.tripod.com/ sql_serve...r />
.htm#Step1
--administaiting best practices
"Mark Broadbent" <nospam@.nospam.com> wrote in message
news:2FEF6FE9-DA88-41C4-B640-C42AB1733FA2@.microsoft.com...
>I have recently been asked to produce a document recommending backup and
> restore best practices in a new company.
> They current use a very large backup script in a stored procedure (with
> parameters) which is used across all servers that automates things to a
> large
> degree. Whilst I can see the advantages of this I can see more bad than
> good.
> This script is obviously scheduled within a job, this has many steps of
> other operations.
> Does anyone have any good references for the best backup procedures/ setup
> that will help me come to some kind of decision?
> e.g. For instance setup of the jobs/ setps, storage locations of files,
> frequency, types (e.g. Full, Diff, Tran), Recovery models, usage of
> sqlBackupDevices (or not), alerting etc etc.
> I have many many books that I can look at, so I'm not looking for
> information on how to do stuff, only Best Practice (or Functional)
> recommendations
> Thanks in advance.
> --
> Best Regards,
> Mark Broadbent|||Had already found this URI, but am hoping for more detailed information (or
Microsoft recommend docs/ links).
Thanks anyway for your input.
--
Best Regards,
Mark Broadbent
"Uri Dimant" wrote:

> Mark
> [url]http://vyaskn.tripod.com/ sql_server_administration_best_practices
.htm#Step1[/url
]
> --administaiting best practices
>
>
>
> "Mark Broadbent" <nospam@.nospam.com> wrote in message
> news:2FEF6FE9-DA88-41C4-B640-C42AB1733FA2@.microsoft.com...
>
>|||The Operations Guide has some information as well. Not just
the backup and restore section but the Administrative tasks
and other areas in the section on Systems Administration:
http://www.microsoft.com/technet/pr...in/sqlops4.mspx
-Sue
On Wed, 27 Sep 2006 07:33:02 -0700, Mark Broadbent
<nospam@.nospam.com> wrote:

>Had already found this URI, but am hoping for more detailed information (or
>Microsoft recommend docs/ links).
>Thanks anyway for your input.

backup and restore

On a production server, I do a full backup monthly and then delete data
from the tables that is older than the current date. On a separate
non-production server I restored the initial full backup. My question
is how can I add/restore the subsequent backups to the non-production
server with out stepping on the data that was initially restored?
Thanks,
Daniel<danielsmith611@.gmail.com> wrote in message
news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> On a production server, I do a full backup monthly and then delete data
> from the tables that is older than the current date. On a separate
> non-production server I restored the initial full backup. My question
> is how can I add/restore the subsequent backups to the non-production
> server with out stepping on the data that was initially restored?
>
RESTORE WITH MOVE, followed perhaps by merging the data.
EG
BACKUP DATABASE AdventureWorks
TO AdventureWorksBackups ;
RESTORE DATABASE AdventureWorks_200608
FROM AdventureWorksBackups
WITH MOVE 'AdventureWorks_Data' TO
'C:\MySQLServer\AdventureWorks_200608.mdf',
MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
David|||Do you have an example of the merge?
David Browne wrote:
> <danielsmith611@.gmail.com> wrote in message
> news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
>
> RESTORE WITH MOVE, followed perhaps by merging the data.
>
> EG
> BACKUP DATABASE AdventureWorks
> TO AdventureWorksBackups ;
>
> RESTORE DATABASE AdventureWorks_200608
> FROM AdventureWorksBackups
> WITH MOVE 'AdventureWorks_Data' TO
> 'C:\MySQLServer\AdventureWorks_200608.mdf',
> MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf'
;
>
> David|||Or would log shipping work?
danielp wrote:[vbcol=seagreen]
> Do you have an example of the merge?
> David Browne wrote:|||"danielp" <danielsmith611@.gmail.com> wrote in message
news:1155158638.423828.3310@.h48g2000cwc.googlegroups.com...
> Or would log shipping work?
No. Your deletes would get shipped.
David|||"danielp" <danielsmith611@.gmail.com> wrote in message
news:1155149678.373420.184490@.i3g2000cwc.googlegroups.com...
> Do you have an example of the merge?
It's just SQL, or perhaps an SSIS package. What do the tables look like?
David

backup and restore

On a production server, I do a full backup monthly and then delete data
from the tables that is older than the current date. On a separate
non-production server I restored the initial full backup. My question
is how can I add/restore the subsequent backups to the non-production
server with out stepping on the data that was initially restored?
Thanks,
Daniel<danielsmith611@.gmail.com> wrote in message
news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> On a production server, I do a full backup monthly and then delete data
> from the tables that is older than the current date. On a separate
> non-production server I restored the initial full backup. My question
> is how can I add/restore the subsequent backups to the non-production
> server with out stepping on the data that was initially restored?
>
RESTORE WITH MOVE, followed perhaps by merging the data.
EG
BACKUP DATABASE AdventureWorks
TO AdventureWorksBackups ;
RESTORE DATABASE AdventureWorks_200608
FROM AdventureWorksBackups
WITH MOVE 'AdventureWorks_Data' TO
'C:\MySQLServer\AdventureWorks_200608.mdf',
MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
David|||Do you have an example of the merge?
David Browne wrote:
> <danielsmith611@.gmail.com> wrote in message
> news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> > On a production server, I do a full backup monthly and then delete data
> > from the tables that is older than the current date. On a separate
> > non-production server I restored the initial full backup. My question
> > is how can I add/restore the subsequent backups to the non-production
> > server with out stepping on the data that was initially restored?
> >
>
> RESTORE WITH MOVE, followed perhaps by merging the data.
>
> EG
> BACKUP DATABASE AdventureWorks
> TO AdventureWorksBackups ;
>
> RESTORE DATABASE AdventureWorks_200608
> FROM AdventureWorksBackups
> WITH MOVE 'AdventureWorks_Data' TO
> 'C:\MySQLServer\AdventureWorks_200608.mdf',
> MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
>
> David|||Or would log shipping work?
danielp wrote:
> Do you have an example of the merge?
> David Browne wrote:
> > <danielsmith611@.gmail.com> wrote in message
> > news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> > > On a production server, I do a full backup monthly and then delete data
> > > from the tables that is older than the current date. On a separate
> > > non-production server I restored the initial full backup. My question
> > > is how can I add/restore the subsequent backups to the non-production
> > > server with out stepping on the data that was initially restored?
> > >
> >
> >
> > RESTORE WITH MOVE, followed perhaps by merging the data.
> >
> >
> > EG
> >
> > BACKUP DATABASE AdventureWorks
> > TO AdventureWorksBackups ;
> >
> >
> > RESTORE DATABASE AdventureWorks_200608
> > FROM AdventureWorksBackups
> > WITH MOVE 'AdventureWorks_Data' TO
> > 'C:\MySQLServer\AdventureWorks_200608.mdf',
> > MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
> >
> >
> > David|||"danielp" <danielsmith611@.gmail.com> wrote in message
news:1155158638.423828.3310@.h48g2000cwc.googlegroups.com...
> Or would log shipping work?
No. Your deletes would get shipped.
David|||"danielp" <danielsmith611@.gmail.com> wrote in message
news:1155149678.373420.184490@.i3g2000cwc.googlegroups.com...
> Do you have an example of the merge?
It's just SQL, or perhaps an SSIS package. What do the tables look like?
David