Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Tuesday, March 27, 2012

Backup SQLExpress database

I have installed the community preview version of SQL Express (I think the April preview version). I can't find a way to backup a database created with the SQL Express UI tools. Can you point me in the right direction? Thanks, Leo

Hi,

I'm not very familar with Express Manager Tool. But if you do not find anything like dts or export/import function of dbs. I woul just write a small script that takes all tables into a dataset and would then write that dataset into a different database base or write it to a xml-file, using the writexml method of the dataset class.|||

You should be able to use the same T-SQL BACKUP syntax that works with any other database.

Something like:
SQLCMD -S machine\instance
SQLCMD> BACKUP DATABASE [foo] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\foo.bak'
Books Online has the full syntax of the BACKUP DATABASE command.

|||thanks

Backup SQL Server 2005

Hi,

I created a job to backup my database. Sometimes I get the following error:
The job failed. Unable to determine if the owner (DOMAIN\Administrator) of job Backup.Subplan_1 has server access (reason: Could not obtain information about Windows NT group/user 'DOMAIN\Administrator'<c/> error code 0x54b. [SQLSTATE 42000] (Error 15404))

I already deleted the job and made it again. Same problem. I don't get that error every day. For example: I got it 4 times last month.

Does anybody know what I can do to resolve the error?This appears to be a problem with AD. I would guess the job is not able to authenticate itself, or query information from AD. That said, it REALLY a bad idea to run jobs as Domain Admin. You should use service accounts.

Backup SQL 2005 to SQL 2000

Hi,
Is there anyway to restore a database that was created on SQL 2005 into SQL
2000. We have a database that I have been doing some testing on, on SQL 2005
and need to restore it back to SQL 2000 but keep getting various messages.
I have read that there is no way to do this but thought I would drop a
message in here first to confirm this or to find a way to do it?
Thanks
Mike
Your question is already answered in your prior post.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"sonicm" <sonicm@.discussions.microsoft.com> wrote in message
news:6C40D5E5-325E-429B-AF38-ED1DCA162AFA@.microsoft.com...
> Hi,
> Is there anyway to restore a database that was created on SQL 2005 into SQL
> 2000. We have a database that I have been doing some testing on, on SQL 2005
> and need to restore it back to SQL 2000 but keep getting various messages.
> I have read that there is no way to do this but thought I would drop a
> message in here first to confirm this or to find a way to do it?
> Thanks
> Mike

Backup SQL 2005 to SQL 2000

Hi,
Is there anyway to restore a database that was created on SQL 2005 into SQL
2000. We have a database that I have been doing some testing on, on SQL 2005
and need to restore it back to SQL 2000 but keep getting various messages.
I have read that there is no way to do this but thought I would drop a
message in here first to confirm this or to find a way to do it?
Thanks
MikeYour question is already answered in your prior post.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"sonicm" <sonicm@.discussions.microsoft.com> wrote in message
news:6C40D5E5-325E-429B-AF38-ED1DCA162AFA@.microsoft.com...
> Hi,
> Is there anyway to restore a database that was created on SQL 2005 into SQ
L
> 2000. We have a database that I have been doing some testing on, on SQL 20
05
> and need to restore it back to SQL 2000 but keep getting various messages.
> I have read that there is no way to do this but thought I would drop a
> message in here first to confirm this or to find a way to do it?
> Thanks
> Mike

Backup SQL 2005 to SQL 2000

Hi,
Is there anyway to restore a database that was created on SQL 2005 into SQL
2000. We have a database that I have been doing some testing on, on SQL 2005
and need to restore it back to SQL 2000 but keep getting various messages.
I have read that there is no way to do this but thought I would drop a
message in here first to confirm this or to find a way to do it?
Thanks
MikeYour question is already answered in your prior post.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"sonicm" <sonicm@.discussions.microsoft.com> wrote in message
news:6C40D5E5-325E-429B-AF38-ED1DCA162AFA@.microsoft.com...
> Hi,
> Is there anyway to restore a database that was created on SQL 2005 into SQL
> 2000. We have a database that I have been doing some testing on, on SQL 2005
> and need to restore it back to SQL 2000 but keep getting various messages.
> I have read that there is no way to do this but thought I would drop a
> message in here first to confirm this or to find a way to do it?
> Thanks
> Mike

Sunday, March 25, 2012

backup should continue even after failure

I have created a stored procedure to backup databases,
right now if backup of one database fails then it stops
execution. I want it not to stop but move on to next
database backup.
I tried separating actual execution of the backup command
to another stored procedure hoping that if it fails then
it will return the control back to calling stored
procedure but it didn't.
Any help wil be very much appreciated.
Thanks in advance.
Well one way is to make the backup thru a call to oSql. Then if it fails it
is up to you to detect it and do what you want.
Andrew J. Kelly SQL MVP
<anonymous@.discussions.microsoft.com> wrote in message
news:267801c47035$984e1c50$a301280a@.phx.gbl...
> I have created a stored procedure to backup databases,
> right now if backup of one database fails then it stops
> execution. I want it not to stop but move on to next
> database backup.
> I tried separating actual execution of the backup command
> to another stored procedure hoping that if it fails then
> it will return the control back to calling stored
> procedure but it didn't.
> Any help wil be very much appreciated.
> Thanks in advance.
>

backup should continue even after failure

I have created a stored procedure to backup databases,
right now if backup of one database fails then it stops
execution. I want it not to stop but move on to next
database backup.
I tried separating actual execution of the backup command
to another stored procedure hoping that if it fails then
it will return the control back to calling stored
procedure but it didn't.
Any help wil be very much appreciated.
Thanks in advance.Well one way is to make the backup thru a call to oSql. Then if it fails it
is up to you to detect it and do what you want.
--
Andrew J. Kelly SQL MVP
<anonymous@.discussions.microsoft.com> wrote in message
news:267801c47035$984e1c50$a301280a@.phx.gbl...
> I have created a stored procedure to backup databases,
> right now if backup of one database fails then it stops
> execution. I want it not to stop but move on to next
> database backup.
> I tried separating actual execution of the backup command
> to another stored procedure hoping that if it fails then
> it will return the control back to calling stored
> procedure but it didn't.
> Any help wil be very much appreciated.
> Thanks in advance.
>

backup should continue even after failure

I have created a stored procedure to backup databases,
right now if backup of one database fails then it stops
execution. I want it not to stop but move on to next
database backup.
I tried separating actual execution of the backup command
to another stored procedure hoping that if it fails then
it will return the control back to calling stored
procedure but it didn't.
Any help wil be very much appreciated.
Thanks in advance.Well one way is to make the backup thru a call to oSql. Then if it fails it
is up to you to detect it and do what you want.
Andrew J. Kelly SQL MVP
<anonymous@.discussions.microsoft.com> wrote in message
news:267801c47035$984e1c50$a301280a@.phx.gbl...
> I have created a stored procedure to backup databases,
> right now if backup of one database fails then it stops
> execution. I want it not to stop but move on to next
> database backup.
> I tried separating actual execution of the backup command
> to another stored procedure hoping that if it fails then
> it will return the control back to calling stored
> procedure but it didn't.
> Any help wil be very much appreciated.
> Thanks in advance.
>sql

Tuesday, March 20, 2012

Backup Restore Fails

Hi,

I ran a backup procedure and BAK file created.
I moved the file to another server, tried to restore and failed with following error:
"Cannot open backup device 'C:\*****.bak'. Operating system error 5(Access is denied.)"

I checked the file on the original server and the file is accessible: I can see its content with RESTORE FILELISTONLY command.

Any clues?

Thanks,
Mark

Hello Mark

Are you using the Restore dialog to do this operation or are you using T-SQL?

Either case, ensure that the account under which SQL server service is running has access to the 'C' drive.

[Venkat]
This posting is provided "AS IS" with no warranties, and confers no rights.

Backup question : Append existing

We are using SQL Server 2005.
I created a maintenance plan to backup the database and the transaction
log.When I click on "modify" on the backup plan, it says something like the
following:
Back up Database task
Backup database on local server
Databases: mydatabase
Type: Full
Append existing -->> what does this mean ?
Destination: disk
What does "Append existing" mean ? I see this on the transaction log backup
plan also.
Thank you.Append existing means that it will append the current backup to the file, if
it exists. So if this job runs 4 times, your backup file will have all 4
backups in it, instead of overwriting it with the latest backup (leaving the
box unchecked will overwrite).
Kyle Hanrahan, MCSE, MCTS (SQL Server)
"fniles" <fniles@.pfmail.com> wrote in message
news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
> We are using SQL Server 2005.
> I created a maintenance plan to backup the database and the transaction
> log.When I click on "modify" on the backup plan, it says something like
> the following:
> Back up Database task
> Backup database on local server
> Databases: mydatabase
> Type: Full
> Append existing -->> what does this mean ?
> Destination: disk
> What does "Append existing" mean ? I see this on the transaction log
> backup plan also.
> Thank you.
>|||You have lots of questions about Transaction Log and BACKUP command however
you insist not reading the document links we give you but you ask here.
I think you better don't be lazy to read them. You'll find most of your
questions' answer in those documens and you'll be learned about these topics
better.
Ekrem nsoy
"fniles" <fniles@.pfmail.com> wrote in message
news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
> We are using SQL Server 2005.
> I created a maintenance plan to backup the database and the transaction
> log.When I click on "modify" on the backup plan, it says something like
> the following:
> Back up Database task
> Backup database on local server
> Databases: mydatabase
> Type: Full
> Append existing -->> what does this mean ?
> Destination: disk
> What does "Append existing" mean ? I see this on the transaction log
> backup plan also.
> Thank you.
>|||"Append existing" does not mean it will not TRUNCATE the transaction log
during backup, right ? (it will still TRUNCATE the log, right) ?

>leaving the box unchecked will overwrite
What box is this ? When I "modify" on the backup plan, the only checkbox I
see is "verify backup integrity" which I have checked.
Thank you.
"Kyle R. Hanrahan" <vbnetguy@.newsgroup.nospam> wrote in message
news:%23LzlzjKSIHA.5136@.TK2MSFTNGP04.phx.gbl...
> Append existing means that it will append the current backup to the file,
> if it exists. So if this job runs 4 times, your backup file will have all
> 4 backups in it, instead of overwriting it with the latest backup (leaving
> the box unchecked will overwrite).
> Kyle Hanrahan, MCSE, MCTS (SQL Server)
> "fniles" <fniles@.pfmail.com> wrote in message
> news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
>|||This may have been a language translation issue, but your comment seems
excessively rude based on fniles trying to fully understand the T-LOG backup
process. I see others ask similar questions every day.
Kevin3NF
"Ekrem nsoy" <ekrem@.compecta.com> wrote in message
news:A41935D5-64FA-4FD9-8987-068A61026567@.microsoft.com...
> You have lots of questions about Transaction Log and BACKUP command
> however you insist not reading the document links we give you but you ask
> here.
> I think you better don't be lazy to read them. You'll find most of your
> questions' answer in those documens and you'll be learned about these
> topics better.
> --
> Ekrem nsoy
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
>|||I didn't mean to be rude for sure and I've answered more than a thousand
times in these newsgroups. I just stressed that he should read the documents
we directed him to understand about the topics he asked.
Besides, I don't think this is your business.
Ekrem nsoy
"Kevin3NF" <kevin@.SPAMTRAP.3nf-inc.com> wrote in message
news:%23P$kXMLSIHA.1212@.TK2MSFTNGP05.phx.gbl...
> This may have been a language translation issue, but your comment seems
> excessively rude based on fniles trying to fully understand the T-LOG
> backup process. I see others ask similar questions every day.
> --
> Kevin3NF
> "Ekrem nsoy" <ekrem@.compecta.com> wrote in message
> news:A41935D5-64FA-4FD9-8987-068A61026567@.microsoft.com...
>|||Thank you very much Kevin for all your help and support. I greatly
appreciate it.
I did read the articles that Ekrem suggested me to read, but I still have
questions after that.
I am not a DBA, I am a programmer, our company does not have a DBA, so I
also need to do the database maintenance stuffs.
Forgive me if I ask too many questions.
"Ekrem nsoy" <ekrem@.compecta.com> wrote in message
news:58C847C2-2754-40D2-8EC3-011063A6A1F7@.microsoft.com...
>I didn't mean to be rude for sure and I've answered more than a thousand
>times in these newsgroups. I just stressed that he should read the
>documents we directed him to understand about the topics he asked.
> Besides, I don't think this is your business.
> --
> Ekrem nsoy
>
> "Kevin3NF" <kevin@.SPAMTRAP.3nf-inc.com> wrote in message
> news:%23P$kXMLSIHA.1212@.TK2MSFTNGP05.phx.gbl...
>|||Please do not get me wrong, your questions are always welcome.
That's why I and my other friends are here, we like to answer questions.
However, sometimes people abuse the good intentions and they don't bother
theirselves to read the documents we suggest them to read because they find
it's easier asking. And when I see that you still were asking about the same
topic, I thought you did not even look at the documents I pointed for you.
So I stressed that would be reading them.
You can ask when you need fniles.
Peace! =)
Ekrem nsoy
"fniles" <fniles@.pfmail.com> wrote in message
news:ejHR23MSIHA.4128@.TK2MSFTNGP06.phx.gbl...
> Thank you very much Kevin for all your help and support. I greatly
> appreciate it.
> I did read the articles that Ekrem suggested me to read, but I still have
> questions after that.
> I am not a DBA, I am a programmer, our company does not have a DBA, so I
> also need to do the database maintenance stuffs.
> Forgive me if I ask too many questions.
> "Ekrem nsoy" <ekrem@.compecta.com> wrote in message
> news:58C847C2-2754-40D2-8EC3-011063A6A1F7@.microsoft.com...
>

Backup question : Append existing

We are using SQL Server 2005.
I created a maintenance plan to backup the database and the transaction
log.When I click on "modify" on the backup plan, it says something like the
following:
Back up Database task
Backup database on local server
Databases: mydatabase
Type: Full
Append existing -->> what does this mean ?
Destination: disk
What does "Append existing" mean ? I see this on the transaction log backup
plan also.
Thank you.
Append existing means that it will append the current backup to the file, if
it exists. So if this job runs 4 times, your backup file will have all 4
backups in it, instead of overwriting it with the latest backup (leaving the
box unchecked will overwrite).
Kyle Hanrahan, MCSE, MCTS (SQL Server)
"fniles" <fniles@.pfmail.com> wrote in message
news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
> We are using SQL Server 2005.
> I created a maintenance plan to backup the database and the transaction
> log.When I click on "modify" on the backup plan, it says something like
> the following:
> Back up Database task
> Backup database on local server
> Databases: mydatabase
> Type: Full
> Append existing -->> what does this mean ?
> Destination: disk
> What does "Append existing" mean ? I see this on the transaction log
> backup plan also.
> Thank you.
>
|||You have lots of questions about Transaction Log and BACKUP command however
you insist not reading the document links we give you but you ask here.
I think you better don't be lazy to read them. You'll find most of your
questions' answer in those documens and you'll be learned about these topics
better.
Ekrem nsoy
"fniles" <fniles@.pfmail.com> wrote in message
news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
> We are using SQL Server 2005.
> I created a maintenance plan to backup the database and the transaction
> log.When I click on "modify" on the backup plan, it says something like
> the following:
> Back up Database task
> Backup database on local server
> Databases: mydatabase
> Type: Full
> Append existing -->> what does this mean ?
> Destination: disk
> What does "Append existing" mean ? I see this on the transaction log
> backup plan also.
> Thank you.
>
|||"Append existing" does not mean it will not TRUNCATE the transaction log
during backup, right ? (it will still TRUNCATE the log, right) ?

>leaving the box unchecked will overwrite
What box is this ? When I "modify" on the backup plan, the only checkbox I
see is "verify backup integrity" which I have checked.
Thank you.
"Kyle R. Hanrahan" <vbnetguy@.newsgroup.nospam> wrote in message
news:%23LzlzjKSIHA.5136@.TK2MSFTNGP04.phx.gbl...
> Append existing means that it will append the current backup to the file,
> if it exists. So if this job runs 4 times, your backup file will have all
> 4 backups in it, instead of overwriting it with the latest backup (leaving
> the box unchecked will overwrite).
> Kyle Hanrahan, MCSE, MCTS (SQL Server)
> "fniles" <fniles@.pfmail.com> wrote in message
> news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
>
|||This may have been a language translation issue, but your comment seems
excessively rude based on fniles trying to fully understand the T-LOG backup
process. I see others ask similar questions every day.
Kevin3NF
"Ekrem nsoy" <ekrem@.compecta.com> wrote in message
news:A41935D5-64FA-4FD9-8987-068A61026567@.microsoft.com...
> You have lots of questions about Transaction Log and BACKUP command
> however you insist not reading the document links we give you but you ask
> here.
> I think you better don't be lazy to read them. You'll find most of your
> questions' answer in those documens and you'll be learned about these
> topics better.
> --
> Ekrem nsoy
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
>
|||I didn't mean to be rude for sure and I've answered more than a thousand
times in these newsgroups. I just stressed that he should read the documents
we directed him to understand about the topics he asked.
Besides, I don't think this is your business.
Ekrem nsoy
"Kevin3NF" <kevin@.SPAMTRAP.3nf-inc.com> wrote in message
news:%23P$kXMLSIHA.1212@.TK2MSFTNGP05.phx.gbl...
> This may have been a language translation issue, but your comment seems
> excessively rude based on fniles trying to fully understand the T-LOG
> backup process. I see others ask similar questions every day.
> --
> Kevin3NF
> "Ekrem nsoy" <ekrem@.compecta.com> wrote in message
> news:A41935D5-64FA-4FD9-8987-068A61026567@.microsoft.com...
>
|||Thank you very much Kevin for all your help and support. I greatly
appreciate it.
I did read the articles that Ekrem suggested me to read, but I still have
questions after that.
I am not a DBA, I am a programmer, our company does not have a DBA, so I
also need to do the database maintenance stuffs.
Forgive me if I ask too many questions.
"Ekrem nsoy" <ekrem@.compecta.com> wrote in message
news:58C847C2-2754-40D2-8EC3-011063A6A1F7@.microsoft.com...
>I didn't mean to be rude for sure and I've answered more than a thousand
>times in these newsgroups. I just stressed that he should read the
>documents we directed him to understand about the topics he asked.
> Besides, I don't think this is your business.
> --
> Ekrem nsoy
>
> "Kevin3NF" <kevin@.SPAMTRAP.3nf-inc.com> wrote in message
> news:%23P$kXMLSIHA.1212@.TK2MSFTNGP05.phx.gbl...
>
|||Please do not get me wrong, your questions are always welcome.
That's why I and my other friends are here, we like to answer questions.
However, sometimes people abuse the good intentions and they don't bother
theirselves to read the documents we suggest them to read because they find
it's easier asking. And when I see that you still were asking about the same
topic, I thought you did not even look at the documents I pointed for you.
So I stressed that would be reading them.
You can ask when you need fniles.
Peace! =)
Ekrem nsoy
"fniles" <fniles@.pfmail.com> wrote in message
news:ejHR23MSIHA.4128@.TK2MSFTNGP06.phx.gbl...
> Thank you very much Kevin for all your help and support. I greatly
> appreciate it.
> I did read the articles that Ekrem suggested me to read, but I still have
> questions after that.
> I am not a DBA, I am a programmer, our company does not have a DBA, so I
> also need to do the database maintenance stuffs.
> Forgive me if I ask too many questions.
> "Ekrem nsoy" <ekrem@.compecta.com> wrote in message
> news:58C847C2-2754-40D2-8EC3-011063A6A1F7@.microsoft.com...
>
sql

Backup question : Append existing

We are using SQL Server 2005.
I created a maintenance plan to backup the database and the transaction
log.When I click on "modify" on the backup plan, it says something like the
following:
Back up Database task
Backup database on local server
Databases: mydatabase
Type: Full
Append existing -->> what does this mean ?
Destination: disk
What does "Append existing" mean ? I see this on the transaction log backup
plan also.
Thank you.Append existing means that it will append the current backup to the file, if
it exists. So if this job runs 4 times, your backup file will have all 4
backups in it, instead of overwriting it with the latest backup (leaving the
box unchecked will overwrite).
Kyle Hanrahan, MCSE, MCTS (SQL Server)
"fniles" <fniles@.pfmail.com> wrote in message
news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
> We are using SQL Server 2005.
> I created a maintenance plan to backup the database and the transaction
> log.When I click on "modify" on the backup plan, it says something like
> the following:
> Back up Database task
> Backup database on local server
> Databases: mydatabase
> Type: Full
> Append existing -->> what does this mean ?
> Destination: disk
> What does "Append existing" mean ? I see this on the transaction log
> backup plan also.
> Thank you.
>|||You have lots of questions about Transaction Log and BACKUP command however
you insist not reading the document links we give you but you ask here.
I think you better don't be lazy to read them. You'll find most of your
questions' answer in those documens and you'll be learned about these topics
better.
--
Ekrem Önsoy
"fniles" <fniles@.pfmail.com> wrote in message
news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
> We are using SQL Server 2005.
> I created a maintenance plan to backup the database and the transaction
> log.When I click on "modify" on the backup plan, it says something like
> the following:
> Back up Database task
> Backup database on local server
> Databases: mydatabase
> Type: Full
> Append existing -->> what does this mean ?
> Destination: disk
> What does "Append existing" mean ? I see this on the transaction log
> backup plan also.
> Thank you.
>|||"Append existing" does not mean it will not TRUNCATE the transaction log
during backup, right ? (it will still TRUNCATE the log, right) ?
>leaving the box unchecked will overwrite
What box is this ? When I "modify" on the backup plan, the only checkbox I
see is "verify backup integrity" which I have checked.
Thank you.
"Kyle R. Hanrahan" <vbnetguy@.newsgroup.nospam> wrote in message
news:%23LzlzjKSIHA.5136@.TK2MSFTNGP04.phx.gbl...
> Append existing means that it will append the current backup to the file,
> if it exists. So if this job runs 4 times, your backup file will have all
> 4 backups in it, instead of overwriting it with the latest backup (leaving
> the box unchecked will overwrite).
> Kyle Hanrahan, MCSE, MCTS (SQL Server)
> "fniles" <fniles@.pfmail.com> wrote in message
> news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
>> We are using SQL Server 2005.
>> I created a maintenance plan to backup the database and the transaction
>> log.When I click on "modify" on the backup plan, it says something like
>> the following:
>> Back up Database task
>> Backup database on local server
>> Databases: mydatabase
>> Type: Full
>> Append existing -->> what does this mean ?
>> Destination: disk
>> What does "Append existing" mean ? I see this on the transaction log
>> backup plan also.
>> Thank you.
>|||This may have been a language translation issue, but your comment seems
excessively rude based on fniles trying to fully understand the T-LOG backup
process. I see others ask similar questions every day.
--
Kevin3NF
"Ekrem Önsoy" <ekrem@.compecta.com> wrote in message
news:A41935D5-64FA-4FD9-8987-068A61026567@.microsoft.com...
> You have lots of questions about Transaction Log and BACKUP command
> however you insist not reading the document links we give you but you ask
> here.
> I think you better don't be lazy to read them. You'll find most of your
> questions' answer in those documens and you'll be learned about these
> topics better.
> --
> Ekrem Önsoy
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
>> We are using SQL Server 2005.
>> I created a maintenance plan to backup the database and the transaction
>> log.When I click on "modify" on the backup plan, it says something like
>> the following:
>> Back up Database task
>> Backup database on local server
>> Databases: mydatabase
>> Type: Full
>> Append existing -->> what does this mean ?
>> Destination: disk
>> What does "Append existing" mean ? I see this on the transaction log
>> backup plan also.
>> Thank you.
>|||I didn't mean to be rude for sure and I've answered more than a thousand
times in these newsgroups. I just stressed that he should read the documents
we directed him to understand about the topics he asked.
Besides, I don't think this is your business.
--
Ekrem Önsoy
"Kevin3NF" <kevin@.SPAMTRAP.3nf-inc.com> wrote in message
news:%23P$kXMLSIHA.1212@.TK2MSFTNGP05.phx.gbl...
> This may have been a language translation issue, but your comment seems
> excessively rude based on fniles trying to fully understand the T-LOG
> backup process. I see others ask similar questions every day.
> --
> Kevin3NF
> "Ekrem Önsoy" <ekrem@.compecta.com> wrote in message
> news:A41935D5-64FA-4FD9-8987-068A61026567@.microsoft.com...
>> You have lots of questions about Transaction Log and BACKUP command
>> however you insist not reading the document links we give you but you ask
>> here.
>> I think you better don't be lazy to read them. You'll find most of your
>> questions' answer in those documens and you'll be learned about these
>> topics better.
>> --
>> Ekrem Önsoy
>>
>> "fniles" <fniles@.pfmail.com> wrote in message
>> news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
>> We are using SQL Server 2005.
>> I created a maintenance plan to backup the database and the transaction
>> log.When I click on "modify" on the backup plan, it says something like
>> the following:
>> Back up Database task
>> Backup database on local server
>> Databases: mydatabase
>> Type: Full
>> Append existing -->> what does this mean ?
>> Destination: disk
>> What does "Append existing" mean ? I see this on the transaction log
>> backup plan also.
>> Thank you.
>>
>|||Thank you very much Kevin for all your help and support. I greatly
appreciate it.
I did read the articles that Ekrem suggested me to read, but I still have
questions after that.
I am not a DBA, I am a programmer, our company does not have a DBA, so I
also need to do the database maintenance stuffs.
Forgive me if I ask too many questions.
"Ekrem Önsoy" <ekrem@.compecta.com> wrote in message
news:58C847C2-2754-40D2-8EC3-011063A6A1F7@.microsoft.com...
>I didn't mean to be rude for sure and I've answered more than a thousand
>times in these newsgroups. I just stressed that he should read the
>documents we directed him to understand about the topics he asked.
> Besides, I don't think this is your business.
> --
> Ekrem Önsoy
>
> "Kevin3NF" <kevin@.SPAMTRAP.3nf-inc.com> wrote in message
> news:%23P$kXMLSIHA.1212@.TK2MSFTNGP05.phx.gbl...
>> This may have been a language translation issue, but your comment seems
>> excessively rude based on fniles trying to fully understand the T-LOG
>> backup process. I see others ask similar questions every day.
>> --
>> Kevin3NF
>> "Ekrem Önsoy" <ekrem@.compecta.com> wrote in message
>> news:A41935D5-64FA-4FD9-8987-068A61026567@.microsoft.com...
>> You have lots of questions about Transaction Log and BACKUP command
>> however you insist not reading the document links we give you but you
>> ask here.
>> I think you better don't be lazy to read them. You'll find most of your
>> questions' answer in those documens and you'll be learned about these
>> topics better.
>> --
>> Ekrem Önsoy
>>
>> "fniles" <fniles@.pfmail.com> wrote in message
>> news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
>> We are using SQL Server 2005.
>> I created a maintenance plan to backup the database and the transaction
>> log.When I click on "modify" on the backup plan, it says something like
>> the following:
>> Back up Database task
>> Backup database on local server
>> Databases: mydatabase
>> Type: Full
>> Append existing -->> what does this mean ?
>> Destination: disk
>> What does "Append existing" mean ? I see this on the transaction log
>> backup plan also.
>> Thank you.
>>
>>
>|||Please do not get me wrong, your questions are always welcome.
That's why I and my other friends are here, we like to answer questions.
However, sometimes people abuse the good intentions and they don't bother
theirselves to read the documents we suggest them to read because they find
it's easier asking. And when I see that you still were asking about the same
topic, I thought you did not even look at the documents I pointed for you.
So I stressed that would be reading them.
You can ask when you need fniles.
Peace! =)
--
Ekrem Önsoy
"fniles" <fniles@.pfmail.com> wrote in message
news:ejHR23MSIHA.4128@.TK2MSFTNGP06.phx.gbl...
> Thank you very much Kevin for all your help and support. I greatly
> appreciate it.
> I did read the articles that Ekrem suggested me to read, but I still have
> questions after that.
> I am not a DBA, I am a programmer, our company does not have a DBA, so I
> also need to do the database maintenance stuffs.
> Forgive me if I ask too many questions.
> "Ekrem Önsoy" <ekrem@.compecta.com> wrote in message
> news:58C847C2-2754-40D2-8EC3-011063A6A1F7@.microsoft.com...
>>I didn't mean to be rude for sure and I've answered more than a thousand
>>times in these newsgroups. I just stressed that he should read the
>>documents we directed him to understand about the topics he asked.
>> Besides, I don't think this is your business.
>> --
>> Ekrem Önsoy
>>
>> "Kevin3NF" <kevin@.SPAMTRAP.3nf-inc.com> wrote in message
>> news:%23P$kXMLSIHA.1212@.TK2MSFTNGP05.phx.gbl...
>> This may have been a language translation issue, but your comment seems
>> excessively rude based on fniles trying to fully understand the T-LOG
>> backup process. I see others ask similar questions every day.
>> --
>> Kevin3NF
>> "Ekrem Önsoy" <ekrem@.compecta.com> wrote in message
>> news:A41935D5-64FA-4FD9-8987-068A61026567@.microsoft.com...
>> You have lots of questions about Transaction Log and BACKUP command
>> however you insist not reading the document links we give you but you
>> ask here.
>> I think you better don't be lazy to read them. You'll find most of your
>> questions' answer in those documens and you'll be learned about these
>> topics better.
>> --
>> Ekrem Önsoy
>>
>> "fniles" <fniles@.pfmail.com> wrote in message
>> news:ugFXVaKSIHA.1208@.TK2MSFTNGP03.phx.gbl...
>> We are using SQL Server 2005.
>> I created a maintenance plan to backup the database and the
>> transaction log.When I click on "modify" on the backup plan, it says
>> something like the following:
>> Back up Database task
>> Backup database on local server
>> Databases: mydatabase
>> Type: Full
>> Append existing -->> what does this mean ?
>> Destination: disk
>> What does "Append existing" mean ? I see this on the transaction log
>> backup plan also.
>> Thank you.
>>
>>
>

Backup Question Old Files still attached

I was setting up the backup for a new database last evening and seem
to have created a small problem. Although I was able to create a
backup and restore it, in the process I seem to have left a couple of
other copies of the database files in a state where they cannot be
moved, deleted or copied.
I started by right clicking on the database and selecting Back Up. I
then did a Full Backup of the Database (not the Files and
Filegroups). I then detached the original database (probably a
mistake) and went to the Databases level, right-clicked and selected
Restore Database. I did not find the name of my database in the "To
Database:" list so I typed it in and proceeded to select the From
Database (which did have the name of my database and the correct
backup time) and restored the database.
The database seemed to work fine.
However when I checked the files I found not only my original
DatabaseName_Data.MDF and DatabaseName_Log.LDF files, but two new
ones
DatabaseName.MDF and DatabaseName_1.LDF. These last two files are
the
actual files being used by the restored database.
I would now like to do two things:
1) Move the original DatabaseName_Data.MDF and DatabaseName_Log.LDF
files to a new location, and
2) Rename the files that are actually being used from
DatabaseName.MDF
and DatabaseName_1.LDF to DatabaseName_Data.MDF and
DatabaseName_Log.LDF as they were before.
However I can't seem to do anything with the original files because
they seem to still be attached to the server. How can I SAFELY
accomplish what I want without endangering my good database (with the
wrong file names)?
Thanks.Detach the databases and do whatevery you want. Move them, rename them or
whatever and then reattach whichever one you want to use.
--
Ekrem Önsoy
"ExcelMan" <sfarkas@.sjfcg.com> wrote in message
news:1188538011.871157.326450@.q5g2000prf.googlegroups.com...
> I was setting up the backup for a new database last evening and seem
> to have created a small problem. Although I was able to create a
> backup and restore it, in the process I seem to have left a couple of
> other copies of the database files in a state where they cannot be
> moved, deleted or copied.
> I started by right clicking on the database and selecting Back Up. I
> then did a Full Backup of the Database (not the Files and
> Filegroups). I then detached the original database (probably a
> mistake) and went to the Databases level, right-clicked and selected
> Restore Database. I did not find the name of my database in the "To
> Database:" list so I typed it in and proceeded to select the From
> Database (which did have the name of my database and the correct
> backup time) and restored the database.
>
> The database seemed to work fine.
>
> However when I checked the files I found not only my original
> DatabaseName_Data.MDF and DatabaseName_Log.LDF files, but two new
> ones
> DatabaseName.MDF and DatabaseName_1.LDF. These last two files are
> the
> actual files being used by the restored database.
>
> I would now like to do two things:
>
> 1) Move the original DatabaseName_Data.MDF and DatabaseName_Log.LDF
> files to a new location, and
> 2) Rename the files that are actually being used from
> DatabaseName.MDF
> and DatabaseName_1.LDF to DatabaseName_Data.MDF and
> DatabaseName_Log.LDF as they were before.
>
> However I can't seem to do anything with the original files because
> they seem to still be attached to the server. How can I SAFELY
> accomplish what I want without endangering my good database (with the
> wrong file names)?
>
> Thanks.
>

Backup question

We are using SQLServer 2005.
I am looking for a good advice to do our database backup.
For our database, I have created a full backup that is done every day at 12
am. Then daily every 1 hour I backup the Transaction log. Then I have a
backup file cleanup (maintenance cleanup task) to delete files that are
older than 3 days. Is this backup plan good enough ? Shall I also di a
differential backup ?
Thank you.fniles wrote:
> We are using SQLServer 2005.
> I am looking for a good advice to do our database backup.
> For our database, I have created a full backup that is done every day at 12
> am. Then daily every 1 hour I backup the Transaction log. Then I have a
> backup file cleanup (maintenance cleanup task) to delete files that are
> older than 3 days. Is this backup plan good enough ? Shall I also di a
> differential backup ?
> Thank you.
Good enough for what?
You need to answer your own question by determining your Recovery
Point Objective and Recovery Time Objective. That is, the latest point
to which your business must be able to recover its data (RPO) and the
downtime you can afford in which to do it (RTO). These are business
considerations, not technical ones. Start talking to your business
stakeholders.
--
David Portas|||I guess my question is, if I already do Full backup once a day, and
transaction log backup every hour, do I still need to do "Differential"
backup ?
What is the difference between backing up (full backup and transaction log)
and (the differential backup) ?
Say I do a full backup at 12 am and has transaction log every hour after
that.
Say it is 9 am now, and I need to restore my data, do I need to restore the
full backup and restore every transaction log from 12 am until 9 am ?
If I do differential backup every 4 hours, is my differential backup at 8 am
contains only those data from 4 am to 8 am, or does it contain data from 12
am to 8 am ?
Thank you.
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
> fniles wrote:
>> We are using SQLServer 2005.
>> I am looking for a good advice to do our database backup.
>> For our database, I have created a full backup that is done every day at
>> 12
>> am. Then daily every 1 hour I backup the Transaction log. Then I have a
>> backup file cleanup (maintenance cleanup task) to delete files that are
>> older than 3 days. Is this backup plan good enough ? Shall I also di a
>> differential backup ?
>> Thank you.
> Good enough for what?
> You need to answer your own question by determining your Recovery
> Point Objective and Recovery Time Objective. That is, the latest point
> to which your business must be able to recover its data (RPO) and the
> downtime you can afford in which to do it (RTO). These are business
> considerations, not technical ones. Start talking to your business
> stakeholders.
> --
> David Portas|||Hi fniles
A differential backup contains all the changes since the last full database
backup. So your 8 AM differential would contain all the changes since
midnight.
This can make restore much faster. After restoring the full database, you
then only need to restore the most recent differential and any log backups
from after that differential.
So in your case, assuming you have already made your 9am log backup, you
could either restore 9 log backups, or 1 differential and 1 log backup.
--
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"fniles" <fniles@.pfmail.com> wrote in message
news:uxbAPZ4MIHA.3400@.TK2MSFTNGP03.phx.gbl...
>I guess my question is, if I already do Full backup once a day, and
>transaction log backup every hour, do I still need to do "Differential"
>backup ?
> What is the difference between backing up (full backup and transaction
> log) and (the differential backup) ?
> Say I do a full backup at 12 am and has transaction log every hour after
> that.
> Say it is 9 am now, and I need to restore my data, do I need to restore
> the full backup and restore every transaction log from 12 am until 9 am ?
> If I do differential backup every 4 hours, is my differential backup at 8
> am contains only those data from 4 am to 8 am, or does it contain data
> from 12 am to 8 am ?
> Thank you.
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
> news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
>> fniles wrote:
>> We are using SQLServer 2005.
>> I am looking for a good advice to do our database backup.
>> For our database, I have created a full backup that is done every day at
>> 12
>> am. Then daily every 1 hour I backup the Transaction log. Then I have a
>> backup file cleanup (maintenance cleanup task) to delete files that are
>> older than 3 days. Is this backup plan good enough ? Shall I also di a
>> differential backup ?
>> Thank you.
>> Good enough for what?
>> You need to answer your own question by determining your Recovery
>> Point Objective and Recovery Time Objective. That is, the latest point
>> to which your business must be able to recover its data (RPO) and the
>> downtime you can afford in which to do it (RTO). These are business
>> considerations, not technical ones. Start talking to your business
>> stakeholders.
>> --
>> David Portas
>|||Thank you !
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:uc9teo4MIHA.5208@.TK2MSFTNGP04.phx.gbl...
> Hi fniles
> A differential backup contains all the changes since the last full
> database backup. So your 8 AM differential would contain all the changes
> since midnight.
> This can make restore much faster. After restoring the full database, you
> then only need to restore the most recent differential and any log backups
> from after that differential.
> So in your case, assuming you have already made your 9am log backup, you
> could either restore 9 log backups, or 1 differential and 1 log backup.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.InsideSQLServer.com
> http://sqlblog.com
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:uxbAPZ4MIHA.3400@.TK2MSFTNGP03.phx.gbl...
>>I guess my question is, if I already do Full backup once a day, and
>>transaction log backup every hour, do I still need to do "Differential"
>>backup ?
>> What is the difference between backing up (full backup and transaction
>> log) and (the differential backup) ?
>> Say I do a full backup at 12 am and has transaction log every hour after
>> that.
>> Say it is 9 am now, and I need to restore my data, do I need to restore
>> the full backup and restore every transaction log from 12 am until 9 am ?
>> If I do differential backup every 4 hours, is my differential backup at 8
>> am contains only those data from 4 am to 8 am, or does it contain data
>> from 12 am to 8 am ?
>> Thank you.
>> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
>> news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
>> fniles wrote:
>> We are using SQLServer 2005.
>> I am looking for a good advice to do our database backup.
>> For our database, I have created a full backup that is done every day
>> at 12
>> am. Then daily every 1 hour I backup the Transaction log. Then I have a
>> backup file cleanup (maintenance cleanup task) to delete files that are
>> older than 3 days. Is this backup plan good enough ? Shall I also di a
>> differential backup ?
>> Thank you.
>> Good enough for what?
>> You need to answer your own question by determining your Recovery
>> Point Objective and Recovery Time Objective. That is, the latest point
>> to which your business must be able to recover its data (RPO) and the
>> downtime you can afford in which to do it (RTO). These are business
>> considerations, not technical ones. Start talking to your business
>> stakeholders.
>> --
>> David Portas
>>
>|||I like the way David explains the concept of RPO and RTO as this will define
what backup procedures you will need to do. Even if you understand the
concpets behind FULL, DIFFERENTIAL, FILEGROUP or TRANSACTION LOG backups,
your RPO and RTO will determine what you need to use to fulfill your
requirements
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
> fniles wrote:
>> We are using SQLServer 2005.
>> I am looking for a good advice to do our database backup.
>> For our database, I have created a full backup that is done every day at
>> 12
>> am. Then daily every 1 hour I backup the Transaction log. Then I have a
>> backup file cleanup (maintenance cleanup task) to delete files that are
>> older than 3 days. Is this backup plan good enough ? Shall I also di a
>> differential backup ?
>> Thank you.
> Good enough for what?
> You need to answer your own question by determining your Recovery
> Point Objective and Recovery Time Objective. That is, the latest point
> to which your business must be able to recover its data (RPO) and the
> downtime you can afford in which to do it (RTO). These are business
> considerations, not technical ones. Start talking to your business
> stakeholders.
> --
> David Portas|||Yes, I backup to a drive.
We do have another backup procedure outside the SQL Server Management Studio
that will backup to a tape.
"Brett I. Holcomb" <brettholcomb@.bellsouth.net> wrote in message
news:e0a1l3915upjr0kss3hk87273vrh24tm6t@.4ax.com...
> How do you backup the backups? Do you have an Enterprise back system
> like Tivoli that backs up to a drive not on the SQL server or to tape?
> On Sat, 1 Dec 2007 09:57:56 -0600, "fniles" <fniles@.pfmail.com> wrote:
>>We are using SQLServer 2005.
>>I am looking for a good advice to do our database backup.
>>For our database, I have created a full backup that is done every day at
>>12
>>am. Then daily every 1 hour I backup the Transaction log. Then I have a
>>backup file cleanup (maintenance cleanup task) to delete files that are
>>older than 3 days. Is this backup plan good enough ? Shall I also di a
>>differential backup ?
>>Thank you.|||Regarding Recovery Time Objective (RTO), which backup will take the least
time to restore ?
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
> fniles wrote:
>> We are using SQLServer 2005.
>> I am looking for a good advice to do our database backup.
>> For our database, I have created a full backup that is done every day at
>> 12
>> am. Then daily every 1 hour I backup the Transaction log. Then I have a
>> backup file cleanup (maintenance cleanup task) to delete files that are
>> older than 3 days. Is this backup plan good enough ? Shall I also di a
>> differential backup ?
>> Thank you.
> Good enough for what?
> You need to answer your own question by determining your Recovery
> Point Objective and Recovery Time Objective. That is, the latest point
> to which your business must be able to recover its data (RPO) and the
> downtime you can afford in which to do it (RTO). These are business
> considerations, not technical ones. Start talking to your business
> stakeholders.
> --
> David Portas|||It depends. A very simplified example:
You have a db backup and then either a diff or a log backup. You wonder whether a diff backup or a
log backup will take longer time.
Say you've done a *lot* of modifications of the same row (pretty extreme, but just as an example).
If you now restore a log backup, then all those modification will be re-done when you restore. If
you restore a diff backup, then only one extent (8 pages) will be restored.
OTOH, say you've modified a lot of data (say 10,000 modifications), each modification spread over
different extents. Diff restore will restore 10,000 extents. Log restore will re-do those 10,000
modifications.
In general, it isn't one or the other. I tend to have db and log backup as a basic setting. I
complement with diff backup when I realize that restoring all log backups since last db backup takes
too long. So, I restore db backup, last diff backup and all subsequent log backups.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"fniles" <fniles@.pfmail.com> wrote in message news:%230L7QecNIHA.4712@.TK2MSFTNGP04.phx.gbl...
> Regarding Recovery Time Objective (RTO), which backup will take the least time to restore ?
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
> news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
>> fniles wrote:
>> We are using SQLServer 2005.
>> I am looking for a good advice to do our database backup.
>> For our database, I have created a full backup that is done every day at 12
>> am. Then daily every 1 hour I backup the Transaction log. Then I have a
>> backup file cleanup (maintenance cleanup task) to delete files that are
>> older than 3 days. Is this backup plan good enough ? Shall I also di a
>> differential backup ?
>> Thank you.
>> Good enough for what?
>> You need to answer your own question by determining your Recovery
>> Point Objective and Recovery Time Objective. That is, the latest point
>> to which your business must be able to recover its data (RPO) and the
>> downtime you can afford in which to do it (RTO). These are business
>> considerations, not technical ones. Start talking to your business
>> stakeholders.
>> --
>> David Portas
>|||I had a client hit by this very issue. They had very bad (i.e. bloated,
non-normalized) data structures as well as ugly ADO code, among other
issues. Differential backups were huge compared to transaction log backups
on average.
--
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:B927BB46-3329-4E78-A75D-CDE8ED0D8091@.microsoft.com...
> It depends. A very simplified example:
> You have a db backup and then either a diff or a log backup. You wonder
> whether a diff backup or a log backup will take longer time.
> Say you've done a *lot* of modifications of the same row (pretty extreme,
> but just as an example). If you now restore a log backup, then all those
> modification will be re-done when you restore. If you restore a diff
> backup, then only one extent (8 pages) will be restored.
> OTOH, say you've modified a lot of data (say 10,000 modifications), each
> modification spread over different extents. Diff restore will restore
> 10,000 extents. Log restore will re-do those 10,000 modifications.
> In general, it isn't one or the other. I tend to have db and log backup as
> a basic setting. I complement with diff backup when I realize that
> restoring all log backups since last db backup takes too long. So, I
> restore db backup, last diff backup and all subsequent log backups.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:%230L7QecNIHA.4712@.TK2MSFTNGP04.phx.gbl...
>> Regarding Recovery Time Objective (RTO), which backup will take the least
>> time to restore ?
>> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
>> news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
>> fniles wrote:
>> We are using SQLServer 2005.
>> I am looking for a good advice to do our database backup.
>> For our database, I have created a full backup that is done every day
>> at 12
>> am. Then daily every 1 hour I backup the Transaction log. Then I have a
>> backup file cleanup (maintenance cleanup task) to delete files that are
>> older than 3 days. Is this backup plan good enough ? Shall I also di a
>> differential backup ?
>> Thank you.
>> Good enough for what?
>> You need to answer your own question by determining your Recovery
>> Point Objective and Recovery Time Objective. That is, the latest point
>> to which your business must be able to recover its data (RPO) and the
>> downtime you can afford in which to do it (RTO). These are business
>> considerations, not technical ones. Start talking to your business
>> stakeholders.
>> --
>> David Portas
>>
>

BackUp question

He evryone
I need help about backup. I have a several questions about this
situation.
In Database Maintenance Plan i created plan for backup some database.
BackUp occurs every day at 01.00h, on disk to some directory on the
network. I checked option Remove files older then
(3 days). DMPlan created for me job that works backup. Job creates new
bak file every day and remove files older than 3 days. So, i always have
3 .bak files in the backup directory.
But if I create job by myself with standard backup statement (back up
database ...) , i can put with noinit option so i will append .bak file
to .bak file and i will have only one file in backup directory.
1) If i use the DMPlan how can i use with noinit option?
2) If i use BackUp Database statement how can i remove files older than
some days?
3) What is better solution, keep 3 or more diferent .bak files or only
one with noinit option?
Thanks
Alex
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!acko
http://vyaskn.tripod.com/sql_server_administration_best_practices.htm#Step1
--administaiting best practices
"acko bogicevic" <aconi2002@.yahoo.com> wrote in message
news:eDKcIMe#DHA.220@.TK2MSFTNGP09.phx.gbl...
> He evryone
> I need help about backup. I have a several questions about this
> situation.
> In Database Maintenance Plan i created plan for backup some database.
> BackUp occurs every day at 01.00h, on disk to some directory on the
> network. I checked option Remove files older then
> (3 days). DMPlan created for me job that works backup. Job creates new
> bak file every day and remove files older than 3 days. So, i always have
> 3 .bak files in the backup directory.
> But if I create job by myself with standard backup statement (back up
> database ...) , i can put with noinit option so i will append .bak file
> to .bak file and i will have only one file in backup directory.
> 1) If i use the DMPlan how can i use with noinit option?
> 2) If i use BackUp Database statement how can i remove files older than
> some days?
> 3) What is better solution, keep 3 or more diferent .bak files or only
> one with noinit option?
> Thanks
> Alex
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Monday, March 19, 2012

BackUp question

He evryone
I need help about backup. I have a several questions about this
situation.
In Database Maintenance Plan i created plan for backup some database.
BackUp occurs every day at 01.00h, on disk to some directory on the
network. I checked option Remove files older then
(3 days). DMPlan created for me job that works backup. Job creates new
bak file every day and remove files older than 3 days. So, i always have
3 .bak files in the backup directory.
But if I create job by myself with standard backup statement (back up
database ...) , i can put with noinit option so i will append .bak file
to .bak file and i will have only one file in backup directory.
1) If i use the DMPlan how can i use with noinit option?
2) If i use BackUp Database statement how can i remove files older than
some days?
3) What is better solution, keep 3 or more diferent .bak files or only
one with noinit option?
Thanks
Alex
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!acko
http://vyaskn.tripod.com/ sql_serve...r />
.htm#Step1
--administaiting best practices
"acko bogicevic" <aconi2002@.yahoo.com> wrote in message
news:eDKcIMe#DHA.220@.TK2MSFTNGP09.phx.gbl...
> He evryone
> I need help about backup. I have a several questions about this
> situation.
> In Database Maintenance Plan i created plan for backup some database.
> BackUp occurs every day at 01.00h, on disk to some directory on the
> network. I checked option Remove files older then
> (3 days). DMPlan created for me job that works backup. Job creates new
> bak file every day and remove files older than 3 days. So, i always have
> 3 .bak files in the backup directory.
> But if I create job by myself with standard backup statement (back up
> database ...) , i can put with noinit option so i will append .bak file
> to .bak file and i will have only one file in backup directory.
> 1) If i use the DMPlan how can i use with noinit option?
> 2) If i use BackUp Database statement how can i remove files older than
> some days?
> 3) What is better solution, keep 3 or more diferent .bak files or only
> one with noinit option?
> Thanks
> Alex
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!

Backup question

We are using SQLServer 2005.
I am looking for a good advice to do our database backup.
For our database, I have created a full backup that is done every day at 12
am. Then daily every 1 hour I backup the Transaction log. Then I have a
backup file cleanup (maintenance cleanup task) to delete files that are
older than 3 days. Is this backup plan good enough ? Shall I also di a
differential backup ?
Thank you.fniles wrote:
> We are using SQLServer 2005.
> I am looking for a good advice to do our database backup.
> For our database, I have created a full backup that is done every day at 1
2
> am. Then daily every 1 hour I backup the Transaction log. Then I have a
> backup file cleanup (maintenance cleanup task) to delete files that are
> older than 3 days. Is this backup plan good enough ? Shall I also di a
> differential backup ?
> Thank you.
Good enough for what?
You need to answer your own question by determining your Recovery
Point Objective and Recovery Time Objective. That is, the latest point
to which your business must be able to recover its data (RPO) and the
downtime you can afford in which to do it (RTO). These are business
considerations, not technical ones. Start talking to your business
stakeholders.
David Portas|||I guess my question is, if I already do Full backup once a day, and
transaction log backup every hour, do I still need to do "Differential"
backup ?
What is the difference between backing up (full backup and transaction log)
and (the differential backup) ?
Say I do a full backup at 12 am and has transaction log every hour after
that.
Say it is 9 am now, and I need to restore my data, do I need to restore the
full backup and restore every transaction log from 12 am until 9 am ?
If I do differential backup every 4 hours, is my differential backup at 8 am
contains only those data from 4 am to 8 am, or does it contain data from 12
am to 8 am ?
Thank you.
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
> fniles wrote:
> Good enough for what?
> You need to answer your own question by determining your Recovery
> Point Objective and Recovery Time Objective. That is, the latest point
> to which your business must be able to recover its data (RPO) and the
> downtime you can afford in which to do it (RTO). These are business
> considerations, not technical ones. Start talking to your business
> stakeholders.
> --
> David Portas|||Hi fniles
A differential backup contains all the changes since the last full database
backup. So your 8 AM differential would contain all the changes since
midnight.
This can make restore much faster. After restoring the full database, you
then only need to restore the most recent differential and any log backups
from after that differential.
So in your case, assuming you have already made your 9am log backup, you
could either restore 9 log backups, or 1 differential and 1 log backup.
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"fniles" <fniles@.pfmail.com> wrote in message
news:uxbAPZ4MIHA.3400@.TK2MSFTNGP03.phx.gbl...
>I guess my question is, if I already do Full backup once a day, and
>transaction log backup every hour, do I still need to do "Differential"
>backup ?
> What is the difference between backing up (full backup and transaction
> log) and (the differential backup) ?
> Say I do a full backup at 12 am and has transaction log every hour after
> that.
> Say it is 9 am now, and I need to restore my data, do I need to restore
> the full backup and restore every transaction log from 12 am until 9 am ?
> If I do differential backup every 4 hours, is my differential backup at 8
> am contains only those data from 4 am to 8 am, or does it contain data
> from 12 am to 8 am ?
> Thank you.
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
> news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
>|||Thank you !
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:uc9teo4MIHA.5208@.TK2MSFTNGP04.phx.gbl...
> Hi fniles
> A differential backup contains all the changes since the last full
> database backup. So your 8 AM differential would contain all the changes
> since midnight.
> This can make restore much faster. After restoring the full database, you
> then only need to restore the most recent differential and any log backups
> from after that differential.
> So in your case, assuming you have already made your 9am log backup, you
> could either restore 9 log backups, or 1 differential and 1 log backup.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.InsideSQLServer.com
> http://sqlblog.com
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:uxbAPZ4MIHA.3400@.TK2MSFTNGP03.phx.gbl...
>|||How do you backup the backups? Do you have an Enterprise back system
like Tivoli that backs up to a drive not on the SQL server or to tape?
On Sat, 1 Dec 2007 09:57:56 -0600, "fniles" <fniles@.pfmail.com> wrote:

>We are using SQLServer 2005.
>I am looking for a good advice to do our database backup.
>For our database, I have created a full backup that is done every day at 12
>am. Then daily every 1 hour I backup the Transaction log. Then I have a
>backup file cleanup (maintenance cleanup task) to delete files that are
>older than 3 days. Is this backup plan good enough ? Shall I also di a
>differential backup ?
>Thank you.
>|||I like the way David explains the concept of RPO and RTO as this will define
what backup procedures you will need to do. Even if you understand the
concpets behind FULL, DIFFERENTIAL, FILEGROUP or TRANSACTION LOG backups,
your RPO and RTO will determine what you need to use to fulfill your
requirements
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
> fniles wrote:
> Good enough for what?
> You need to answer your own question by determining your Recovery
> Point Objective and Recovery Time Objective. That is, the latest point
> to which your business must be able to recover its data (RPO) and the
> downtime you can afford in which to do it (RTO). These are business
> considerations, not technical ones. Start talking to your business
> stakeholders.
> --
> David Portas|||Yes, I backup to a drive.
We do have another backup procedure outside the SQL Server Management Studio
that will backup to a tape.
"Brett I. Holcomb" <brettholcomb@.bellsouth.net> wrote in message
news:e0a1l3915upjr0kss3hk87273vrh24tm6t@.
4ax.com...[vbcol=seagreen]
> How do you backup the backups? Do you have an Enterprise back system
> like Tivoli that backs up to a drive not on the SQL server or to tape?
> On Sat, 1 Dec 2007 09:57:56 -0600, "fniles" <fniles@.pfmail.com> wrote:
>|||Regarding Recovery Time Objective (RTO), which backup will take the least
time to restore ?
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
> fniles wrote:
> Good enough for what?
> You need to answer your own question by determining your Recovery
> Point Objective and Recovery Time Objective. That is, the latest point
> to which your business must be able to recover its data (RPO) and the
> downtime you can afford in which to do it (RTO). These are business
> considerations, not technical ones. Start talking to your business
> stakeholders.
> --
> David Portas|||It depends. A very simplified example:
You have a db backup and then either a diff or a log backup. You wonder whet
her a diff backup or a
log backup will take longer time.
Say you've done a *lot* of modifications of the same row (pretty extreme, bu
t just as an example).
If you now restore a log backup, then all those modification will be re-done
when you restore. If
you restore a diff backup, then only one extent (8 pages) will be restored.
OTOH, say you've modified a lot of data (say 10,000 modifications), each mod
ification spread over
different extents. Diff restore will restore 10,000 extents. Log restore wil
l re-do those 10,000
modifications.
In general, it isn't one or the other. I tend to have db and log backup as a
basic setting. I
complement with diff backup when I realize that restoring all log backups si
nce last db backup takes
too long. So, I restore db backup, last diff backup and all subsequent log b
ackups.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"fniles" <fniles@.pfmail.com> wrote in message news:%230L7QecNIHA.4712@.TK2MSFTNGP04.phx.gbl..
.
> Regarding Recovery Time Objective (RTO), which backup will take the least
time to restore ?
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
> news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
>

Backup question

We are using SQLServer 2005.
I am looking for a good advice to do our database backup.
For our database, I have created a full backup that is done every day at 12
am. Then daily every 1 hour I backup the Transaction log. Then I have a
backup file cleanup (maintenance cleanup task) to delete files that are
older than 3 days. Is this backup plan good enough ? Shall I also di a
differential backup ?
Thank you.
fniles wrote:
> We are using SQLServer 2005.
> I am looking for a good advice to do our database backup.
> For our database, I have created a full backup that is done every day at 12
> am. Then daily every 1 hour I backup the Transaction log. Then I have a
> backup file cleanup (maintenance cleanup task) to delete files that are
> older than 3 days. Is this backup plan good enough ? Shall I also di a
> differential backup ?
> Thank you.
Good enough for what?
You need to answer your own question by determining your Recovery
Point Objective and Recovery Time Objective. That is, the latest point
to which your business must be able to recover its data (RPO) and the
downtime you can afford in which to do it (RTO). These are business
considerations, not technical ones. Start talking to your business
stakeholders.
David Portas
|||I guess my question is, if I already do Full backup once a day, and
transaction log backup every hour, do I still need to do "Differential"
backup ?
What is the difference between backing up (full backup and transaction log)
and (the differential backup) ?
Say I do a full backup at 12 am and has transaction log every hour after
that.
Say it is 9 am now, and I need to restore my data, do I need to restore the
full backup and restore every transaction log from 12 am until 9 am ?
If I do differential backup every 4 hours, is my differential backup at 8 am
contains only those data from 4 am to 8 am, or does it contain data from 12
am to 8 am ?
Thank you.
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
> fniles wrote:
> Good enough for what?
> You need to answer your own question by determining your Recovery
> Point Objective and Recovery Time Objective. That is, the latest point
> to which your business must be able to recover its data (RPO) and the
> downtime you can afford in which to do it (RTO). These are business
> considerations, not technical ones. Start talking to your business
> stakeholders.
> --
> David Portas
|||Hi fniles
A differential backup contains all the changes since the last full database
backup. So your 8 AM differential would contain all the changes since
midnight.
This can make restore much faster. After restoring the full database, you
then only need to restore the most recent differential and any log backups
from after that differential.
So in your case, assuming you have already made your 9am log backup, you
could either restore 9 log backups, or 1 differential and 1 log backup.
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"fniles" <fniles@.pfmail.com> wrote in message
news:uxbAPZ4MIHA.3400@.TK2MSFTNGP03.phx.gbl...
>I guess my question is, if I already do Full backup once a day, and
>transaction log backup every hour, do I still need to do "Differential"
>backup ?
> What is the difference between backing up (full backup and transaction
> log) and (the differential backup) ?
> Say I do a full backup at 12 am and has transaction log every hour after
> that.
> Say it is 9 am now, and I need to restore my data, do I need to restore
> the full backup and restore every transaction log from 12 am until 9 am ?
> If I do differential backup every 4 hours, is my differential backup at 8
> am contains only those data from 4 am to 8 am, or does it contain data
> from 12 am to 8 am ?
> Thank you.
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
> news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
>
|||Thank you !
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:uc9teo4MIHA.5208@.TK2MSFTNGP04.phx.gbl...
> Hi fniles
> A differential backup contains all the changes since the last full
> database backup. So your 8 AM differential would contain all the changes
> since midnight.
> This can make restore much faster. After restoring the full database, you
> then only need to restore the most recent differential and any log backups
> from after that differential.
> So in your case, assuming you have already made your 9am log backup, you
> could either restore 9 log backups, or 1 differential and 1 log backup.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.InsideSQLServer.com
> http://sqlblog.com
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:uxbAPZ4MIHA.3400@.TK2MSFTNGP03.phx.gbl...
>
|||I like the way David explains the concept of RPO and RTO as this will define
what backup procedures you will need to do. Even if you understand the
concpets behind FULL, DIFFERENTIAL, FILEGROUP or TRANSACTION LOG backups,
your RPO and RTO will determine what you need to use to fulfill your
requirements
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
> fniles wrote:
> Good enough for what?
> You need to answer your own question by determining your Recovery
> Point Objective and Recovery Time Objective. That is, the latest point
> to which your business must be able to recover its data (RPO) and the
> downtime you can afford in which to do it (RTO). These are business
> considerations, not technical ones. Start talking to your business
> stakeholders.
> --
> David Portas
|||Yes, I backup to a drive.
We do have another backup procedure outside the SQL Server Management Studio
that will backup to a tape.
"Brett I. Holcomb" <brettholcomb@.bellsouth.net> wrote in message
news:e0a1l3915upjr0kss3hk87273vrh24tm6t@.4ax.com... [vbcol=seagreen]
> How do you backup the backups? Do you have an Enterprise back system
> like Tivoli that backs up to a drive not on the SQL server or to tape?
> On Sat, 1 Dec 2007 09:57:56 -0600, "fniles" <fniles@.pfmail.com> wrote:
|||Regarding Recovery Time Objective (RTO), which backup will take the least
time to restore ?
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:c9a7a869-c459-46c3-9ea9-34b77157e471@.o42g2000hsc.googlegroups.com...
> fniles wrote:
> Good enough for what?
> You need to answer your own question by determining your Recovery
> Point Objective and Recovery Time Objective. That is, the latest point
> to which your business must be able to recover its data (RPO) and the
> downtime you can afford in which to do it (RTO). These are business
> considerations, not technical ones. Start talking to your business
> stakeholders.
> --
> David Portas
|||I had a client hit by this very issue. They had very bad (i.e. bloated,
non-normalized) data structures as well as ugly ADO code, among other
issues. Differential backups were huge compared to transaction log backups
on average.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:B927BB46-3329-4E78-A75D-CDE8ED0D8091@.microsoft.com...
> It depends. A very simplified example:
> You have a db backup and then either a diff or a log backup. You wonder
> whether a diff backup or a log backup will take longer time.
> Say you've done a *lot* of modifications of the same row (pretty extreme,
> but just as an example). If you now restore a log backup, then all those
> modification will be re-done when you restore. If you restore a diff
> backup, then only one extent (8 pages) will be restored.
> OTOH, say you've modified a lot of data (say 10,000 modifications), each
> modification spread over different extents. Diff restore will restore
> 10,000 extents. Log restore will re-do those 10,000 modifications.
> In general, it isn't one or the other. I tend to have db and log backup as
> a basic setting. I complement with diff backup when I realize that
> restoring all log backups since last db backup takes too long. So, I
> restore db backup, last diff backup and all subsequent log backups.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:%230L7QecNIHA.4712@.TK2MSFTNGP04.phx.gbl...
>

BackUp Quastions

Hi everyone
I have the folowing situations with my backups.
With Database Maintenance Plan is created backup strategy. Full Backup
is performing every day at 1.00 am. And Romove files older than: is
checked on 2 days, and it's working fine.

I am interested how can i perform this action with tsql, without using
DMPlan.
I tryed this:
BACKUP DATABASE TEST TO DISK 'C:...' WITH INIT, RETAINDAYS = 2

I put this statement into job but it is not working. I tryed after that
with (WITH NOINIT) but in that case .bak file grow and files older than
2 days are not deleted.

How can i delete files older then 2 days.
Thanks

acko

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!"acko bogicevic" <aconi2002@.yahoo.com> wrote in message
news:408ccc86$0$200$75868355@.news.frii.net...
> Hi everyone
> I have the folowing situations with my backups.
> With Database Maintenance Plan is created backup strategy. Full Backup
> is performing every day at 1.00 am. And Romove files older than: is
> checked on 2 days, and it's working fine.
> I am interested how can i perform this action with tsql, without using
> DMPlan.
> I tryed this:
> BACKUP DATABASE TEST TO DISK 'C:...' WITH INIT, RETAINDAYS = 2
> I put this statement into job but it is not working. I tryed after that
> with (WITH NOINIT) but in that case .bak file grow and files older than
> 2 days are not deleted.
> How can i delete files older then 2 days.
> Thanks
> acko
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

RETAINDAYS means that the backup set cannot be overwritten for that number
of days - it does not remove backups. One way to do this in SQL is using a
process something like this:

1. Generate a different backup filename for each day, based on the date -
BACKUP will accept a variable for the destination file name
2. After running BACKUP, execute 'dir /b' with xp_cmdshell to get a list of
the files in your backup folder into a temp table
3. Using a cursor, parse the filenames in the table to get the date of each
backup
4. If a file is older than @.x days (compare using DATEDIFF()), then use
xp_cmdshell again to delete it

But this is quite awkward to do in SQL, and may become complicated when you
have different backup types, different folders for each database's backups
etc. It would be probably easier to write an external script using Perl,
VBScript etc. which uses the SQLDMO objects to do everything. Or perhaps a
combination of both - use a multi-step job, where some steps are external
scripts, and some are SQL commands.

Simon|||"Simon Hayes" <sql@.hayes.ch> wrote in message
news:408d4a4e$1_2@.news.bluewin.ch...
> "acko bogicevic" <aconi2002@.yahoo.com> wrote in message
> news:408ccc86$0$200$75868355@.news.frii.net...
> > Hi everyone
> > I have the folowing situations with my backups.
> > With Database Maintenance Plan is created backup strategy. Full Backup
> > is performing every day at 1.00 am. And Romove files older than: is
> > checked on 2 days, and it's working fine.
> > I am interested how can i perform this action with tsql, without using
> > DMPlan.
> > I tryed this:
> > BACKUP DATABASE TEST TO DISK 'C:...' WITH INIT, RETAINDAYS = 2
> > I put this statement into job but it is not working. I tryed after that
> > with (WITH NOINIT) but in that case .bak file grow and files older than
> > 2 days are not deleted.
> > How can i delete files older then 2 days.
> > Thanks
> > acko
> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!
> RETAINDAYS means that the backup set cannot be overwritten for that number
> of days - it does not remove backups. One way to do this in SQL is using a
> process something like this:
> 1. Generate a different backup filename for each day, based on the date -
> BACKUP will accept a variable for the destination file name
> 2. After running BACKUP, execute 'dir /b' with xp_cmdshell to get a list
of
> the files in your backup folder into a temp table
> 3. Using a cursor, parse the filenames in the table to get the date of
each
> backup
> 4. If a file is older than @.x days (compare using DATEDIFF()), then use
> xp_cmdshell again to delete it
> But this is quite awkward to do in SQL, and may become complicated when
you
> have different backup types, different folders for each database's backups
> etc. It would be probably easier to write an external script using Perl,
> VBScript etc. which uses the SQLDMO objects to do everything. Or perhaps a
> combination of both - use a multi-step job, where some steps are external
> scripts, and some are SQL commands.

I'm going to suggest a much easier and in my mind more robust way.

Use the backupfile, backupset, etc tables in the msdb database.

This will let you find the proper filenames, dates, etc.

> Simon

Thursday, March 8, 2012

Backup pefromed by SQLSERVERAGENT fails

I just created five new BU devices, then a job for each
and executed the jobs to create the intial backups on a
new database.
Four of the jobs worked fine. In Event Viewer, the Source
= MSSQLSERVER and the USER = SQLEXEC.
One job failed. Source = SQLSERVERAGENT and USER = N/A
Where did I go wrong? Why does the failing job use a
different USER and Source?
TIA MikeYou need to give us more info. Without the error message, it is like saying: "My computer doesn't
work. What is the problem?".
Check the job history, check "show step details", and go to the relevant step. See what the error
message is. Also, see the Agent errorlog.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Mike Hoyt" <mhoyt@.affiliatedhealth.org> wrote in message
news:0ec301c39d9e$db5dff70$a001280a@.phx.gbl...
> I just created five new BU devices, then a job for each
> and executed the jobs to create the intial backups on a
> new database.
> Four of the jobs worked fine. In Event Viewer, the Source
> = MSSQLSERVER and the USER = SQLEXEC.
> One job failed. Source = SQLSERVERAGENT and USER = N/A
> Where did I go wrong? Why does the failing job use a
> different USER and Source?
> TIA Mike|||The Job is failing at Step 1, which was invoked by
Schedule 1. Step 1 is the only step, and it is the basic
backup syntax. The SQLAgent error log is blank for
failures and warnings, information is the usual start up
stuff.
I know the agent is running, th eother jobs run and I get
email alerts of their completion. I get the email alert
of the failure of this job.
What I'm hoping osmebody can tell me is why this job is
run by Source = SQLSERVERAGENT and USER = N/A and the
other, sucessfull jobs, are run by MSSQLSERVER and the
USER = SQLEXEC|||I haven't played with this to see if this is the case but do
the jobs have different owners?
-Sue
On Wed, 29 Oct 2003 08:55:41 -0800,
<anonymous@.discussions.microsoft.com> wrote:
>The Job is failing at Step 1, which was invoked by
>Schedule 1. Step 1 is the only step, and it is the basic
>backup syntax. The SQLAgent error log is blank for
>failures and warnings, information is the usual start up
>stuff.
>I know the agent is running, th eother jobs run and I get
>email alerts of their completion. I get the email alert
>of the failure of this job.
>What I'm hoping osmebody can tell me is why this job is
>run by Source = SQLSERVERAGENT and USER = N/A and the
>other, sucessfull jobs, are run by MSSQLSERVER and the
>USER = SQLEXEC|||Have you checked job step history? Right click the job, select history, and
check job step details.
--
Michiel Wories, SQL Server PM
This posting is provided "AS IS" with no warranties, and confers no rights.
--
<anonymous@.discussions.microsoft.com> wrote in message
news:0e5501c39e3d$7c4f95d0$a501280a@.phx.gbl...
> The Job is failing at Step 1, which was invoked by
> Schedule 1. Step 1 is the only step, and it is the basic
> backup syntax. The SQLAgent error log is blank for
> failures and warnings, information is the usual start up
> stuff.
> I know the agent is running, th eother jobs run and I get
> email alerts of their completion. I get the email alert
> of the failure of this job.
> What I'm hoping osmebody can tell me is why this job is
> run by Source = SQLSERVERAGENT and USER = N/A and the
> other, sucessfull jobs, are run by MSSQLSERVER and the
> USER = SQLEXEC