Video Screencast Help
Scheduled Maintenance: Symantec Connect is scheduled to be down Saturday, April 19 from 10am to 2pm Pacific Standard Time (GMT: 5pm to 9pm) for server migration and upgrade.
Please accept our apologies in advance for any inconvenience this might cause.

SQL RESTORE NBU 7.5

Created: 22 Oct 2013 • Updated: 24 Oct 2013 | 12 comments
This issue has been solved. See solution.

i started sql restore 2 and 3 times from a full backup and all times it failed.

In the logs it was showing that file read failed error occured.

Then we change in script the database name  like below and then it was successful.

This was an alt client restore.

 

Database name was ario and in below script we mentioned ario_restore and it was successsful.Please let me know why it was ario_restore

 

script:

 

DATABASE "ario_restore" 

 


#  This is a template for the database MOVE command.

OPERATION RESTORE
OBJECTTYPE DATABASE
RESTORETYPE MOVE

#  Replace the database name in the following line with the name of the database that you
#  want to move to. Also remove the hash mark <#> which precedes the keyword <DATABASE>.

DATABASE "ario_restore"
#
#  Replace the file path #  with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>.
#  The target of the MOVE keyword must be "".
MOVE  "ario"
TO  "G:\ario.mdf"
#
#
#  Replace the file path <J#  with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>.
#  The target of the MOVE keyword must be ".
MOVE  "ario_log"
TO  "G:\ario.LDF"
#
# The following image is type: Full

Operating Systems:

Comments 12 CommentsJump to latest comment

Nagalla's picture

Did you stop activity on ario when you try the restore to the ario?

does ario is the live database...?

as per my understanding we can not do the restore to the DB when the DB is online.. that might be the reason the restore got failed with "read failure" when you try restore as ario.

when you select DATABASE "ario_restore", its a new Database.. so the restore got successfull... 

wr's picture

from the Symantec NetBackup™ for Microsoft SQL Server Administrator's Guide

 

Performing a database move
A database move lets you use a full set of backup images to copy an existing
database to a location under a different name.

 

For example, replace:
# Replace the database name in the following line with the name of the database you
# want to move to. Also remove the hash mark <#> which precedes the keyword
<DATABASE>.
##
DATABASE "DatabaseA"
with:
# Replace the database name in the following line with the name of the database you
# want to move to. Also remove the hash mark <#> which precedes the keyword
<DATABASE>.
#
DATABASE "DatabaseB"

Will Restore -- where there is a Will there is a way

Marianne's picture

Was the desitnation filename exactly the same on all 3 attempts? 
 "G:\ario.mdf" ?

If so, the reason for failure on 1st 2 attempts is because SQL needs a lot of time to create the database. Each subsequent attempt will go a bit further with file creation.
This means that 3rd attempt would have been successful even if you did not change database name.

We normally change Client Read Timeout to a minimum of 2 hours (7200) for SQL restores.

The need for long timeouts when doing restores is documented in NBU for SQL manual:  http://www.symantec.com/docs/DOC5173
 

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

noazara's picture

@Marianne:Yes .Path was same on on all attempts.

@Nagalla: We dont have any database with name as   : ario_restore.

Earlier we mentioned ario,then ran 2 and 3 times.It failed with error that file read failed.

 

When we change the database name to ario_restore in the restore script,It was successful.

 

 

 

Thanks

Noazara

noazara's picture

@Marianne:It was the same path throughout.

 

@Nagalla:ario_restore:There is no database with this name.

we are restoring ario database from A server to B server.On server B we dont have ario database.

When in restore scripts,i mentioned ario and ran the script,It failed.I ran it 2 to 3 times.It failed with read error.

 

Then it was successfull when ario was replaced by ario_restore in  DATABASE "ario_restore" 

 

Marianne's picture

Seems you only read the first line in my post and not the rest.

This is the rest of my post:

If so, the reason for failure on 1st 2 attempts is because SQL needs a lot of time to create the database. Each subsequent attempt will go a bit further with file creation.
This means that 3rd attempt would have been successful even if you did not change database name.

We normally change Client Read Timeout to a minimum of 2 hours (7200) for SQL restores.

The need for long timeouts when doing restores is documented in NBU for SQL manual:  http://www.symantec.com/docs/DOC5173
 

 

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

wr's picture

see my post above

use a different name for restoretype move

that's why it worked when you changed the name

Will Restore -- where there is a Will there is a way

noazara's picture

@Wr:But that different database name does not exist at all !!!!!!!!!!

Marianne's picture

Please read through my post again.

Any reason why you are ignoring it?

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

noazara's picture

Was the desitnation filename exactly the same on all 3 attempts? 
 "G:\ario.mdf" ?

If so, the reason for failure on 1st 2 attempts is because SQL needs a lot of time to create the database. Each subsequent attempt will go a bit further with file creation.
This means that 3rd attempt would have been successful even if you did not change database name.

We normally change Client Read Timeout to a minimum of 2 hours (7200) for SQL restores.

The need for long timeouts when doing restores is documented in NBU for SQL manual:  http://www.symantec.com/docs/DOC5173

 

 

Marianne I have read the post of urs.

 

1...So if i did not change the database name ,then it would have run the 3rd time?

2...if ario_restore database does not exist ,then what is the use of mentioning it in restore scripts?

Marianne's picture

1...So if i did not change the database name ,then it would have run the 3rd time?

You will have to do another test to know for sure.
My guess is Yes. I have seen this personally while assisting a customer with a restore and looking at the filename in Windows explorer. Each time the restore failed and was restarted, the file grew a bit bigger. That was many years ago and I learned that day about long timeouts. 
Have you had a look in the manual as suggested 2 days ago?
The manual will tell you how to calculate time needed for file initialization or how to avoid it with SQL 2005 and above.
Topic:

About minimizing timeout failures on large SQL Server database restores 

......
....
If you use SQL Server 2005 or later, you can eliminate file initialization during SQL Server restores.
See “About instant data file initialization” on page 52.

 

2...if ario_restore database does not exist ,then what is the use of mentioning it in restore scripts?

Speak to your SQL dba.
If memory serves me right, this is the name that will show up in the SQL Server Management Studio. 
The underlying filename does not have to be the same as the database name.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

SOLUTION