Hi all. I'm not good at the database, but recently I build a website and
need to maintain it. I read some books but still don't know which way is
best for me to backup the database. What I want is I can restore data just
before the database was damaged. But it's difficult to me to understand the
diffrences between database backup and transaction log backup. or do I need
to do them both? please help, many thanks.
Yes. To have the ability to do a point in time recovery you will need to
set the database recovery mode to Full and configure a backup strategy. You
can use the SQL Maintenance wizard. It works ok for most small to medium
size databases. Basically a Full backup is exactly as it implies. It's
everything as of the end (all data and commited data changes) of the backup.
Each full backup will contain a last lsn. A number that identifies the last
log sequence in the backup file. Each transaction log will have a first and
last lsn as well. In order to recover you will need cover a range of lsn
from the first lsn in the full to the lsn that contains the time at which
you wish to recover to. There can be no gaps in the number sequence.
Performing a new full backup from time to time say once per night means that
your recovery is simplier because you get a new first lsn. The transaction
logs that were run pior to the new full are generally not needed unless you
need to go back in time before the most recent full. Technically you only
need one full backup if you are willing to keep every transaction log backup
and restore all of them to the point of damage.
Bottom line is to decide just how much data can be lost with a failure. Say
15 minutes. Configure SQL maintenance to do a full during non peak time
once per day and backup transaction logs every 15 minutes.
"mizi" <haha@.haha.com> wrote in message
news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> Hi all. I'm not good at the database, but recently I build a website and
> need to maintain it. I read some books but still don't know which way is
> best for me to backup the database. What I want is I can restore data just
> before the database was damaged. But it's difficult to me to understand
> the
> diffrences between database backup and transaction log backup. or do I
> need
> to do them both? please help, many thanks.
|||Yes, at least -minimum- you will need full database and transaction log
backups. Doing both full and transaction log backups will allow you to
recover your database to a specific point in time, for example, a few
seconds or minutes before your database failure.
How often to do the backups? Depends on the size of the database and how
long the backup would take. If possible, do nightly full backups. Also, take
a look at differential backups.
Once you decide your backup strategy, test and practice restoring your
database, maybe on another server. That is the only way to know if your
recovery strategy would work when you need it. Another good way to test is
to use your backups for your development environment.
Ben Nevarez
"mizi" <haha@.haha.com> wrote in message
news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> Hi all. I'm not good at the database, but recently I build a website and
> need to maintain it. I read some books but still don't know which way is
> best for me to backup the database. What I want is I can restore data just
> before the database was damaged. But it's difficult to me to understand
> the
> diffrences between database backup and transaction log backup. or do I
> need
> to do them both? please help, many thanks.
|||Hi,
In a database there are two files datafile and transaction file.
In datafile all the transaction are saved when committed and in
transaction file all the information is stored what u are doing with
the database.
if u want to backup the database normal backup SQL server backup the
datafile(.mdf) and Transaction log(.Ldf) and creates a backup file with
extension.BAK.
If u database is small for ex:2 or 3 GB then u can have ur database
backup 2 or 3 times a day.
if ur database is big enough that u cannot backup the database so
frequently then u have to take a full backup and then tlog backup.
For transaction log backup the recovery mode of the database should not
be in simple mode.It should be in Full or Bulk.
Transaction log backup is not allowed in simple recovery mode.
So if ur server crashed then u can recover it till the last tlog
backup.
just restore the last backup and then all the tlog backup file in
sequesnce u backed them up.
if u read books online then u will get more information related to this
topic.
HTH
from
Doller
Ben Nevarez wrote:[vbcol=seagreen]
> Yes, at least -minimum- you will need full database and transaction log
> backups. Doing both full and transaction log backups will allow you to
> recover your database to a specific point in time, for example, a few
> seconds or minutes before your database failure.
> How often to do the backups? Depends on the size of the database and how
> long the backup would take. If possible, do nightly full backups. Also, take
> a look at differential backups.
> Once you decide your backup strategy, test and practice restoring your
> database, maybe on another server. That is the only way to know if your
> recovery strategy would work when you need it. Another good way to test is
> to use your backups for your development environment.
> Ben Nevarez
>
> "mizi" <haha@.haha.com> wrote in message
> news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
Showing posts with label build. Show all posts
Showing posts with label build. Show all posts
Monday, March 19, 2012
Backup database?transaction log?or both?
Hi all. I'm not good at the database, but recently I build a website and
need to maintain it. I read some books but still don't know which way is
best for me to backup the database. What I want is I can restore data just
before the database was damaged. But it's difficult to me to understand the
diffrences between database backup and transaction log backup. or do I need
to do them both? please help, many thanks.Yes. To have the ability to do a point in time recovery you will need to
set the database recovery mode to Full and configure a backup strategy. You
can use the SQL Maintenance wizard. It works ok for most small to medium
size databases. Basically a Full backup is exactly as it implies. It's
everything as of the end (all data and commited data changes) of the backup.
Each full backup will contain a last lsn. A number that identifies the last
log sequence in the backup file. Each transaction log will have a first and
last lsn as well. In order to recover you will need cover a range of lsn
from the first lsn in the full to the lsn that contains the time at which
you wish to recover to. There can be no gaps in the number sequence.
Performing a new full backup from time to time say once per night means that
your recovery is simplier because you get a new first lsn. The transaction
logs that were run pior to the new full are generally not needed unless you
need to go back in time before the most recent full. Technically you only
need one full backup if you are willing to keep every transaction log backup
and restore all of them to the point of damage.
Bottom line is to decide just how much data can be lost with a failure. Say
15 minutes. Configure SQL maintenance to do a full during non peak time
once per day and backup transaction logs every 15 minutes.
"mizi" <haha@.haha.com> wrote in message
news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> Hi all. I'm not good at the database, but recently I build a website and
> need to maintain it. I read some books but still don't know which way is
> best for me to backup the database. What I want is I can restore data just
> before the database was damaged. But it's difficult to me to understand
> the
> diffrences between database backup and transaction log backup. or do I
> need
> to do them both? please help, many thanks.|||Yes, at least -minimum- you will need full database and transaction log
backups. Doing both full and transaction log backups will allow you to
recover your database to a specific point in time, for example, a few
seconds or minutes before your database failure.
How often to do the backups? Depends on the size of the database and how
long the backup would take. If possible, do nightly full backups. Also, take
a look at differential backups.
Once you decide your backup strategy, test and practice restoring your
database, maybe on another server. That is the only way to know if your
recovery strategy would work when you need it. Another good way to test is
to use your backups for your development environment.
Ben Nevarez
"mizi" <haha@.haha.com> wrote in message
news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> Hi all. I'm not good at the database, but recently I build a website and
> need to maintain it. I read some books but still don't know which way is
> best for me to backup the database. What I want is I can restore data just
> before the database was damaged. But it's difficult to me to understand
> the
> diffrences between database backup and transaction log backup. or do I
> need
> to do them both? please help, many thanks.|||Hi,
In a database there are two files datafile and transaction file.
In datafile all the transaction are saved when committed and in
transaction file all the information is stored what u are doing with
the database.
if u want to backup the database normal backup SQL server backup the
datafile(.mdf) and Transaction log(.Ldf) and creates a backup file with
extension.BAK.
If u database is small for ex:2 or 3 GB then u can have ur database
backup 2 or 3 times a day.
if ur database is big enough that u cannot backup the database so
frequently then u have to take a full backup and then tlog backup.
For transaction log backup the recovery mode of the database should not
be in simple mode.It should be in Full or Bulk.
Transaction log backup is not allowed in simple recovery mode.
So if ur server crashed then u can recover it till the last tlog
backup.
just restore the last backup and then all the tlog backup file in
sequesnce u backed them up.
if u read books online then u will get more information related to this
topic.
HTH
from
Doller
Ben Nevarez wrote:[vbcol=seagreen]
> Yes, at least -minimum- you will need full database and transaction log
> backups. Doing both full and transaction log backups will allow you to
> recover your database to a specific point in time, for example, a few
> seconds or minutes before your database failure.
> How often to do the backups? Depends on the size of the database and how
> long the backup would take. If possible, do nightly full backups. Also, ta
ke
> a look at differential backups.
> Once you decide your backup strategy, test and practice restoring your
> database, maybe on another server. That is the only way to know if your
> recovery strategy would work when you need it. Another good way to test is
> to use your backups for your development environment.
> Ben Nevarez
>
> "mizi" <haha@.haha.com> wrote in message
> news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
need to maintain it. I read some books but still don't know which way is
best for me to backup the database. What I want is I can restore data just
before the database was damaged. But it's difficult to me to understand the
diffrences between database backup and transaction log backup. or do I need
to do them both? please help, many thanks.Yes. To have the ability to do a point in time recovery you will need to
set the database recovery mode to Full and configure a backup strategy. You
can use the SQL Maintenance wizard. It works ok for most small to medium
size databases. Basically a Full backup is exactly as it implies. It's
everything as of the end (all data and commited data changes) of the backup.
Each full backup will contain a last lsn. A number that identifies the last
log sequence in the backup file. Each transaction log will have a first and
last lsn as well. In order to recover you will need cover a range of lsn
from the first lsn in the full to the lsn that contains the time at which
you wish to recover to. There can be no gaps in the number sequence.
Performing a new full backup from time to time say once per night means that
your recovery is simplier because you get a new first lsn. The transaction
logs that were run pior to the new full are generally not needed unless you
need to go back in time before the most recent full. Technically you only
need one full backup if you are willing to keep every transaction log backup
and restore all of them to the point of damage.
Bottom line is to decide just how much data can be lost with a failure. Say
15 minutes. Configure SQL maintenance to do a full during non peak time
once per day and backup transaction logs every 15 minutes.
"mizi" <haha@.haha.com> wrote in message
news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> Hi all. I'm not good at the database, but recently I build a website and
> need to maintain it. I read some books but still don't know which way is
> best for me to backup the database. What I want is I can restore data just
> before the database was damaged. But it's difficult to me to understand
> the
> diffrences between database backup and transaction log backup. or do I
> need
> to do them both? please help, many thanks.|||Yes, at least -minimum- you will need full database and transaction log
backups. Doing both full and transaction log backups will allow you to
recover your database to a specific point in time, for example, a few
seconds or minutes before your database failure.
How often to do the backups? Depends on the size of the database and how
long the backup would take. If possible, do nightly full backups. Also, take
a look at differential backups.
Once you decide your backup strategy, test and practice restoring your
database, maybe on another server. That is the only way to know if your
recovery strategy would work when you need it. Another good way to test is
to use your backups for your development environment.
Ben Nevarez
"mizi" <haha@.haha.com> wrote in message
news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> Hi all. I'm not good at the database, but recently I build a website and
> need to maintain it. I read some books but still don't know which way is
> best for me to backup the database. What I want is I can restore data just
> before the database was damaged. But it's difficult to me to understand
> the
> diffrences between database backup and transaction log backup. or do I
> need
> to do them both? please help, many thanks.|||Hi,
In a database there are two files datafile and transaction file.
In datafile all the transaction are saved when committed and in
transaction file all the information is stored what u are doing with
the database.
if u want to backup the database normal backup SQL server backup the
datafile(.mdf) and Transaction log(.Ldf) and creates a backup file with
extension.BAK.
If u database is small for ex:2 or 3 GB then u can have ur database
backup 2 or 3 times a day.
if ur database is big enough that u cannot backup the database so
frequently then u have to take a full backup and then tlog backup.
For transaction log backup the recovery mode of the database should not
be in simple mode.It should be in Full or Bulk.
Transaction log backup is not allowed in simple recovery mode.
So if ur server crashed then u can recover it till the last tlog
backup.
just restore the last backup and then all the tlog backup file in
sequesnce u backed them up.
if u read books online then u will get more information related to this
topic.
HTH
from
Doller
Ben Nevarez wrote:[vbcol=seagreen]
> Yes, at least -minimum- you will need full database and transaction log
> backups. Doing both full and transaction log backups will allow you to
> recover your database to a specific point in time, for example, a few
> seconds or minutes before your database failure.
> How often to do the backups? Depends on the size of the database and how
> long the backup would take. If possible, do nightly full backups. Also, ta
ke
> a look at differential backups.
> Once you decide your backup strategy, test and practice restoring your
> database, maybe on another server. That is the only way to know if your
> recovery strategy would work when you need it. Another good way to test is
> to use your backups for your development environment.
> Ben Nevarez
>
> "mizi" <haha@.haha.com> wrote in message
> news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
Backup database?transaction log?or both?
Hi all. I'm not good at the database, but recently I build a website and
need to maintain it. I read some books but still don't know which way is
best for me to backup the database. What I want is I can restore data just
before the database was damaged. But it's difficult to me to understand the
diffrences between database backup and transaction log backup. or do I need
to do them both? please help, many thanks.Yes. To have the ability to do a point in time recovery you will need to
set the database recovery mode to Full and configure a backup strategy. You
can use the SQL Maintenance wizard. It works ok for most small to medium
size databases. Basically a Full backup is exactly as it implies. It's
everything as of the end (all data and commited data changes) of the backup.
Each full backup will contain a last lsn. A number that identifies the last
log sequence in the backup file. Each transaction log will have a first and
last lsn as well. In order to recover you will need cover a range of lsn
from the first lsn in the full to the lsn that contains the time at which
you wish to recover to. There can be no gaps in the number sequence.
Performing a new full backup from time to time say once per night means that
your recovery is simplier because you get a new first lsn. The transaction
logs that were run pior to the new full are generally not needed unless you
need to go back in time before the most recent full. Technically you only
need one full backup if you are willing to keep every transaction log backup
and restore all of them to the point of damage.
Bottom line is to decide just how much data can be lost with a failure. Say
15 minutes. Configure SQL maintenance to do a full during non peak time
once per day and backup transaction logs every 15 minutes.
"mizi" <haha@.haha.com> wrote in message
news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> Hi all. I'm not good at the database, but recently I build a website and
> need to maintain it. I read some books but still don't know which way is
> best for me to backup the database. What I want is I can restore data just
> before the database was damaged. But it's difficult to me to understand
> the
> diffrences between database backup and transaction log backup. or do I
> need
> to do them both? please help, many thanks.|||Yes, at least -minimum- you will need full database and transaction log
backups. Doing both full and transaction log backups will allow you to
recover your database to a specific point in time, for example, a few
seconds or minutes before your database failure.
How often to do the backups? Depends on the size of the database and how
long the backup would take. If possible, do nightly full backups. Also, take
a look at differential backups.
Once you decide your backup strategy, test and practice restoring your
database, maybe on another server. That is the only way to know if your
recovery strategy would work when you need it. Another good way to test is
to use your backups for your development environment.
Ben Nevarez
"mizi" <haha@.haha.com> wrote in message
news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> Hi all. I'm not good at the database, but recently I build a website and
> need to maintain it. I read some books but still don't know which way is
> best for me to backup the database. What I want is I can restore data just
> before the database was damaged. But it's difficult to me to understand
> the
> diffrences between database backup and transaction log backup. or do I
> need
> to do them both? please help, many thanks.|||Hi,
In a database there are two files datafile and transaction file.
In datafile all the transaction are saved when committed and in
transaction file all the information is stored what u are doing with
the database.
if u want to backup the database normal backup SQL server backup the
datafile(.mdf) and Transaction log(.Ldf) and creates a backup file with
extension.BAK.
If u database is small for ex:2 or 3 GB then u can have ur database
backup 2 or 3 times a day.
if ur database is big enough that u cannot backup the database so
frequently then u have to take a full backup and then tlog backup.
For transaction log backup the recovery mode of the database should not
be in simple mode.It should be in Full or Bulk.
Transaction log backup is not allowed in simple recovery mode.
So if ur server crashed then u can recover it till the last tlog
backup.
just restore the last backup and then all the tlog backup file in
sequesnce u backed them up.
if u read books online then u will get more information related to this
topic.
HTH
from
Doller
Ben Nevarez wrote:
> Yes, at least -minimum- you will need full database and transaction log
> backups. Doing both full and transaction log backups will allow you to
> recover your database to a specific point in time, for example, a few
> seconds or minutes before your database failure.
> How often to do the backups? Depends on the size of the database and how
> long the backup would take. If possible, do nightly full backups. Also, take
> a look at differential backups.
> Once you decide your backup strategy, test and practice restoring your
> database, maybe on another server. That is the only way to know if your
> recovery strategy would work when you need it. Another good way to test is
> to use your backups for your development environment.
> Ben Nevarez
>
> "mizi" <haha@.haha.com> wrote in message
> news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> > Hi all. I'm not good at the database, but recently I build a website and
> > need to maintain it. I read some books but still don't know which way is
> > best for me to backup the database. What I want is I can restore data just
> > before the database was damaged. But it's difficult to me to understand
> > the
> > diffrences between database backup and transaction log backup. or do I
> > need
> > to do them both? please help, many thanks.
need to maintain it. I read some books but still don't know which way is
best for me to backup the database. What I want is I can restore data just
before the database was damaged. But it's difficult to me to understand the
diffrences between database backup and transaction log backup. or do I need
to do them both? please help, many thanks.Yes. To have the ability to do a point in time recovery you will need to
set the database recovery mode to Full and configure a backup strategy. You
can use the SQL Maintenance wizard. It works ok for most small to medium
size databases. Basically a Full backup is exactly as it implies. It's
everything as of the end (all data and commited data changes) of the backup.
Each full backup will contain a last lsn. A number that identifies the last
log sequence in the backup file. Each transaction log will have a first and
last lsn as well. In order to recover you will need cover a range of lsn
from the first lsn in the full to the lsn that contains the time at which
you wish to recover to. There can be no gaps in the number sequence.
Performing a new full backup from time to time say once per night means that
your recovery is simplier because you get a new first lsn. The transaction
logs that were run pior to the new full are generally not needed unless you
need to go back in time before the most recent full. Technically you only
need one full backup if you are willing to keep every transaction log backup
and restore all of them to the point of damage.
Bottom line is to decide just how much data can be lost with a failure. Say
15 minutes. Configure SQL maintenance to do a full during non peak time
once per day and backup transaction logs every 15 minutes.
"mizi" <haha@.haha.com> wrote in message
news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> Hi all. I'm not good at the database, but recently I build a website and
> need to maintain it. I read some books but still don't know which way is
> best for me to backup the database. What I want is I can restore data just
> before the database was damaged. But it's difficult to me to understand
> the
> diffrences between database backup and transaction log backup. or do I
> need
> to do them both? please help, many thanks.|||Yes, at least -minimum- you will need full database and transaction log
backups. Doing both full and transaction log backups will allow you to
recover your database to a specific point in time, for example, a few
seconds or minutes before your database failure.
How often to do the backups? Depends on the size of the database and how
long the backup would take. If possible, do nightly full backups. Also, take
a look at differential backups.
Once you decide your backup strategy, test and practice restoring your
database, maybe on another server. That is the only way to know if your
recovery strategy would work when you need it. Another good way to test is
to use your backups for your development environment.
Ben Nevarez
"mizi" <haha@.haha.com> wrote in message
news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> Hi all. I'm not good at the database, but recently I build a website and
> need to maintain it. I read some books but still don't know which way is
> best for me to backup the database. What I want is I can restore data just
> before the database was damaged. But it's difficult to me to understand
> the
> diffrences between database backup and transaction log backup. or do I
> need
> to do them both? please help, many thanks.|||Hi,
In a database there are two files datafile and transaction file.
In datafile all the transaction are saved when committed and in
transaction file all the information is stored what u are doing with
the database.
if u want to backup the database normal backup SQL server backup the
datafile(.mdf) and Transaction log(.Ldf) and creates a backup file with
extension.BAK.
If u database is small for ex:2 or 3 GB then u can have ur database
backup 2 or 3 times a day.
if ur database is big enough that u cannot backup the database so
frequently then u have to take a full backup and then tlog backup.
For transaction log backup the recovery mode of the database should not
be in simple mode.It should be in Full or Bulk.
Transaction log backup is not allowed in simple recovery mode.
So if ur server crashed then u can recover it till the last tlog
backup.
just restore the last backup and then all the tlog backup file in
sequesnce u backed them up.
if u read books online then u will get more information related to this
topic.
HTH
from
Doller
Ben Nevarez wrote:
> Yes, at least -minimum- you will need full database and transaction log
> backups. Doing both full and transaction log backups will allow you to
> recover your database to a specific point in time, for example, a few
> seconds or minutes before your database failure.
> How often to do the backups? Depends on the size of the database and how
> long the backup would take. If possible, do nightly full backups. Also, take
> a look at differential backups.
> Once you decide your backup strategy, test and practice restoring your
> database, maybe on another server. That is the only way to know if your
> recovery strategy would work when you need it. Another good way to test is
> to use your backups for your development environment.
> Ben Nevarez
>
> "mizi" <haha@.haha.com> wrote in message
> news:Xns97185D5E7AA8hahahahacom@.207.46.248.16...
> > Hi all. I'm not good at the database, but recently I build a website and
> > need to maintain it. I read some books but still don't know which way is
> > best for me to backup the database. What I want is I can restore data just
> > before the database was damaged. But it's difficult to me to understand
> > the
> > diffrences between database backup and transaction log backup. or do I
> > need
> > to do them both? please help, many thanks.
Saturday, February 25, 2012
Backup and Restore Anomaly
SQL Server 2000 SP4 build 2187
Not sure what is happening with SQL Server backup Internals, I am hoping you
can answer.
A scheduled job backups up database named "Wells" to a device which points
to a physical file as step 1. Same schedule job, step 2, then restores to
database WELLSCopy. The WELLSCopy database has always existed. This has been
working for a very long time. Now, its generating the following error.
Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
Database' :
Began Executing 2006-10-19 00:59:34
Msg 3141, Sev 16: The database to be restored was named 'Wells'.
Reissue the statement using the WITH REPLACE option to overwrite the
'WELLScopy'
database. [SQLSTATE 42000]
Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE
42000]
Here is the backup command and restore command.
BACKUP DATABASE [Wells] TO Dbackup_WELLS
WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
restore database CHARITYDBCOPY
from dbackup_charitydb
with
move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
I tried to duplicate this issue in our test environment and it restored
successfully every time. I did manage to break it by creating a new database
with a totally different name then try to restore over it and received the
error message.
BOL says it performs a safety check if the REPLACE options is not used. If
so, why has the restore work for a very long time and now decide to break.
Also, why is it allowing me to restore successfully in test without using th
e
REPLACE option.
I am so confused...
BOL...
When the REPLACE option is not specified, a safety check occurs (which
prevents overwriting a different database by accident). The safety check
ensures that the RESTORE DATABASE statement will not restore the database to
the current server if:
The database named in the RESTORE statement already exists on the current
server, and
The database name is different from the database name recorded in the backup
set.I applogize, I pasted my test restore code. Here is the correct version
RESTORE DATABASE WELLScopy
FROM Dbackup_wells
with
MOVE 'Wells_Data' TO 'e:\data\mssql\data\WELLScopy_Data.MDF',
MOVE 'WELLS_Log' TO 'e:\data\mssql\data\WELLScopy_Log.LDF'
go
"FredG" wrote:
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping y
ou
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has be
en
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTAT
E 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new databa
se
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using
the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database
to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the back
up
> set.
>|||A guess is that the source database has grown, so the backup need say 10GB f
or one of the database
files, but the existing database file only has, say, 8GB for that file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"FredG" <FredG@.discussions.microsoft.com> wrote in message
news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping y
ou
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has be
en
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTAT
E 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new databa
se
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using
the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database
to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the back
up
> set.
>|||Hi Tibor,
Thanks for the repsonse. We finally found the actual problem. Someone
restored the copy data outside of the normal job. Once we dropped and
recreated the job functioned as normal. Very strange behavior I must add.
"Tibor Karaszi" wrote:
> A guess is that the source database has grown, so the backup need say 10GB
for one of the database
> files, but the existing database file only has, say, 8GB for that file.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "FredG" <FredG@.discussions.microsoft.com> wrote in message
> news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
>
Not sure what is happening with SQL Server backup Internals, I am hoping you
can answer.
A scheduled job backups up database named "Wells" to a device which points
to a physical file as step 1. Same schedule job, step 2, then restores to
database WELLSCopy. The WELLSCopy database has always existed. This has been
working for a very long time. Now, its generating the following error.
Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
Database' :
Began Executing 2006-10-19 00:59:34
Msg 3141, Sev 16: The database to be restored was named 'Wells'.
Reissue the statement using the WITH REPLACE option to overwrite the
'WELLScopy'
database. [SQLSTATE 42000]
Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE
42000]
Here is the backup command and restore command.
BACKUP DATABASE [Wells] TO Dbackup_WELLS
WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
restore database CHARITYDBCOPY
from dbackup_charitydb
with
move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
I tried to duplicate this issue in our test environment and it restored
successfully every time. I did manage to break it by creating a new database
with a totally different name then try to restore over it and received the
error message.
BOL says it performs a safety check if the REPLACE options is not used. If
so, why has the restore work for a very long time and now decide to break.
Also, why is it allowing me to restore successfully in test without using th
e
REPLACE option.
I am so confused...
BOL...
When the REPLACE option is not specified, a safety check occurs (which
prevents overwriting a different database by accident). The safety check
ensures that the RESTORE DATABASE statement will not restore the database to
the current server if:
The database named in the RESTORE statement already exists on the current
server, and
The database name is different from the database name recorded in the backup
set.I applogize, I pasted my test restore code. Here is the correct version
RESTORE DATABASE WELLScopy
FROM Dbackup_wells
with
MOVE 'Wells_Data' TO 'e:\data\mssql\data\WELLScopy_Data.MDF',
MOVE 'WELLS_Log' TO 'e:\data\mssql\data\WELLScopy_Log.LDF'
go
"FredG" wrote:
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping y
ou
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has be
en
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTAT
E 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new databa
se
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using
the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database
to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the back
up
> set.
>|||A guess is that the source database has grown, so the backup need say 10GB f
or one of the database
files, but the existing database file only has, say, 8GB for that file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"FredG" <FredG@.discussions.microsoft.com> wrote in message
news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping y
ou
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has be
en
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTAT
E 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new databa
se
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using
the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database
to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the back
up
> set.
>|||Hi Tibor,
Thanks for the repsonse. We finally found the actual problem. Someone
restored the copy data outside of the normal job. Once we dropped and
recreated the job functioned as normal. Very strange behavior I must add.
"Tibor Karaszi" wrote:
> A guess is that the source database has grown, so the backup need say 10GB
for one of the database
> files, but the existing database file only has, say, 8GB for that file.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "FredG" <FredG@.discussions.microsoft.com> wrote in message
> news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
>
Backup and Restore Anomaly
SQL Server 2000 SP4 build 2187
Not sure what is happening with SQL Server backup Internals, I am hoping you
can answer.
A scheduled job backups up database named "Wells" to a device which points
to a physical file as step 1. Same schedule job, step 2, then restores to
database WELLSCopy. The WELLSCopy database has always existed. This has been
working for a very long time. Now, its generating the following error.
Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
Database' :
Began Executing 2006-10-19 00:59:34
Msg 3141, Sev 16: The database to be restored was named 'Wells'.
Reissue the statement using the WITH REPLACE option to overwrite the
'WELLScopy'
database. [SQLSTATE 42000]
Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
Here is the backup command and restore command.
BACKUP DATABASE [Wells] TO Dbackup_WELLS
WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
restore database CHARITYDBCOPY
from dbackup_charitydb
with
move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
I tried to duplicate this issue in our test environment and it restored
successfully every time. I did manage to break it by creating a new database
with a totally different name then try to restore over it and received the
error message.
BOL says it performs a safety check if the REPLACE options is not used. If
so, why has the restore work for a very long time and now decide to break.
Also, why is it allowing me to restore successfully in test without using the
REPLACE option.
I am so confused...
BOL...
When the REPLACE option is not specified, a safety check occurs (which
prevents overwriting a different database by accident). The safety check
ensures that the RESTORE DATABASE statement will not restore the database to
the current server if:
The database named in the RESTORE statement already exists on the current
server, and
The database name is different from the database name recorded in the backup
set.I applogize, I pasted my test restore code. Here is the correct version
RESTORE DATABASE WELLScopy
FROM Dbackup_wells
with
MOVE 'Wells_Data' TO 'e:\data\mssql\data\WELLScopy_Data.MDF',
MOVE 'WELLS_Log' TO 'e:\data\mssql\data\WELLScopy_Log.LDF'
go
"FredG" wrote:
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping you
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has been
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new database
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the backup
> set.
>|||A guess is that the source database has grown, so the backup need say 10GB for one of the database
files, but the existing database file only has, say, 8GB for that file.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"FredG" <FredG@.discussions.microsoft.com> wrote in message
news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping you
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has been
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new database
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the backup
> set.
>|||Hi Tibor,
Thanks for the repsonse. We finally found the actual problem. Someone
restored the copy data outside of the normal job. Once we dropped and
recreated the job functioned as normal. Very strange behavior I must add.
"Tibor Karaszi" wrote:
> A guess is that the source database has grown, so the backup need say 10GB for one of the database
> files, but the existing database file only has, say, 8GB for that file.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "FredG" <FredG@.discussions.microsoft.com> wrote in message
> news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
> > SQL Server 2000 SP4 build 2187
> >
> > Not sure what is happening with SQL Server backup Internals, I am hoping you
> > can answer.
> >
> > A scheduled job backups up database named "Wells" to a device which points
> > to a physical file as step 1. Same schedule job, step 2, then restores to
> > database WELLSCopy. The WELLSCopy database has always existed. This has been
> > working for a very long time. Now, its generating the following error.
> >
> > Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> > Database' :
> > Began Executing 2006-10-19 00:59:34
> > Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> > Reissue the statement using the WITH REPLACE option to overwrite the
> > 'WELLScopy'
> > database. [SQLSTATE 42000]
> > Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
> >
> >
> > Here is the backup command and restore command.
> > BACKUP DATABASE [Wells] TO Dbackup_WELLS
> > WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
> >
> >
> > restore database CHARITYDBCOPY
> > from dbackup_charitydb
> > with
> > move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> > move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
> >
> >
> > I tried to duplicate this issue in our test environment and it restored
> > successfully every time. I did manage to break it by creating a new database
> > with a totally different name then try to restore over it and received the
> > error message.
> >
> > BOL says it performs a safety check if the REPLACE options is not used. If
> > so, why has the restore work for a very long time and now decide to break.
> > Also, why is it allowing me to restore successfully in test without using the
> > REPLACE option.
> >
> > I am so confused...
> >
> > BOL...
> > When the REPLACE option is not specified, a safety check occurs (which
> > prevents overwriting a different database by accident). The safety check
> > ensures that the RESTORE DATABASE statement will not restore the database to
> > the current server if:
> > The database named in the RESTORE statement already exists on the current
> > server, and
> > The database name is different from the database name recorded in the backup
> > set.
> >
>
Not sure what is happening with SQL Server backup Internals, I am hoping you
can answer.
A scheduled job backups up database named "Wells" to a device which points
to a physical file as step 1. Same schedule job, step 2, then restores to
database WELLSCopy. The WELLSCopy database has always existed. This has been
working for a very long time. Now, its generating the following error.
Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
Database' :
Began Executing 2006-10-19 00:59:34
Msg 3141, Sev 16: The database to be restored was named 'Wells'.
Reissue the statement using the WITH REPLACE option to overwrite the
'WELLScopy'
database. [SQLSTATE 42000]
Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
Here is the backup command and restore command.
BACKUP DATABASE [Wells] TO Dbackup_WELLS
WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
restore database CHARITYDBCOPY
from dbackup_charitydb
with
move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
I tried to duplicate this issue in our test environment and it restored
successfully every time. I did manage to break it by creating a new database
with a totally different name then try to restore over it and received the
error message.
BOL says it performs a safety check if the REPLACE options is not used. If
so, why has the restore work for a very long time and now decide to break.
Also, why is it allowing me to restore successfully in test without using the
REPLACE option.
I am so confused...
BOL...
When the REPLACE option is not specified, a safety check occurs (which
prevents overwriting a different database by accident). The safety check
ensures that the RESTORE DATABASE statement will not restore the database to
the current server if:
The database named in the RESTORE statement already exists on the current
server, and
The database name is different from the database name recorded in the backup
set.I applogize, I pasted my test restore code. Here is the correct version
RESTORE DATABASE WELLScopy
FROM Dbackup_wells
with
MOVE 'Wells_Data' TO 'e:\data\mssql\data\WELLScopy_Data.MDF',
MOVE 'WELLS_Log' TO 'e:\data\mssql\data\WELLScopy_Log.LDF'
go
"FredG" wrote:
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping you
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has been
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new database
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the backup
> set.
>|||A guess is that the source database has grown, so the backup need say 10GB for one of the database
files, but the existing database file only has, say, 8GB for that file.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"FredG" <FredG@.discussions.microsoft.com> wrote in message
news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping you
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has been
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new database
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the backup
> set.
>|||Hi Tibor,
Thanks for the repsonse. We finally found the actual problem. Someone
restored the copy data outside of the normal job. Once we dropped and
recreated the job functioned as normal. Very strange behavior I must add.
"Tibor Karaszi" wrote:
> A guess is that the source database has grown, so the backup need say 10GB for one of the database
> files, but the existing database file only has, say, 8GB for that file.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "FredG" <FredG@.discussions.microsoft.com> wrote in message
> news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
> > SQL Server 2000 SP4 build 2187
> >
> > Not sure what is happening with SQL Server backup Internals, I am hoping you
> > can answer.
> >
> > A scheduled job backups up database named "Wells" to a device which points
> > to a physical file as step 1. Same schedule job, step 2, then restores to
> > database WELLSCopy. The WELLSCopy database has always existed. This has been
> > working for a very long time. Now, its generating the following error.
> >
> > Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> > Database' :
> > Began Executing 2006-10-19 00:59:34
> > Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> > Reissue the statement using the WITH REPLACE option to overwrite the
> > 'WELLScopy'
> > database. [SQLSTATE 42000]
> > Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
> >
> >
> > Here is the backup command and restore command.
> > BACKUP DATABASE [Wells] TO Dbackup_WELLS
> > WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
> >
> >
> > restore database CHARITYDBCOPY
> > from dbackup_charitydb
> > with
> > move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> > move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
> >
> >
> > I tried to duplicate this issue in our test environment and it restored
> > successfully every time. I did manage to break it by creating a new database
> > with a totally different name then try to restore over it and received the
> > error message.
> >
> > BOL says it performs a safety check if the REPLACE options is not used. If
> > so, why has the restore work for a very long time and now decide to break.
> > Also, why is it allowing me to restore successfully in test without using the
> > REPLACE option.
> >
> > I am so confused...
> >
> > BOL...
> > When the REPLACE option is not specified, a safety check occurs (which
> > prevents overwriting a different database by accident). The safety check
> > ensures that the RESTORE DATABASE statement will not restore the database to
> > the current server if:
> > The database named in the RESTORE statement already exists on the current
> > server, and
> > The database name is different from the database name recorded in the backup
> > set.
> >
>
Backup and Restore Anomaly
SQL Server 2000 SP4 build 2187
Not sure what is happening with SQL Server backup Internals, I am hoping you
can answer.
A scheduled job backups up database named "Wells" to a device which points
to a physical file as step 1. Same schedule job, step 2, then restores to
database WELLSCopy. The WELLSCopy database has always existed. This has been
working for a very long time. Now, its generating the following error.
Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
Database' :
Began Executing 2006-10-19 00:59:34
Msg 3141, Sev 16: The database to be restored was named 'Wells'.
Reissue the statement using the WITH REPLACE option to overwrite the
'WELLScopy'
database. [SQLSTATE 42000]
Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
Here is the backup command and restore command.
BACKUP DATABASE [Wells] TO Dbackup_WELLS
WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
restore database CHARITYDBCOPY
from dbackup_charitydb
with
move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
I tried to duplicate this issue in our test environment and it restored
successfully every time. I did manage to break it by creating a new database
with a totally different name then try to restore over it and received the
error message.
BOL says it performs a safety check if the REPLACE options is not used. If
so, why has the restore work for a very long time and now decide to break.
Also, why is it allowing me to restore successfully in test without using the
REPLACE option.
I am so confused...
BOL...
When the REPLACE option is not specified, a safety check occurs (which
prevents overwriting a different database by accident). The safety check
ensures that the RESTORE DATABASE statement will not restore the database to
the current server if:
The database named in the RESTORE statement already exists on the current
server, and
The database name is different from the database name recorded in the backup
set.
I applogize, I pasted my test restore code. Here is the correct version
RESTORE DATABASE WELLScopy
FROM Dbackup_wells
with
MOVE 'Wells_Data' TO 'e:\data\mssql\data\WELLScopy_Data.MDF',
MOVE 'WELLS_Log' TO 'e:\data\mssql\data\WELLScopy_Log.LDF'
go
"FredG" wrote:
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping you
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has been
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new database
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the backup
> set.
>
|||A guess is that the source database has grown, so the backup need say 10GB for one of the database
files, but the existing database file only has, say, 8GB for that file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"FredG" <FredG@.discussions.microsoft.com> wrote in message
news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping you
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has been
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new database
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the backup
> set.
>
|||Hi Tibor,
Thanks for the repsonse. We finally found the actual problem. Someone
restored the copy data outside of the normal job. Once we dropped and
recreated the job functioned as normal. Very strange behavior I must add.
"Tibor Karaszi" wrote:
> A guess is that the source database has grown, so the backup need say 10GB for one of the database
> files, but the existing database file only has, say, 8GB for that file.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "FredG" <FredG@.discussions.microsoft.com> wrote in message
> news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
>
Not sure what is happening with SQL Server backup Internals, I am hoping you
can answer.
A scheduled job backups up database named "Wells" to a device which points
to a physical file as step 1. Same schedule job, step 2, then restores to
database WELLSCopy. The WELLSCopy database has always existed. This has been
working for a very long time. Now, its generating the following error.
Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
Database' :
Began Executing 2006-10-19 00:59:34
Msg 3141, Sev 16: The database to be restored was named 'Wells'.
Reissue the statement using the WITH REPLACE option to overwrite the
'WELLScopy'
database. [SQLSTATE 42000]
Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
Here is the backup command and restore command.
BACKUP DATABASE [Wells] TO Dbackup_WELLS
WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
restore database CHARITYDBCOPY
from dbackup_charitydb
with
move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
I tried to duplicate this issue in our test environment and it restored
successfully every time. I did manage to break it by creating a new database
with a totally different name then try to restore over it and received the
error message.
BOL says it performs a safety check if the REPLACE options is not used. If
so, why has the restore work for a very long time and now decide to break.
Also, why is it allowing me to restore successfully in test without using the
REPLACE option.
I am so confused...
BOL...
When the REPLACE option is not specified, a safety check occurs (which
prevents overwriting a different database by accident). The safety check
ensures that the RESTORE DATABASE statement will not restore the database to
the current server if:
The database named in the RESTORE statement already exists on the current
server, and
The database name is different from the database name recorded in the backup
set.
I applogize, I pasted my test restore code. Here is the correct version
RESTORE DATABASE WELLScopy
FROM Dbackup_wells
with
MOVE 'Wells_Data' TO 'e:\data\mssql\data\WELLScopy_Data.MDF',
MOVE 'WELLS_Log' TO 'e:\data\mssql\data\WELLScopy_Log.LDF'
go
"FredG" wrote:
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping you
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has been
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new database
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the backup
> set.
>
|||A guess is that the source database has grown, so the backup need say 10GB for one of the database
files, but the existing database file only has, say, 8GB for that file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"FredG" <FredG@.discussions.microsoft.com> wrote in message
news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
> SQL Server 2000 SP4 build 2187
> Not sure what is happening with SQL Server backup Internals, I am hoping you
> can answer.
> A scheduled job backups up database named "Wells" to a device which points
> to a physical file as step 1. Same schedule job, step 2, then restores to
> database WELLSCopy. The WELLSCopy database has always existed. This has been
> working for a very long time. Now, its generating the following error.
> Job '0405 Backup and WELLSCopy Restore' : Step 3, 'Restore Wells Copy
> Database' :
> Began Executing 2006-10-19 00:59:34
> Msg 3141, Sev 16: The database to be restored was named 'Wells'.
> Reissue the statement using the WITH REPLACE option to overwrite the
> 'WELLScopy'
> database. [SQLSTATE 42000]
> Msg 3013, Sev 16: RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
>
> Here is the backup command and restore command.
> BACKUP DATABASE [Wells] TO Dbackup_WELLS
> WITH INIT, NOUNLOAD, NAME = N'Wells', SKIP, STATS=10, NOFORMAT
>
> restore database CHARITYDBCOPY
> from dbackup_charitydb
> with
> move 'CHARITYDB_Data' to 'o:\Data\CHARITYDBCOPY_Data.MDF',
> move 'CHARITYDB_Log' to 'o:\Data\CHARITYDBCOPY_Log.LDF'
>
> I tried to duplicate this issue in our test environment and it restored
> successfully every time. I did manage to break it by creating a new database
> with a totally different name then try to restore over it and received the
> error message.
> BOL says it performs a safety check if the REPLACE options is not used. If
> so, why has the restore work for a very long time and now decide to break.
> Also, why is it allowing me to restore successfully in test without using the
> REPLACE option.
> I am so confused...
> BOL...
> When the REPLACE option is not specified, a safety check occurs (which
> prevents overwriting a different database by accident). The safety check
> ensures that the RESTORE DATABASE statement will not restore the database to
> the current server if:
> The database named in the RESTORE statement already exists on the current
> server, and
> The database name is different from the database name recorded in the backup
> set.
>
|||Hi Tibor,
Thanks for the repsonse. We finally found the actual problem. Someone
restored the copy data outside of the normal job. Once we dropped and
recreated the job functioned as normal. Very strange behavior I must add.
"Tibor Karaszi" wrote:
> A guess is that the source database has grown, so the backup need say 10GB for one of the database
> files, but the existing database file only has, say, 8GB for that file.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "FredG" <FredG@.discussions.microsoft.com> wrote in message
> news:1D2AF5E1-9337-4F55-84EE-B4711171D7C9@.microsoft.com...
>
Friday, February 24, 2012
Backup and Move
SQL Nubie need to accomplish two things. 1. backup an SQL2000 db on old hardware. 2. Use backup to build same SQL2000 db onto new hardware, which will replace old hardware as main system. Running Win2000 server standard edition on old server and Win2003 server standard edition on new server. Old server does not have a tape backup, but it has a cd burner and access to a Novell corparate network -without any established Windows domains. Asking for much, hope someone can help. Some source material would go along way. ThanksDump the databases in a local file on your harddisk, using backup SQL statement.
Bcp out the main tables of the master DB.
Copy all these files into your CD and tranfer them in the new hardware.
Recreate a new MS-SQL server in the new machine
do you keep the original tree-architecture in your both machines ?
Bcp out the main tables of the master DB.
Copy all these files into your CD and tranfer them in the new hardware.
Recreate a new MS-SQL server in the new machine
do you keep the original tree-architecture in your both machines ?
Subscribe to:
Posts (Atom)