Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Sunday, March 25, 2012

Backup Error - Operating system error 1450

Hi,
Backing up 70Gb database to the network drive on the backup server. Was
working for long time until now. I think the database size is growing and
the OS cannot handle it. Error messages are as follows,
"Operating system error 1450(Insufficient system resources exist to complete
the requested service."
Looking at MS KB - http://support.microsoft.com/default.aspx/kb/304101
Not sure which server should add the registry key PoolUsageMaximum ? (On
backup server or SQL server ?)
Had set the registry key PoolUsageMaximum to 40 on backup server but no good.
Please advise !
in general, I think it's better to backup to a local disk. that way if the
network goes down during the backup, you still have a backup. when the
backup succeeds, you can copy it to the network share then delete the local
copy.
if you backup to the share only, you are toast if the network hiccups. then
you have data loss and are soon looking for a new job.
http://elsasoft.org
"Johnny" <Johnny@.discussions.microsoft.com> wrote in message
news:9BB1A66C-170D-49DE-9667-2AF306E75996@.microsoft.com...
> Hi,
> Backing up 70Gb database to the network drive on the backup server. Was
> working for long time until now. I think the database size is growing and
> the OS cannot handle it. Error messages are as follows,
> "Operating system error 1450(Insufficient system resources exist to
> complete
> the requested service."
> Looking at MS KB - http://support.microsoft.com/default.aspx/kb/304101
> Not sure which server should add the registry key PoolUsageMaximum ? (On
> backup server or SQL server ?)
> Had set the registry key PoolUsageMaximum to 40 on backup server but no
> good.
> Please advise !
>
>
>
>
|||I know it is highly recommended to backup SQL databases on local drive. This
working place is gradually changing the practice to do the right things but
takes times.
I really need to fix this issues right now.
Any solutions ?
"Jesse Hersch" wrote:

> in general, I think it's better to backup to a local disk. that way if the
> network goes down during the backup, you still have a backup. when the
> backup succeeds, you can copy it to the network share then delete the local
> copy.
> if you backup to the share only, you are toast if the network hiccups. then
> you have data loss and are soon looking for a new job.
> --
> http://elsasoft.org
>
> "Johnny" <Johnny@.discussions.microsoft.com> wrote in message
> news:9BB1A66C-170D-49DE-9667-2AF306E75996@.microsoft.com...
>
>

Backup Error - Operating system error 1450

Hi,
Backing up 70Gb database to the network drive on the backup server. Was
working for long time until now. I think the database size is growing and
the OS cannot handle it. Error messages are as follows,
"Operating system error 1450(Insufficient system resources exist to complete
the requested service."
Looking at MS KB - http://support.microsoft.com/default.aspx/kb/304101
Not sure which server should add the registry key PoolUsageMaximum ? (On
backup server or SQL server ?)
Had set the registry key PoolUsageMaximum to 40 on backup server but no good
.
Please advise !in general, I think it's better to backup to a local disk. that way if the
network goes down during the backup, you still have a backup. when the
backup succeeds, you can copy it to the network share then delete the local
copy.
if you backup to the share only, you are toast if the network hiccups. then
you have data loss and are soon looking for a new job.
http://elsasoft.org
"Johnny" <Johnny@.discussions.microsoft.com> wrote in message
news:9BB1A66C-170D-49DE-9667-2AF306E75996@.microsoft.com...
> Hi,
> Backing up 70Gb database to the network drive on the backup server. Was
> working for long time until now. I think the database size is growing and
> the OS cannot handle it. Error messages are as follows,
> "Operating system error 1450(Insufficient system resources exist to
> complete
> the requested service."
> Looking at MS KB - http://support.microsoft.com/default.aspx/kb/304101
> Not sure which server should add the registry key PoolUsageMaximum ? (On
> backup server or SQL server ?)
> Had set the registry key PoolUsageMaximum to 40 on backup server but no
> good.
> Please advise !
>
>
>
>|||I know it is highly recommended to backup SQL databases on local drive. Thi
s
working place is gradually changing the practice to do the right things but
takes times.
I really need to fix this issues right now.
Any solutions ?
"Jesse Hersch" wrote:

> in general, I think it's better to backup to a local disk. that way if th
e
> network goes down during the backup, you still have a backup. when the
> backup succeeds, you can copy it to the network share then delete the loca
l
> copy.
> if you backup to the share only, you are toast if the network hiccups. th
en
> you have data loss and are soon looking for a new job.
> --
> http://elsasoft.org
>
> "Johnny" <Johnny@.discussions.microsoft.com> wrote in message
> news:9BB1A66C-170D-49DE-9667-2AF306E75996@.microsoft.com...
>
>

Backup Error - Operating system error 1450

Hi,
Backing up 70Gb database to the network drive on the backup server. Was
working for long time until now. I think the database size is growing and
the OS cannot handle it. Error messages are as follows,
"Operating system error 1450(Insufficient system resources exist to complete
the requested service."
Looking at MS KB - http://support.microsoft.com/default.aspx/kb/304101
Not sure which server should add the registry key PoolUsageMaximum ? (On
backup server or SQL server ?)
Had set the registry key PoolUsageMaximum to 40 on backup server but no good.
Please advise !in general, I think it's better to backup to a local disk. that way if the
network goes down during the backup, you still have a backup. when the
backup succeeds, you can copy it to the network share then delete the local
copy.
if you backup to the share only, you are toast if the network hiccups. then
you have data loss and are soon looking for a new job. :)
--
http://elsasoft.org
"Johnny" <Johnny@.discussions.microsoft.com> wrote in message
news:9BB1A66C-170D-49DE-9667-2AF306E75996@.microsoft.com...
> Hi,
> Backing up 70Gb database to the network drive on the backup server. Was
> working for long time until now. I think the database size is growing and
> the OS cannot handle it. Error messages are as follows,
> "Operating system error 1450(Insufficient system resources exist to
> complete
> the requested service."
> Looking at MS KB - http://support.microsoft.com/default.aspx/kb/304101
> Not sure which server should add the registry key PoolUsageMaximum ? (On
> backup server or SQL server ?)
> Had set the registry key PoolUsageMaximum to 40 on backup server but no
> good.
> Please advise !
>
>
>
>|||I know it is highly recommended to backup SQL databases on local drive. This
working place is gradually changing the practice to do the right things but
takes times.
I really need to fix this issues right now.
Any solutions ?
"Jesse Hersch" wrote:
> in general, I think it's better to backup to a local disk. that way if the
> network goes down during the backup, you still have a backup. when the
> backup succeeds, you can copy it to the network share then delete the local
> copy.
> if you backup to the share only, you are toast if the network hiccups. then
> you have data loss and are soon looking for a new job. :)
> --
> http://elsasoft.org
>
> "Johnny" <Johnny@.discussions.microsoft.com> wrote in message
> news:9BB1A66C-170D-49DE-9667-2AF306E75996@.microsoft.com...
> > Hi,
> >
> > Backing up 70Gb database to the network drive on the backup server. Was
> > working for long time until now. I think the database size is growing and
> > the OS cannot handle it. Error messages are as follows,
> >
> > "Operating system error 1450(Insufficient system resources exist to
> > complete
> > the requested service."
> >
> > Looking at MS KB - http://support.microsoft.com/default.aspx/kb/304101
> >
> > Not sure which server should add the registry key PoolUsageMaximum ? (On
> > backup server or SQL server ?)
> > Had set the registry key PoolUsageMaximum to 40 on backup server but no
> > good.
> >
> > Please advise !
> >
> >
> >
> >
> >
> >
> >
>
>

BackUp error

I had a backup scheduled for a a time when people are using the website.
I got this error...
59System.Data.SqlClient.SqlException: General network error. Check your
network documentation
Shouldn't you be able to backup while people are using the database ?
It is about 4.5 Gigs in size -- would that make a difference ?
Thanks,
CraigThere is a timeout property that you need to increase.
It seems like backup in your case takes for a while and client
just doesn't wait til end of it.
Connection timeou
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatasqlclientsqlconnectionclassconnectionstringtopic.asp
Command timeou
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatasqlclientsqlcommandclasscommandtimeouttopic.asp
Regards.
"Craig HB" wrote:
> I had a backup scheduled for a a time when people are using the website.
> I got this error...
> 59System.Data.SqlClient.SqlException: General network error. Check your
> network documentation
> Shouldn't you be able to backup while people are using the database ?
> It is about 4.5 Gigs in size -- would that make a difference ?
> Thanks,
> Craig|||Hi
Yes you should be able to backup. General network error may mean that the
client is timing out, therefore you may want to increase the timeout or use a
scheduled task instead.
John
"Craig HB" wrote:
> I had a backup scheduled for a a time when people are using the website.
> I got this error...
> 59System.Data.SqlClient.SqlException: General network error. Check your
> network documentation
> Shouldn't you be able to backup while people are using the database ?
> It is about 4.5 Gigs in size -- would that make a difference ?
> Thanks,
> Craig|||Hi,
Yes, Backup is an online operation. Database size is not an issue for the
backup. Could you install SP3a or SP 4 (if not AWE enabled)
and try to do a backup again from Server machine Query analyzer (USE the
below command).
Backup database <dbname> to disk='d:\backup\dbname.bak' with init,stats=10
Thanks
Hari
SQL Server MVP
"Craig HB" <CraigHB@.discussions.microsoft.com> wrote in message
news:532C1A36-2C2E-4F06-B0F0-7F2342D144E6@.microsoft.com...
>I had a backup scheduled for a a time when people are using the website.
> I got this error...
> 59System.Data.SqlClient.SqlException: General network error. Check your
> network documentation
> Shouldn't you be able to backup while people are using the database ?
> It is about 4.5 Gigs in size -- would that make a difference ?
> Thanks,
> Craig

backup error

Hi all,
Sql server 7.0
I have backup job which takes the backup of the databases
at particular time once in a day. when i go to the
destination i can see the backup is taken and find
the .bak file in it. but i am getting the following error
message in sql error logs pls help me in identifying and
resolving this problem
BackupVirtualDeviceSet::Initialize: Open failure on backup
device 'BackupExecSqlAgent_Bas_BBC_PUND_00'. Operating
system error -2147024894(The system cannot find the file
specified.).
TIASeems you are using BackupExec. I suggest you discuss this when them, as the error suggests that SQL
Server cannot write to the virtual backup device...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"haseeb" <anonymous@.discussions.microsoft.com> wrote in message
news:b15001c499a2$4bdb4730$a601280a@.phx.gbl...
> Hi all,
> Sql server 7.0
> I have backup job which takes the backup of the databases
> at particular time once in a day. when i go to the
> destination i can see the backup is taken and find
> the .bak file in it. but i am getting the following error
> message in sql error logs pls help me in identifying and
> resolving this problem
> BackupVirtualDeviceSet::Initialize: Open failure on backup
> device 'BackupExecSqlAgent_Bas_BBC_PUND_00'. Operating
> system error -2147024894(The system cannot find the file
> specified.).
> TIA
>sql

Backup Error

Each time I run a backup the following error appears in
SQL Server's error log: Error: 4035, Severity: 10, State: 1
Can anyone help in explaining why I keep getting the above
error? Your help will be greatly appreciated.
Hi,
Can you run the backup command from query analyzer an check the status of
backup
Backup database <dbname> to disk='c:\backup\dbname.bak' with init
Which version of SQL Server you are running?
Thanks
Hari
MCDBA
"y_shoge@.yahoo.co.uk" <anonymous@.discussions.microsoft.com> wrote in message
news:24d5401c4601f$c79722c0$a301280a@.phx.gbl...
> Each time I run a backup the following error appears in
> SQL Server's error log: Error: 4035, Severity: 10, State: 1
> Can anyone help in explaining why I keep getting the above
> error? Your help will be greatly appreciated.
|||Hi,
I have run the backup command from query analyser and
still getting the same error.
I am running SQL Server 2000 Enterprise SP3.
Thanks
>--Original Message--
>Hi,
>Can you run the backup command from query analyzer an
check the status of
>backup
>Backup database <dbname> to disk='c:\backup\dbname.bak'
with init
>Which version of SQL Server you are running?
>
>--
>Thanks
>Hari
>MCDBA
>"y_shoge@.yahoo.co.uk"
<anonymous@.discussions.microsoft.com> wrote in message[vbcol=seagreen]
>news:24d5401c4601f$c79722c0$a301280a@.phx.gbl...
State: 1[vbcol=seagreen]
above
>
>.
>
|||Hi,
I feel this is just a informational message.
Can you validate the backup file by restoring it to a diffrent database.
After that run a DBCC CHECKDB on that
new database and confirm things are fine.
Thanks
Hari
MCDBA
"y_shoge@.yahoo.co.uk" <anonymous@.discussions.microsoft.com> wrote in message
news:251cb01c46024$c778ac00$a401280a@.phx.gbl...[vbcol=seagreen]
> Hi,
> I have run the backup command from query analyser and
> still getting the same error.
> I am running SQL Server 2000 Enterprise SP3.
> Thanks
> check the status of
> with init
> <anonymous@.discussions.microsoft.com> wrote in message
> State: 1
> above
|||Thanks Hari,
I have restored the backup file to another database and
ran the DBCC Checkdb against the restored database, it
returned no errors. Everything appears to be fine. I
guess I will have to ignore the error message for now.
Thank you very much for your help.
>--Original Message--
>Hi,
>I feel this is just a informational message.
>Can you validate the backup file by restoring it to a
diffrent database.
>After that run a DBCC CHECKDB on that
>new database and confirm things are fine.
>--
>Thanks
>Hari
>MCDBA
>"y_shoge@.yahoo.co.uk"
<anonymous@.discussions.microsoft.com> wrote in message[vbcol=seagreen]
>news:251cb01c46024$c778ac00$a401280a@.phx.gbl...
in
>
>.
>

backup error

Hi all,
Sql server 7.0
I have backup job which takes the backup of the databases
at particular time once in a day. when i go to the
destination i can see the backup is taken and find
the .bak file in it. but i am getting the following error
message in sql error logs pls help me in identifying and
resolving this problem
BackupVirtualDeviceSet::Initialize: Open failure on backup
device 'BackupExecSqlAgent_Bas_BBC_PUND_00'. Operating
system error -2147024894(The system cannot find the file
specified.).
TIA
Seems you are using BackupExec. I suggest you discuss this when them, as the error suggests that SQL
Server cannot write to the virtual backup device...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"haseeb" <anonymous@.discussions.microsoft.com> wrote in message
news:b15001c499a2$4bdb4730$a601280a@.phx.gbl...
> Hi all,
> Sql server 7.0
> I have backup job which takes the backup of the databases
> at particular time once in a day. when i go to the
> destination i can see the backup is taken and find
> the .bak file in it. but i am getting the following error
> message in sql error logs pls help me in identifying and
> resolving this problem
> BackupVirtualDeviceSet::Initialize: Open failure on backup
> device 'BackupExecSqlAgent_Bas_BBC_PUND_00'. Operating
> system error -2147024894(The system cannot find the file
> specified.).
> TIA
>
|||There is a timeout property that you need to increase.
It seems like backup in your case takes for a while and client
just doesn't wait til end of it.
Connection timeout
http://msdn.microsoft.com/library/de...tringtopic.asp
Command timeout
http://msdn.microsoft.com/library/de... outtopic.asp
Regards.
"Craig HB" wrote:

> I had a backup scheduled for a a time when people are using the website.
> I got this error...
> 59System.Data.SqlClient.SqlException: General network error. Check your
> network documentation
> Shouldn't you be able to backup while people are using the database ?
> It is about 4.5 Gigs in size -- would that make a difference ?
> Thanks,
> Craig

Thursday, March 22, 2012

BackUp error

I had a backup scheduled for a a time when people are using the website.
I got this error...
59System.Data.SqlClient.SqlException: General network error. Check your
network documentation
Shouldn't you be able to backup while people are using the database ?
It is about 4.5 Gigs in size -- would that make a difference ?
Thanks,
Craig
Hi
Yes you should be able to backup. General network error may mean that the
client is timing out, therefore you may want to increase the timeout or use a
scheduled task instead.
John
"Craig HB" wrote:

> I had a backup scheduled for a a time when people are using the website.
> I got this error...
> 59System.Data.SqlClient.SqlException: General network error. Check your
> network documentation
> Shouldn't you be able to backup while people are using the database ?
> It is about 4.5 Gigs in size -- would that make a difference ?
> Thanks,
> Craig
|||Hi,
Yes, Backup is an online operation. Database size is not an issue for the
backup. Could you install SP3a or SP 4 (if not AWE enabled)
and try to do a backup again from Server machine Query analyzer (USE the
below command).
Backup database <dbname> to disk='d:\backup\dbname.bak' with init,stats=10
Thanks
Hari
SQL Server MVP
"Craig HB" <CraigHB@.discussions.microsoft.com> wrote in message
news:532C1A36-2C2E-4F06-B0F0-7F2342D144E6@.microsoft.com...
>I had a backup scheduled for a a time when people are using the website.
> I got this error...
> 59System.Data.SqlClient.SqlException: General network error. Check your
> network documentation
> Shouldn't you be able to backup while people are using the database ?
> It is about 4.5 Gigs in size -- would that make a difference ?
> Thanks,
> Craig

Backup Error

Each time I run a backup the following error appears in
SQL Server's error log: Error: 4035, Severity: 10, State: 1
Can anyone help in explaining why I keep getting the above
error? Your help will be greatly appreciated.Hi,
Can you run the backup command from query analyzer an check the status of
backup
Backup database <dbname> to disk='c:\backup\dbname.bak' with init
Which version of SQL Server you are running?
Thanks
Hari
MCDBA
"y_shoge@.yahoo.co.uk" <anonymous@.discussions.microsoft.com> wrote in message
news:24d5401c4601f$c79722c0$a301280a@.phx
.gbl...
> Each time I run a backup the following error appears in
> SQL Server's error log: Error: 4035, Severity: 10, State: 1
> Can anyone help in explaining why I keep getting the above
> error? Your help will be greatly appreciated.|||Hi,
I have run the backup command from query analyser and
still getting the same error.
I am running SQL Server 2000 Enterprise SP3.
Thanks
>--Original Message--
>Hi,
>Can you run the backup command from query analyzer an
check the status of
>backup
>Backup database <dbname> to disk='c:\backup\dbname.bak'
with init
>Which version of SQL Server you are running?
>
>--
>Thanks
>Hari
>MCDBA
>"y_shoge@.yahoo.co.uk"
<anonymous@.discussions.microsoft.com> wrote in message
> news:24d5401c4601f$c79722c0$a301280a@.phx
.gbl...
State: 1[vbcol=seagreen]
above[vbcol=seagreen]
>
>.
>|||Hi,
I feel this is just a informational message.
Can you validate the backup file by restoring it to a diffrent database.
After that run a DBCC CHECKDB on that
new database and confirm things are fine.
--
Thanks
Hari
MCDBA
"y_shoge@.yahoo.co.uk" <anonymous@.discussions.microsoft.com> wrote in message
news:251cb01c46024$c778ac00$a401280a@.phx
.gbl...[vbcol=seagreen]
> Hi,
> I have run the backup command from query analyser and
> still getting the same error.
> I am running SQL Server 2000 Enterprise SP3.
> Thanks
> check the status of
> with init
> <anonymous@.discussions.microsoft.com> wrote in message
> State: 1
> above|||Thanks Hari,
I have restored the backup file to another database and
ran the DBCC Checkdb against the restored database, it
returned no errors. Everything appears to be fine. I
guess I will have to ignore the error message for now.
Thank you very much for your help.
>--Original Message--
>Hi,
>I feel this is just a informational message.
>Can you validate the backup file by restoring it to a
diffrent database.
>After that run a DBCC CHECKDB on that
>new database and confirm things are fine.
>--
>Thanks
>Hari
>MCDBA
>"y_shoge@.yahoo.co.uk"
<anonymous@.discussions.microsoft.com> wrote in message
> news:251cb01c46024$c778ac00$a401280a@.phx
.gbl...
in[vbcol=seagreen]
>
>.
>

BackUp error

I had a backup scheduled for a a time when people are using the website.
I got this error...
59System.Data.SqlClient.SqlException: General network error. Check your
network documentation
Shouldn't you be able to backup while people are using the database ?
It is about 4.5 Gigs in size -- would that make a difference ?
Thanks,
CraigHi
Yes you should be able to backup. General network error may mean that the
client is timing out, therefore you may want to increase the timeout or use
a
scheduled task instead.
John
"Craig HB" wrote:

> I had a backup scheduled for a a time when people are using the website.
> I got this error...
> 59System.Data.SqlClient.SqlException: General network error. Check your
> network documentation
> Shouldn't you be able to backup while people are using the database ?
> It is about 4.5 Gigs in size -- would that make a difference ?
> Thanks,
> Craig|||Hi,
Yes, Backup is an online operation. Database size is not an issue for the
backup. Could you install SP3a or SP 4 (if not AWE enabled)
and try to do a backup again from Server machine Query analyzer (USE the
below command).
Backup database <dbname> to disk='d:\backup\dbname.bak' with init,stats=10
Thanks
Hari
SQL Server MVP
"Craig HB" <CraigHB@.discussions.microsoft.com> wrote in message
news:532C1A36-2C2E-4F06-B0F0-7F2342D144E6@.microsoft.com...
>I had a backup scheduled for a a time when people are using the website.
> I got this error...
> 59System.Data.SqlClient.SqlException: General network error. Check your
> network documentation
> Shouldn't you be able to backup while people are using the database ?
> It is about 4.5 Gigs in size -- would that make a difference ?
> Thanks,
> Craig

Backup Device vs backup command

Hi,

Will backup get completed quickly (the time taken for backing up large databases) on backup device or using backup command? If backup device, why?

You are talking about 2 different things here. You use the backup command to backup the DB and the backup device to store the backed up files.

Unless I dont understand your question.

|||Hi Dinakar,

I need to know which one completes backup faster, backup device or by using backup command. I heard that backup device completes backup quicker than using backup command.

Thanks|||

It's the same procedure, whether you commit it via a GUI (window menu->next->next...) or command prompt (BACKUP command) it makes no difference.

In both cases you use a backup device to backup your database. If you are a learner you'll probably use the user friendly windows menu. If you are advanced you'll probably use the SQL command: BACKUP

|||

Have you checked the same on your environment?

IMHO I don't see much difference in between and it makes a lot of difference betwen normal disks & RAID based ones.

BTW do you have any issues in your environment for such behaviour, if so let us know.

|||Hi Satya,

Im using RAID disks, when backing up 200GB of database, backup device completes faster than backup command. A 30 min difference..

Thanks|||If SQL Server stripes physical devices that have different input/output (I/O) throughputs, SQL Server optimizes for speed. This means that faster devices receive more backup data that is written to disk than the slower device in the same period of time. In SQL Server 2000, regardless of the I/O throughput differences, SQL Server tries to distribute the backup data evenly to the devices. In this case, the slower disk may become a backup bottleneck in terms of performance. If increasing performance is your primary goal, you must avoid using the slow disk in striping and use disks with comparable throughputs instead.

Sunday, March 11, 2012

Backup database

I have couple of questions about backing up a database

1. How to create a backup file (using script) which only contain the data of a specific time range?

2. How to restore the database with serval backup files; for example, I got backup for june and july, how can I restore them into one mdf file which contains the data of both june and july.

3. how can I backup a database to a remote computer?

Thanks for your concern on my Qestions

hi,

Frankie wrote:

I have couple of questions about backing up a database

1. How to create a backup file (using script) which only contain the data of a specific time range?

2. How to restore the database with serval backup files; for example, I got backup for june and july, how can I restore them into one mdf file which contains the data of both june and july.

I do strongly suggest you to start reading about backup functionality in SQL Server starting from this overview, as it seems you really did not understand what a backup is

3. how can I backup a database to a remote computer?

this can be easely done, even if not directly recommended (at least not by me).. usually you perform a "local" backup and, later, you push or pull that backup remotely via scheduled tasks, or scripts or the like, in order not to load to much the SQL Server service with tasks not directly related to it's main activity.. anyway, you have to grant the account running SQL Server service enougth NTFS permissions on the remote share you are dealing with... in our case, SQLExpress usually runs under Local System, Local Service or Network Service builtin accounts, and you can not add remote permissions to these ones.. you have to define a domain account to use for the service and grant this one appropriate permissions (AD and NTFS) to complete the task on the remote share..

regards|||

In addition to Andrea, the transfer to normal UNC paths are not reliable, leading to the problem that the transfer could stop somewhere in the middle of the process, unless you use something like a SAN or NAS storage which has a much more reliable way for tranferring. Use the local copy to copy the files (e.g. usign Xcopy with a restartable copy process) to make sure the file was really copied).

Jens K. Suessmeyer

http://www.sqlserver2005.de

Backup data during production time

I need to take a data backup for 10 GB avery active database during
production time. Is it affect the server performance? generate locks....
thanks
Backup doesn't lock data or wais for locks. But it will consume resources (reading all data,
possibly from disk if not in cache and writing the data to backup media).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mecn" <mecn2002@.yahoo.com> wrote in message news:%231RMCKNtHHA.4600@.TK2MSFTNGP03.phx.gbl...
>I need to take a data backup for 10 GB avery active database during production time. Is it affect
>the server performance? generate locks....
> thanks
>

Backup data during production time

I need to take a data backup for 10 GB avery active database during
production time. Is it affect the server performance? generate locks....
thanksBackup doesn't lock data or wais for locks. But it will consume resources (reading all data,
possibly from disk if not in cache and writing the data to backup media).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mecn" <mecn2002@.yahoo.com> wrote in message news:%231RMCKNtHHA.4600@.TK2MSFTNGP03.phx.gbl...
>I need to take a data backup for 10 GB avery active database during production time. Is it affect
>the server performance? generate locks....
> thanks
>

Backup data during production time

I need to take a data backup for 10 GB avery active database during
production time. Is it affect the server performance? generate locks....
thanksBackup doesn't lock data or wais for locks. But it will consume resources (r
eading all data,
possibly from disk if not in cache and writing the data to backup media).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mecn" <mecn2002@.yahoo.com> wrote in message news:%231RMCKNtHHA.4600@.TK2MSFTNGP03.phx.gbl...

>I need to take a data backup for 10 GB avery active database during product
ion time. Is it affect
>the server performance? generate locks....
> thanks
>

backup 'creep'

SQL runs on a clustered server and during the week the time it takes for the
transactional backup slowly increases, and as it does it takes the majority
of the system resources. the backup is sent to a drive on a remote system.
In cluster admin if i take the service off-line and then back on-line it's
back to running fast again. THe transactional backups take ~1minute after a
off/on line and work their way to 7/8 minutes.
any suggestions?
Richard
Are you using any third part tools to do the backup? What is your memory
configuration like?
Andrew J. Kelly SQL MVP
"Richard Roche" <RichardRoche@.discussions.microsoft.com> wrote in message
news:93EE3C78-6686-4E18-A3BC-5B5A66EFB2A6@.microsoft.com...
> SQL runs on a clustered server and during the week the time it takes for
> the
> transactional backup slowly increases, and as it does it takes the
> majority
> of the system resources. the backup is sent to a drive on a remote
> system.
> In cluster admin if i take the service off-line and then back on-line it's
> back to running fast again. THe transactional backups take ~1minute after
> a
> off/on line and work their way to 7/8 minutes.
> any suggestions?
> --
> Richard
|||pretty standard maintainence plan from w/in SQL server; Agent; doing
transaction backups every 2 hours;
2gb memory on server; letting SQL manage it's memory desires
"Andrew J. Kelly" wrote:

> Are you using any third part tools to do the backup? What is your memory
> configuration like?
> --
> Andrew J. Kelly SQL MVP
>
> "Richard Roche" <RichardRoche@.discussions.microsoft.com> wrote in message
> news:93EE3C78-6686-4E18-A3BC-5B5A66EFB2A6@.microsoft.com...
>
>
|||Have you looked to see if you are doing any paging at the OS level and if
this increases when the log file time increases? Are you running any other
apps on this server? it almost sounds like you have a memory leak
somewhere. While this is rare these days it does happen, especially if you
are running xp's or dlls outside of sql server. Anything with XML by any
chance?
Andrew J. Kelly SQL MVP
"Richard Roche" <RichardRoche@.discussions.microsoft.com> wrote in message
news:65EFE346-1F7F-4036-B60A-1C939C19EC89@.microsoft.com...[vbcol=seagreen]
> pretty standard maintainence plan from w/in SQL server; Agent; doing
> transaction backups every 2 hours;
> 2gb memory on server; letting SQL manage it's memory desires
> "Andrew J. Kelly" wrote:
|||You might also want to have a look at
FIX: Performance decreases over time when you back up files in SQL Server
2000
http://support.microsoft.com/?kbid=824430
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Richard Roche" <RichardRoche@.discussions.microsoft.com> wrote in message
news:93EE3C78-6686-4E18-A3BC-5B5A66EFB2A6@.microsoft.com...
> SQL runs on a clustered server and during the week the time it takes for
> the
> transactional backup slowly increases, and as it does it takes the
> majority
> of the system resources. the backup is sent to a drive on a remote
> system.
> In cluster admin if i take the service off-line and then back on-line it's
> back to running fast again. THe transactional backups take ~1minute after
> a
> off/on line and work their way to 7/8 minutes.
> any suggestions?
> --
> Richard
|||Thanks Jasper. I was sure there was a KB on that but i could not find it
for some reason. I couldn't remember the exact reasons but remembered there
was a KB related to this.
Andrew J. Kelly SQL MVP
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:ORb9sAxAFHA.3016@.tk2msftngp13.phx.gbl...
> You might also want to have a look at
> FIX: Performance decreases over time when you back up files in SQL Server
> 2000
> http://support.microsoft.com/?kbid=824430
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Richard Roche" <RichardRoche@.discussions.microsoft.com> wrote in message
> news:93EE3C78-6686-4E18-A3BC-5B5A66EFB2A6@.microsoft.com...
>
|||I also remember a KB, and it was nearly two years ago. The long and the
short was run your backups locally, then use a script to "transfer" to the
remote storage. That way SQL Server does not have to handle the file
detatils in keeping a remote connection alive.
Larry
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23p08tGxAFHA.1392@.tk2msftngp13.phx.gbl...
> Thanks Jasper. I was sure there was a KB on that but i could not find it
> for some reason. I couldn't remember the exact reasons but remembered
> there was a KB related to this.
> --
> Andrew J. Kelly SQL MVP
>
> "Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
> news:ORb9sAxAFHA.3016@.tk2msftngp13.phx.gbl...
>

Thursday, March 8, 2012

backup and restoring

I used backup and restore to upgrade a database from sql 2000 to sql 2005. Is it necessary to create the mdf and ldf on the new server at the time of restore under options or should I copy them to the new server in the data folder? I am new and not quite sure what the log files hold.
Thanksif you have created a backup of a database, you don't need anything but the .bak file.

when you restore from a bak file, the data and log files will be created automatically by the server.|||Edit: You don't need to create them, the restore does.

How backup works:
When SQL Server backs up a database, it backs up the data file first. During the backup of the data file, no changes are written to the data file, only to the log. When the bacup of the data file is complete, the changes written to the log file is backed up. In other words, backup of a SQL Server restores to the point of time when the backup finished, not started. Furthermore, your log file will be used to keep track of transactions afer the backup have restored, so you will need the file.|||Ok. If I don't specify in options at the time of restore, I can't find where the the mdf and ldf files were created. And are these new mdf and ldf files or do they hold the same data as the database before they were created on the new server.
thanks|||this will tell you where they are:

exec sp_helpfile

Wednesday, March 7, 2012

backup and restore trouble.

Hello,
We want to do a restore to a point of time.
With recovery mode on full.
Can one do a restore to a point of time before the last full backup
with a transaction log backup made after the full backup ?
Sequence.
(full recovery mode, SQL-server 7. I think.).
a. Somewere in the past a full backup is made.
b. An error is made.
c. A full backup is made.
d. A transaction log backup is made.
We want to restore to a point in time just before
the error (b.) is made. Is this possible ?
(I have got the BOL (from 7) and inside from Kalen but
can not find the anwsers there).
Ben Brugman.> We want to do a restore to a point of time.
> With recovery mode on full.
> Sequence.
> (full recovery mode, SQL-server 7. I think.).
There is no FULL recovery mode in SQL 7. In SQL 7 and earlier versions,
the 'trunc. log on chkpt.' database option turned off is similar.
> a. Somewere in the past a full backup is made.
> b. An error is made.
> c. A full backup is made.
> d. A transaction log backup is made.
> We want to restore to a point in time just before
> the error (b.) is made. Is this possible ?
You can perform point-in-time recovery as follows:
1) Restore full database backup from step 'a' WITH NORECOVERY
2) Restore transaction log backup from step 'd' WITH STOPAT (time
before step 'b' error) and RECOVERY
Note that if you have any other log backups between 'a' and 'b', these
will need to be applied (WITH NORECOVERY) before step '2' above.
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"ben brugman" <ben@.niethier.nl> wrote in message
news:bkhf32$mlv$1@.reader10.wxs.nl...
> Hello,
> We want to do a restore to a point of time.
> With recovery mode on full.
> Can one do a restore to a point of time before the last full backup
> with a transaction log backup made after the full backup ?
> Sequence.
> (full recovery mode, SQL-server 7. I think.).
> a. Somewere in the past a full backup is made.
> b. An error is made.
> c. A full backup is made.
> d. A transaction log backup is made.
> We want to restore to a point in time just before
> the error (b.) is made. Is this possible ?
> (I have got the BOL (from 7) and inside from Kalen but
> can not find the anwsers there).
> Ben Brugman.
>|||Greg,
I too have been having problems with the restore to a point in time
and your sample script was useful in trying to come to grips with
this. All this seems to do though , is to restore the datbase to the
state it was in when it was backed up to a_bak1.bak.
I have managed to write a script to add 4 records to the database ,
then do a full backup to a_bak1, then add a few more records then do
another full backup and a transaction log backup. I now want to
restore to a point where I have only entered the first two records,
but all that seems to happen is that I am restored to the point of the
first full backup.
I have attached my script (which is heavily based on the one you
originally posted).
What am I doing wrong ?...it's been driving me mad for days !!
All help gratefully received .
Kind Regards,
Nigel
"Greg Linwood" <g_linwood@.hotmail.com> wrote in message news:<#sdQMP4fDHA.2464@.TK2MSFTNGP09.phx.gbl>...
> Hi Ben.
> Are you sure you're on SQL 7.0? The term "full recovery" only came along
> with SQL 2000...
> Anyway, this should be simple - restore the last good full backup without
> recovering, then apply the transaction log & stopat the appropriate time.
> Below is a demo script that should work on both 7.0 & 2000, whichever you're
> using. Follow it carefully & you should be able to see that this is
> possible. Note that the table t1 is populated with a row, which is then
> deleted between the two full backups. By performing a normal full database
> restore without recovery, then a log restore with recovery, you can get the
> point in time you're after.
> set nocount on
> go
> use master
> go
> create database a
> on (name=a_dat, filename='c:\a_dat.mdf', size=1mb, filegrowth=1mb)
> log on (name=a_log, filename='c:\a_log.ldf', size=1mb, filegrowth=1mb )
> go
> use a
> go
> create table t1 (c1 int)
> create table t2 (restoretime varchar(26))
> go
> /* insert a row into t1. we'll expect to see this row again after restore,
> despite it being deleted before full backup 2 */
> insert into t1 values (1)
> go
> use master
> go
> /* your full backup from whenever */
> backup database a to disk='c:\a_bak1.bak'
> go
> use a
> go
> /* insert a time into t2 that can be read as a stopat time accross batches
> */
> insert into t2 values (convert(varchar(26), getdate(), 9))
> go
> /* delay one minute */
> waitfor delay '00:01:00'
> go
> /* delete the row from t1. This represents the mistake we want to recover
> before.. */
> delete from t1
> go
> use master
> go
> /* your secondary, post mistake full backup */
> backup database a to disk='c:\a_bak2.bak'
> go
> /* your log backup */
> backup log a to disk='c:\a_bak3.bak'
> go
> /* we restore to point in time captured in t2. I'm only using t2 so we could
> record that point in time accross batches for the purposes of this example
> script */
> use a
> declare @.restoretime varchar(26)
> select @.restoretime = min(restoretime) from t2
> use master
> restore database a from disk='c:\a_bak1.bak' with norecovery
> restore log a from disk='c:\a_bak3.bak' with recovery, stopat = @.restoretime
> go
> use a
> go
> /* prove that the deleted row from t1 is restored */
> select * from t1
> go
> /* clean up */
> use master
> go
> drop database a
> go
> HTH
> Regards,
> Greg Linwood
> SQL Server MVP
> "ben brugman" <ben@.niethier.nl> wrote in message
> news:bkhf32$mlv$1@.reader10.wxs.nl...
> > Hello,
> >
> > We want to do a restore to a point of time.
> >
> > With recovery mode on full.
> > Can one do a restore to a point of time before the last full backup
> > with a transaction log backup made after the full backup ?
> >
> > Sequence.
> >
> > (full recovery mode, SQL-server 7. I think.).
> > a. Somewere in the past a full backup is made.
> > b. An error is made.
> > c. A full backup is made.
> > d. A transaction log backup is made.
> >
> > We want to restore to a point in time just before
> > the error (b.) is made. Is this possible ?
> > (I have got the BOL (from 7) and inside from Kalen but
> > can not find the anwsers there).
> >
> > Ben Brugman.
> >
> >|||Hi Nigel.
There's no attachment to your post. I'm not sure, but I think these might be
getting dropped by the news-servers at the moment, so please re-post with
your script in the body of your post & I'll look at the script & try to work
it out for you..
Don't email it to me as I have a strong filter on my email & you're not in
my address book, so you won't get through..
Regards,
Greg Linwood
SQL Server MVP
"NIgel Stallard" <Nigel_Stallard@.hotmail.com> wrote in message
news:26210f56.0310080734.53626df5@.posting.google.com...
> Greg,
> I too have been having problems with the restore to a point in time
> and your sample script was useful in trying to come to grips with
> this. All this seems to do though , is to restore the datbase to the
> state it was in when it was backed up to a_bak1.bak.
> I have managed to write a script to add 4 records to the database ,
> then do a full backup to a_bak1, then add a few more records then do
> another full backup and a transaction log backup. I now want to
> restore to a point where I have only entered the first two records,
> but all that seems to happen is that I am restored to the point of the
> first full backup.
> I have attached my script (which is heavily based on the one you
> originally posted).
> What am I doing wrong ?...it's been driving me mad for days !!
> All help gratefully received .
>
> Kind Regards,
> Nigel
> "Greg Linwood" <g_linwood@.hotmail.com> wrote in message
news:<#sdQMP4fDHA.2464@.TK2MSFTNGP09.phx.gbl>...
> > Hi Ben.
> >
> > Are you sure you're on SQL 7.0? The term "full recovery" only came along
> > with SQL 2000...
> >
> > Anyway, this should be simple - restore the last good full backup
without
> > recovering, then apply the transaction log & stopat the appropriate
time.
> > Below is a demo script that should work on both 7.0 & 2000, whichever
you're
> > using. Follow it carefully & you should be able to see that this is
> > possible. Note that the table t1 is populated with a row, which is then
> > deleted between the two full backups. By performing a normal full
database
> > restore without recovery, then a log restore with recovery, you can get
the
> > point in time you're after.
> >
> > set nocount on
> > go
> > use master
> > go
> > create database a
> > on (name=a_dat, filename='c:\a_dat.mdf', size=1mb, filegrowth=1mb)
> > log on (name=a_log, filename='c:\a_log.ldf', size=1mb, filegrowth=1mb )
> > go
> > use a
> > go
> > create table t1 (c1 int)
> > create table t2 (restoretime varchar(26))
> > go
> > /* insert a row into t1. we'll expect to see this row again after
restore,
> > despite it being deleted before full backup 2 */
> > insert into t1 values (1)
> > go
> > use master
> > go
> > /* your full backup from whenever */
> > backup database a to disk='c:\a_bak1.bak'
> > go
> > use a
> > go
> > /* insert a time into t2 that can be read as a stopat time accross
batches
> > */
> > insert into t2 values (convert(varchar(26), getdate(), 9))
> > go
> > /* delay one minute */
> > waitfor delay '00:01:00'
> > go
> > /* delete the row from t1. This represents the mistake we want to
recover
> > before.. */
> > delete from t1
> > go
> > use master
> > go
> > /* your secondary, post mistake full backup */
> > backup database a to disk='c:\a_bak2.bak'
> > go
> > /* your log backup */
> > backup log a to disk='c:\a_bak3.bak'
> > go
> > /* we restore to point in time captured in t2. I'm only using t2 so we
could
> > record that point in time accross batches for the purposes of this
example
> > script */
> > use a
> > declare @.restoretime varchar(26)
> > select @.restoretime = min(restoretime) from t2
> > use master
> > restore database a from disk='c:\a_bak1.bak' with norecovery
> > restore log a from disk='c:\a_bak3.bak' with recovery, stopat =@.restoretime
> > go
> > use a
> > go
> > /* prove that the deleted row from t1 is restored */
> > select * from t1
> > go
> > /* clean up */
> > use master
> > go
> > drop database a
> > go
> >
> > HTH
> >
> > Regards,
> > Greg Linwood
> > SQL Server MVP
> >
> > "ben brugman" <ben@.niethier.nl> wrote in message
> > news:bkhf32$mlv$1@.reader10.wxs.nl...
> > > Hello,
> > >
> > > We want to do a restore to a point of time.
> > >
> > > With recovery mode on full.
> > > Can one do a restore to a point of time before the last full backup
> > > with a transaction log backup made after the full backup ?
> > >
> > > Sequence.
> > >
> > > (full recovery mode, SQL-server 7. I think.).
> > > a. Somewere in the past a full backup is made.
> > > b. An error is made.
> > > c. A full backup is made.
> > > d. A transaction log backup is made.
> > >
> > > We want to restore to a point in time just before
> > > the error (b.) is made. Is this possible ?
> > > (I have got the BOL (from 7) and inside from Kalen but
> > > can not find the anwsers there).
> > >
> > > Ben Brugman.
> > >
> > >|||Hi Greg,
The script is as follows..I know its a terrible script, I'm having to
learn as I go with this..
---
set nocount on
go
use master
create database a
on (name=a_dat, filename='c:\a_dat.mdf', size=1Mb, filegrowth=1mb)
log on (name=a_log, filename='c:\a_log.ldf', size=1mb, filegrowth=1mb)
go
use a
go
create table t1 (c1 int, restoretime varchar(26))
create table t2 (restoretime varchar (26))
go
backup database a to disk='c:\a_bak0.bak'
go
insert into t1 values(1 , convert(varchar(26), getdate() , 9))
insert into t2 values(convert(varchar(26), getdate() , 9))
waitfor delay '00:00:05'
go
insert into t1 values(2 , convert(varchar(26), getdate() , 9))
insert into t2 values(convert(varchar(26), getdate() , 9))
waitfor delay '00:00:05'
go
insert into t1 values(3 , convert(varchar(26), getdate() , 9))
insert into t2 values(convert(varchar(26), getdate() , 9))
waitfor delay '00:00:05'
go
insert into t1 values(4 , convert(varchar(26), getdate() , 9))
insert into t2 values(convert(varchar(26), getdate() , 9))
waitfor delay '00:00:05'
go
use master
go
backup database a to disk='c:\a_bak1.bak'
go
use a
go
insert into t1 values(5 , convert(varchar(26), getdate() , 9))
insert into t2 values(convert(varchar(26), getdate() , 9))
go
waitfor delay '00:00:05'
insert into t1 values(6 , convert(varchar(26), getdate() , 9))
insert into t2 values(convert(varchar(26), getdate() , 9))
go
waitfor delay '00:00:05'
go
use master
go
backup database a to disk='c:\a_bak2.bak'
go
backup log a to disk='c:\a_bak3.bak'
go
use a
go
----
Basically I'm trying to prove to myself that I can decide to restore
back to any particular transaction, which I assume is what restore to
point in time is all about.
I think I understood your original example script, but as far as i
could see there was no need to use the transaction log as the database
would be put back to the desired point in time simply by restore the
first full backup.
Basically I'm trying to prove to myself that I can decide to restore
back to any particular transaction, which I assume is what restore to
point in time is all about.
What I am attempting to do is try to restore to the point just after
the 2nd or 3rd transaction.
Thanks for your interest in my problem, most appreciated..and thanks
for the quick response.
Nigel
"Greg Linwood" <g_linwood@.hotmail.com> wrote in message news:<OvviP5ejDHA.2000@.TK2MSFTNGP12.phx.gbl>...
> Hi Nigel.
> There's no attachment to your post. I'm not sure, but I think these might be
> getting dropped by the news-servers at the moment, so please re-post with
> your script in the body of your post & I'll look at the script & try to work
> it out for you..
> Don't email it to me as I have a strong filter on my email & you're not in
> my address book, so you won't get through..
> Regards,
> Greg Linwood
> SQL Server MVP
> "NIgel Stallard" <Nigel_Stallard@.hotmail.com> wrote in message
> news:26210f56.0310080734.53626df5@.posting.google.com...
> > Greg,
> >
> > I too have been having problems with the restore to a point in time
> > and your sample script was useful in trying to come to grips with
> > this. All this seems to do though , is to restore the datbase to the
> > state it was in when it was backed up to a_bak1.bak.
> >
> > I have managed to write a script to add 4 records to the database ,
> > then do a full backup to a_bak1, then add a few more records then do
> > another full backup and a transaction log backup. I now want to
> > restore to a point where I have only entered the first two records,
> > but all that seems to happen is that I am restored to the point of the
> > first full backup.
> > I have attached my script (which is heavily based on the one you
> > originally posted).
> >
> > What am I doing wrong ?...it's been driving me mad for days !!
> >
> > All help gratefully received .
> >
> >
> > Kind Regards,
> >
> > Nigel
> >
> > "Greg Linwood" <g_linwood@.hotmail.com> wrote in message
> news:<#sdQMP4fDHA.2464@.TK2MSFTNGP09.phx.gbl>...
> > > Hi Ben.
> > >
> > > Are you sure you're on SQL 7.0? The term "full recovery" only came along
> > > with SQL 2000...
> > >
> > > Anyway, this should be simple - restore the last good full backup
> without
> > > recovering, then apply the transaction log & stopat the appropriate
> time.
> > > Below is a demo script that should work on both 7.0 & 2000, whichever
> you're
> > > using. Follow it carefully & you should be able to see that this is
> > > possible. Note that the table t1 is populated with a row, which is then
> > > deleted between the two full backups. By performing a normal full
> database
> > > restore without recovery, then a log restore with recovery, you can get
> the
> > > point in time you're after.
> > >
> > > set nocount on
> > > go
> > > use master
> > > go
> > > create database a
> > > on (name=a_dat, filename='c:\a_dat.mdf', size=1mb, filegrowth=1mb)
> > > log on (name=a_log, filename='c:\a_log.ldf', size=1mb, filegrowth=1mb )
> > > go
> > > use a
> > > go
> > > create table t1 (c1 int)
> > > create table t2 (restoretime varchar(26))
> > > go
> > > /* insert a row into t1. we'll expect to see this row again after
> restore,
> > > despite it being deleted before full backup 2 */
> > > insert into t1 values (1)
> > > go
> > > use master
> > > go
> > > /* your full backup from whenever */
> > > backup database a to disk='c:\a_bak1.bak'
> > > go
> > > use a
> > > go
> > > /* insert a time into t2 that can be read as a stopat time accross
> batches
> > > */
> > > insert into t2 values (convert(varchar(26), getdate(), 9))
> > > go
> > > /* delay one minute */
> > > waitfor delay '00:01:00'
> > > go
> > > /* delete the row from t1. This represents the mistake we want to
> recover
> > > before.. */
> > > delete from t1
> > > go
> > > use master
> > > go
> > > /* your secondary, post mistake full backup */
> > > backup database a to disk='c:\a_bak2.bak'
> > > go
> > > /* your log backup */
> > > backup log a to disk='c:\a_bak3.bak'
> > > go
> > > /* we restore to point in time captured in t2. I'm only using t2 so we
> could
> > > record that point in time accross batches for the purposes of this
> example
> > > script */
> > > use a
> > > declare @.restoretime varchar(26)
> > > select @.restoretime = min(restoretime) from t2
> > > use master
> > > restore database a from disk='c:\a_bak1.bak' with norecovery
> > > restore log a from disk='c:\a_bak3.bak' with recovery, stopat => @.restoretime
> > > go
> > > use a
> > > go
> > > /* prove that the deleted row from t1 is restored */
> > > select * from t1
> > > go
> > > /* clean up */
> > > use master
> > > go
> > > drop database a
> > > go
> > >
> > > HTH
> > >
> > > Regards,
> > > Greg Linwood
> > > SQL Server MVP
> > >
> > > "ben brugman" <ben@.niethier.nl> wrote in message
> > > news:bkhf32$mlv$1@.reader10.wxs.nl...
> > > > Hello,
> > > >
> > > > We want to do a restore to a point of time.
> > > >
> > > > With recovery mode on full.
> > > > Can one do a restore to a point of time before the last full backup
> > > > with a transaction log backup made after the full backup ?
> > > >
> > > > Sequence.
> > > >
> > > > (full recovery mode, SQL-server 7. I think.).
> > > > a. Somewere in the past a full backup is made.
> > > > b. An error is made.
> > > > c. A full backup is made.
> > > > d. A transaction log backup is made.
> > > >
> > > > We want to restore to a point in time just before
> > > > the error (b.) is made. Is this possible ?
> > > > (I have got the BOL (from 7) and inside from Kalen but
> > > > can not find the anwsers there).
> > > >
> > > > Ben Brugman.
> > > >
> > > >|||Hi Greg,
Please ignore my last post. I have sorted out the problems with the
restore to a point in time. I have noticed however that when I try to
restore to a time which is later than the last entry in the
transaction log, the database is left in a loading state. I am using
SQL Server 2000 with SP3A installed, and according to MS knowledgebase
article 319697 this particular issue was fixed with SP3. It also
states that the problem was when using Enterprise Manager to carry out
the restore. I am using a script. Have you come across this problem
even when SP3 has been installed ?
Kind Regards,
Nigel
Nigel_Stallard@.hotmail.com (NIgel Stallard) wrote in message news:<26210f56.0310090259.664b6871@.posting.google.com>...
> Hi Greg,
> The script is as follows..I know its a terrible script, I'm having to
> learn as I go with this..
> ---
> set nocount on
> go
> use master
> create database a
> on (name=a_dat, filename='c:\a_dat.mdf', size=1Mb, filegrowth=1mb)
> log on (name=a_log, filename='c:\a_log.ldf', size=1mb, filegrowth=1mb)
> go
> use a
> go
> create table t1 (c1 int, restoretime varchar(26))
> create table t2 (restoretime varchar (26))
> go
> backup database a to disk='c:\a_bak0.bak'
> go
> insert into t1 values(1 , convert(varchar(26), getdate() , 9))
> insert into t2 values(convert(varchar(26), getdate() , 9))
> waitfor delay '00:00:05'
> go
> insert into t1 values(2 , convert(varchar(26), getdate() , 9))
> insert into t2 values(convert(varchar(26), getdate() , 9))
> waitfor delay '00:00:05'
> go
> insert into t1 values(3 , convert(varchar(26), getdate() , 9))
> insert into t2 values(convert(varchar(26), getdate() , 9))
> waitfor delay '00:00:05'
> go
> insert into t1 values(4 , convert(varchar(26), getdate() , 9))
> insert into t2 values(convert(varchar(26), getdate() , 9))
> waitfor delay '00:00:05'
> go
> use master
> go
> backup database a to disk='c:\a_bak1.bak'
> go
> use a
> go
> insert into t1 values(5 , convert(varchar(26), getdate() , 9))
> insert into t2 values(convert(varchar(26), getdate() , 9))
> go
> waitfor delay '00:00:05'
> insert into t1 values(6 , convert(varchar(26), getdate() , 9))
> insert into t2 values(convert(varchar(26), getdate() , 9))
> go
> waitfor delay '00:00:05'
> go
> use master
> go
> backup database a to disk='c:\a_bak2.bak'
> go
> backup log a to disk='c:\a_bak3.bak'
> go
> use a
> go
> ----
> Basically I'm trying to prove to myself that I can decide to restore
> back to any particular transaction, which I assume is what restore to
> point in time is all about.
> I think I understood your original example script, but as far as i
> could see there was no need to use the transaction log as the database
> would be put back to the desired point in time simply by restore the
> first full backup.
> Basically I'm trying to prove to myself that I can decide to restore
> back to any particular transaction, which I assume is what restore to
> point in time is all about.
> What I am attempting to do is try to restore to the point just after
> the 2nd or 3rd transaction.
> Thanks for your interest in my problem, most appreciated..and thanks
> for the quick response.
> Nigel
>
> "Greg Linwood" <g_linwood@.hotmail.com> wrote in message news:<OvviP5ejDHA.2000@.TK2MSFTNGP12.phx.gbl>...
> > Hi Nigel.
> >
> > There's no attachment to your post. I'm not sure, but I think these might be
> > getting dropped by the news-servers at the moment, so please re-post with
> > your script in the body of your post & I'll look at the script & try to work
> > it out for you..
> >
> > Don't email it to me as I have a strong filter on my email & you're not in
> > my address book, so you won't get through..
> >
> > Regards,
> > Greg Linwood
> > SQL Server MVP
> >
> > "NIgel Stallard" <Nigel_Stallard@.hotmail.com> wrote in message
> > news:26210f56.0310080734.53626df5@.posting.google.com...
> > > Greg,
> > >
> > > I too have been having problems with the restore to a point in time
> > > and your sample script was useful in trying to come to grips with
> > > this. All this seems to do though , is to restore the datbase to the
> > > state it was in when it was backed up to a_bak1.bak.
> > >
> > > I have managed to write a script to add 4 records to the database ,
> > > then do a full backup to a_bak1, then add a few more records then do
> > > another full backup and a transaction log backup. I now want to
> > > restore to a point where I have only entered the first two records,
> > > but all that seems to happen is that I am restored to the point of the
> > > first full backup.
> > > I have attached my script (which is heavily based on the one you
> > > originally posted).
> > >
> > > What am I doing wrong ?...it's been driving me mad for days !!
> > >
> > > All help gratefully received .
> > >
> > >
> > > Kind Regards,
> > >
> > > Nigel
> > >
> > > "Greg Linwood" <g_linwood@.hotmail.com> wrote in message
> news:<#sdQMP4fDHA.2464@.TK2MSFTNGP09.phx.gbl>...
> > > > Hi Ben.
> > > >
> > > > Are you sure you're on SQL 7.0? The term "full recovery" only came along
> > > > with SQL 2000...
> > > >
> > > > Anyway, this should be simple - restore the last good full backup
> without
> > > > recovering, then apply the transaction log & stopat the appropriate
> time.
> > > > Below is a demo script that should work on both 7.0 & 2000, whichever
> you're
> > > > using. Follow it carefully & you should be able to see that this is
> > > > possible. Note that the table t1 is populated with a row, which is then
> > > > deleted between the two full backups. By performing a normal full
> database
> > > > restore without recovery, then a log restore with recovery, you can get
> the
> > > > point in time you're after.
> > > >
> > > > set nocount on
> > > > go
> > > > use master
> > > > go
> > > > create database a
> > > > on (name=a_dat, filename='c:\a_dat.mdf', size=1mb, filegrowth=1mb)
> > > > log on (name=a_log, filename='c:\a_log.ldf', size=1mb, filegrowth=1mb )
> > > > go
> > > > use a
> > > > go
> > > > create table t1 (c1 int)
> > > > create table t2 (restoretime varchar(26))
> > > > go
> > > > /* insert a row into t1. we'll expect to see this row again after
> restore,
> > > > despite it being deleted before full backup 2 */
> > > > insert into t1 values (1)
> > > > go
> > > > use master
> > > > go
> > > > /* your full backup from whenever */
> > > > backup database a to disk='c:\a_bak1.bak'
> > > > go
> > > > use a
> > > > go
> > > > /* insert a time into t2 that can be read as a stopat time accross
> batches
> > > > */
> > > > insert into t2 values (convert(varchar(26), getdate(), 9))
> > > > go
> > > > /* delay one minute */
> > > > waitfor delay '00:01:00'
> > > > go
> > > > /* delete the row from t1. This represents the mistake we want to
> recover
> > > > before.. */
> > > > delete from t1
> > > > go
> > > > use master
> > > > go
> > > > /* your secondary, post mistake full backup */
> > > > backup database a to disk='c:\a_bak2.bak'
> > > > go
> > > > /* your log backup */
> > > > backup log a to disk='c:\a_bak3.bak'
> > > > go
> > > > /* we restore to point in time captured in t2. I'm only using t2 so we
> could
> > > > record that point in time accross batches for the purposes of this
> example
> > > > script */
> > > > use a
> > > > declare @.restoretime varchar(26)
> > > > select @.restoretime = min(restoretime) from t2
> > > > use master
> > > > restore database a from disk='c:\a_bak1.bak' with norecovery
> > > > restore log a from disk='c:\a_bak3.bak' with recovery, stopat => @.restoretime
> > > > go
> > > > use a
> > > > go
> > > > /* prove that the deleted row from t1 is restored */
> > > > select * from t1
> > > > go
> > > > /* clean up */
> > > > use master
> > > > go
> > > > drop database a
> > > > go
> > > >
> > > > HTH
> > > >
> > > > Regards,
> > > > Greg Linwood
> > > > SQL Server MVP
> > > >
> > > > "ben brugman" <ben@.niethier.nl> wrote in message
> > > > news:bkhf32$mlv$1@.reader10.wxs.nl...
> > > > > Hello,
> > > > >
> > > > > We want to do a restore to a point of time.
> > > > >
> > > > > With recovery mode on full.
> > > > > Can one do a restore to a point of time before the last full backup
> > > > > with a transaction log backup made after the full backup ?
> > > > >
> > > > > Sequence.
> > > > >
> > > > > (full recovery mode, SQL-server 7. I think.).
> > > > > a. Somewere in the past a full backup is made.
> > > > > b. An error is made.
> > > > > c. A full backup is made.
> > > > > d. A transaction log backup is made.
> > > > >
> > > > > We want to restore to a point in time just before
> > > > > the error (b.) is made. Is this possible ?
> > > > > (I have got the BOL (from 7) and inside from Kalen but
> > > > > can not find the anwsers there).
> > > > >
> > > > > Ben Brugman.
> > > > >
> > > > >|||I tried some restores to a point in time. What I experienced was
that I could not restore to before the first transaction log backup.
Could be that I did not use the correct procedure, but I tried
several way to restore to some points in time all times after
the first transaction log backup were possible none before.
My solution is do a transaction backup immediatly after you have
created a database. Then there is no problem.
Could be that your problem is similar ?
Can you confirm the above ?
Thanks for sharing your knowledge,
ben brugman
"NIgel Stallard" <Nigel_Stallard@.hotmail.com> wrote in message
news:26210f56.0310090757.2a60601a@.posting.google.com...
> Hi Greg,
> Please ignore my last post. I have sorted out the problems with the
> restore to a point in time. I have noticed however that when I try to
> restore to a time which is later than the last entry in the
> transaction log, the database is left in a loading state. I am using
> SQL Server 2000 with SP3A installed, and according to MS knowledgebase
> article 319697 this particular issue was fixed with SP3. It also
> states that the problem was when using Enterprise Manager to carry out
> the restore. I am using a script. Have you come across this problem
> even when SP3 has been installed ?
> Kind Regards,
> Nigel
> Nigel_Stallard@.hotmail.com (NIgel Stallard) wrote in message
news:<26210f56.0310090259.664b6871@.posting.google.com>...
> > Hi Greg,
> >
> > The script is as follows..I know its a terrible script, I'm having to
> > learn as I go with this..
> > ---
> > set nocount on
> > go
> > use master
> > create database a
> > on (name=a_dat, filename='c:\a_dat.mdf', size=1Mb, filegrowth=1mb)
> > log on (name=a_log, filename='c:\a_log.ldf', size=1mb, filegrowth=1mb)
> > go
> > use a
> > go
> > create table t1 (c1 int, restoretime varchar(26))
> > create table t2 (restoretime varchar (26))
> > go
> > backup database a to disk='c:\a_bak0.bak'
> > go
> > insert into t1 values(1 , convert(varchar(26), getdate() , 9))
> > insert into t2 values(convert(varchar(26), getdate() , 9))
> > waitfor delay '00:00:05'
> > go
> > insert into t1 values(2 , convert(varchar(26), getdate() , 9))
> > insert into t2 values(convert(varchar(26), getdate() , 9))
> > waitfor delay '00:00:05'
> > go
> > insert into t1 values(3 , convert(varchar(26), getdate() , 9))
> > insert into t2 values(convert(varchar(26), getdate() , 9))
> > waitfor delay '00:00:05'
> > go
> > insert into t1 values(4 , convert(varchar(26), getdate() , 9))
> > insert into t2 values(convert(varchar(26), getdate() , 9))
> > waitfor delay '00:00:05'
> > go
> > use master
> > go
> > backup database a to disk='c:\a_bak1.bak'
> > go
> > use a
> > go
> > insert into t1 values(5 , convert(varchar(26), getdate() , 9))
> > insert into t2 values(convert(varchar(26), getdate() , 9))
> > go
> > waitfor delay '00:00:05'
> > insert into t1 values(6 , convert(varchar(26), getdate() , 9))
> > insert into t2 values(convert(varchar(26), getdate() , 9))
> > go
> > waitfor delay '00:00:05'
> > go
> > use master
> > go
> > backup database a to disk='c:\a_bak2.bak'
> > go
> > backup log a to disk='c:\a_bak3.bak'
> > go
> > use a
> > go
> ----
> >
> > Basically I'm trying to prove to myself that I can decide to restore
> > back to any particular transaction, which I assume is what restore to
> > point in time is all about.
> >
> > I think I understood your original example script, but as far as i
> > could see there was no need to use the transaction log as the database
> > would be put back to the desired point in time simply by restore the
> > first full backup.
> >
> > Basically I'm trying to prove to myself that I can decide to restore
> > back to any particular transaction, which I assume is what restore to
> > point in time is all about.
> > What I am attempting to do is try to restore to the point just after
> > the 2nd or 3rd transaction.
> >
> > Thanks for your interest in my problem, most appreciated..and thanks
> > for the quick response.
> >
> > Nigel
> >
> >
> > "Greg Linwood" <g_linwood@.hotmail.com> wrote in message
news:<OvviP5ejDHA.2000@.TK2MSFTNGP12.phx.gbl>...
> > > Hi Nigel.
> > >
> > > There's no attachment to your post. I'm not sure, but I think these
might be
> > > getting dropped by the news-servers at the moment, so please re-post
with
> > > your script in the body of your post & I'll look at the script & try
to work
> > > it out for you..
> > >
> > > Don't email it to me as I have a strong filter on my email & you're
not in
> > > my address book, so you won't get through..
> > >
> > > Regards,
> > > Greg Linwood
> > > SQL Server MVP
> > >
> > > "NIgel Stallard" <Nigel_Stallard@.hotmail.com> wrote in message
> > > news:26210f56.0310080734.53626df5@.posting.google.com...
> > > > Greg,
> > > >
> > > > I too have been having problems with the restore to a point in time
> > > > and your sample script was useful in trying to come to grips with
> > > > this. All this seems to do though , is to restore the datbase to the
> > > > state it was in when it was backed up to a_bak1.bak.
> > > >
> > > > I have managed to write a script to add 4 records to the database ,
> > > > then do a full backup to a_bak1, then add a few more records then do
> > > > another full backup and a transaction log backup. I now want to
> > > > restore to a point where I have only entered the first two records,
> > > > but all that seems to happen is that I am restored to the point of
the
> > > > first full backup.
> > > > I have attached my script (which is heavily based on the one you
> > > > originally posted).
> > > >
> > > > What am I doing wrong ?...it's been driving me mad for days !!
> > > >
> > > > All help gratefully received .
> > > >
> > > >
> > > > Kind Regards,
> > > >
> > > > Nigel
> > > >
> > > > "Greg Linwood" <g_linwood@.hotmail.com> wrote in message
> > news:<#sdQMP4fDHA.2464@.TK2MSFTNGP09.phx.gbl>...
> > > > > Hi Ben.
> > > > >
> > > > > Are you sure you're on SQL 7.0? The term "full recovery" only came
along
> > > > > with SQL 2000...
> > > > >
> > > > > Anyway, this should be simple - restore the last good full backup
> > without
> > > > > recovering, then apply the transaction log & stopat the
appropriate
> > time.
> > > > > Below is a demo script that should work on both 7.0 & 2000,
whichever
> > you're
> > > > > using. Follow it carefully & you should be able to see that this
is
> > > > > possible. Note that the table t1 is populated with a row, which is
then
> > > > > deleted between the two full backups. By performing a normal full
> > database
> > > > > restore without recovery, then a log restore with recovery, you
can get
> > the
> > > > > point in time you're after.
> > > > >
> > > > > set nocount on
> > > > > go
> > > > > use master
> > > > > go
> > > > > create database a
> > > > > on (name=a_dat, filename='c:\a_dat.mdf', size=1mb, filegrowth=1mb)
> > > > > log on (name=a_log, filename='c:\a_log.ldf', size=1mb,
filegrowth=1mb )
> > > > > go
> > > > > use a
> > > > > go
> > > > > create table t1 (c1 int)
> > > > > create table t2 (restoretime varchar(26))
> > > > > go
> > > > > /* insert a row into t1. we'll expect to see this row again after
> > restore,
> > > > > despite it being deleted before full backup 2 */
> > > > > insert into t1 values (1)
> > > > > go
> > > > > use master
> > > > > go
> > > > > /* your full backup from whenever */
> > > > > backup database a to disk='c:\a_bak1.bak'
> > > > > go
> > > > > use a
> > > > > go
> > > > > /* insert a time into t2 that can be read as a stopat time accross
> > batches
> > > > > */
> > > > > insert into t2 values (convert(varchar(26), getdate(), 9))
> > > > > go
> > > > > /* delay one minute */
> > > > > waitfor delay '00:01:00'
> > > > > go
> > > > > /* delete the row from t1. This represents the mistake we want to
> > recover
> > > > > before.. */
> > > > > delete from t1
> > > > > go
> > > > > use master
> > > > > go
> > > > > /* your secondary, post mistake full backup */
> > > > > backup database a to disk='c:\a_bak2.bak'
> > > > > go
> > > > > /* your log backup */
> > > > > backup log a to disk='c:\a_bak3.bak'
> > > > > go
> > > > > /* we restore to point in time captured in t2. I'm only using t2
so we
> > could
> > > > > record that point in time accross batches for the purposes of this
> > example
> > > > > script */
> > > > > use a
> > > > > declare @.restoretime varchar(26)
> > > > > select @.restoretime = min(restoretime) from t2
> > > > > use master
> > > > > restore database a from disk='c:\a_bak1.bak' with norecovery
> > > > > restore log a from disk='c:\a_bak3.bak' with recovery, stopat => > @.restoretime
> > > > > go
> > > > > use a
> > > > > go
> > > > > /* prove that the deleted row from t1 is restored */
> > > > > select * from t1
> > > > > go
> > > > > /* clean up */
> > > > > use master
> > > > > go
> > > > > drop database a
> > > > > go
> > > > >
> > > > > HTH
> > > > >
> > > > > Regards,
> > > > > Greg Linwood
> > > > > SQL Server MVP
> > > > >
> > > > > "ben brugman" <ben@.niethier.nl> wrote in message
> > > > > news:bkhf32$mlv$1@.reader10.wxs.nl...
> > > > > > Hello,
> > > > > >
> > > > > > We want to do a restore to a point of time.
> > > > > >
> > > > > > With recovery mode on full.
> > > > > > Can one do a restore to a point of time before the last full
backup
> > > > > > with a transaction log backup made after the full backup ?
> > > > > >
> > > > > > Sequence.
> > > > > >
> > > > > > (full recovery mode, SQL-server 7. I think.).
> > > > > > a. Somewere in the past a full backup is made.
> > > > > > b. An error is made.
> > > > > > c. A full backup is made.
> > > > > > d. A transaction log backup is made.
> > > > > >
> > > > > > We want to restore to a point in time just before
> > > > > > the error (b.) is made. Is this possible ?
> > > > > > (I have got the BOL (from 7) and inside from Kalen but
> > > > > > can not find the anwsers there).
> > > > > >
> > > > > > Ben Brugman.
> > > > > >
> > > > > >

Backup and restore scripts

Any one have implemented backup, recovery stored procedures which
takes the uments for dbname, date, time ime and restores till that
time?
Look at http://www.winnetmag.com/Article/Art...09/42009.html. If
that's not enough, I can send you my script.
Quentin
"tram" <tram_e@.hotmail.com> wrote in message
news:26ee1067.0407080734.94bd55f@.posting.google.co m...
> Any one have implemented backup, recovery stored procedures which
> takes the uments for dbname, date, time ime and restores till that
> time?
|||Thanks for the reply. I am looking for centralized scripts where we
should able to able to restore any database by giving arguments as DB
name, time, standby restore/normal restore. We should able to run it
from centralized server. Any ideas?
"Quentin Ran" <ab@.who.com> wrote in message news:<uulGraTZEHA.2388@.TK2MSFTNGP11.phx.gbl>...[vbcol=seagreen]
> Look at http://www.winnetmag.com/Article/Art...09/42009.html. If
> that's not enough, I can send you my script.
> Quentin
>
> "tram" <tram_e@.hotmail.com> wrote in message
> news:26ee1067.0407080734.94bd55f@.posting.google.co m...

Backup and restore scripts

Any one have implemented backup, recovery stored procedures which
takes the uments for dbname, date, time ime and restores till that
time?Look at http://www.winnetmag.com/Article/ArticleID/42009/42009.html. If
that's not enough, I can send you my script.
Quentin
"tram" <tram_e@.hotmail.com> wrote in message
news:26ee1067.0407080734.94bd55f@.posting.google.com...
> Any one have implemented backup, recovery stored procedures which
> takes the uments for dbname, date, time ime and restores till that
> time?|||Thanks for the reply. I am looking for centralized scripts where we
should able to able to restore any database by giving arguments as DB
name, time, standby restore/normal restore. We should able to run it
from centralized server. Any ideas?
"Quentin Ran" <ab@.who.com> wrote in message news:<uulGraTZEHA.2388@.TK2MSFTNGP11.phx.gbl>...
> Look at http://www.winnetmag.com/Article/ArticleID/42009/42009.html. If
> that's not enough, I can send you my script.
> Quentin
>
> "tram" <tram_e@.hotmail.com> wrote in message
> news:26ee1067.0407080734.94bd55f@.posting.google.com...
> > Any one have implemented backup, recovery stored procedures which
> > takes the uments for dbname, date, time ime and restores till that
> > time?