cancel
Showing results for 
Search instead for 
Did you mean: 

question on restore of SQL database

Rockitman
Level 4

I have version 12.5 running on a server running Microsoft SQL 2000.   We need a tape restore of a table in a database, as my Maintenance plan in SQL only retains the last 2 weeks of its database backups to disk.  I need something over a month old so Backup Exec will be my source.

 

I'm running the Restore wizard and I select the correct dated full backup of the SQL databases and then I select the particular database I'm looking to restore,  then it asks the question on how to handle restoration of existing files:   

a) Overwrite existing database?   

b)  Skip it, do not overwrite the file on disk   

c) Overwrite the file on disk only if it is older

So I'm a bit confused right now.   I ended up selecting option b because I certainly don't want to restore and overwrite the existing database.  I just want a copy of this older one so that I can look at a few things.     So I selected "skip it",  thinking it would be the option I want.

 

So I run the job and it fails.  here is what the job log states:

 

Job Failed:

V-79-65323-3101- An error occurred on a query to database FRESQL.

V-79-65323-3101 - Exclusive access could not be obtained because the database is in use.

 

I'm confused.   I just want a copy of a certain database,  without touching the existing one.    How do I go about doing this?

1 ACCEPTED SOLUTION

Accepted Solutions

CraigV
Moderator
Moderator
Partner    VIP    Accredited

...sarcasm much...?

AOFO = Advanced Open File Option...used by Backup Exec (BE) to snapshot files. If used with a database backup, it can cause some issues.

As for the stand-alone server, sorry for not picking that up. With regards to "the usual patching" of the server, it would be recommended by Symantec as a starting point normally if your patching isn't up to scratch/date.

The LTO2 drive wouldn't matter. If you can backup to it, you can restore from it. THe only time I would see this becoming an issue is if you had faulty tapes. You can check for tape errors by going to the Media tab in BE, and then clicking on a tape. In the window below you'll see hard read/write errors etc. Excessive errors COULD be a cause, but this would have to be verified.

View solution in original post

11 REPLIES 11

Ken_Putnam
Level 6

Create a new  (empty) database, then redirect the restore into that

Engineer_007
Level 3

Hello!

The issue can simply be resolved with the SQL re-direction option,

Where you will have to provide the name of the SQL server, Instance name (if the instance is the default instance then leave it blank and unchecked), and type name for the database to be restored. For E.g if your original database name is "XYZ" then you can use "Copy_xyz"

The reason we are using SQL re-direction is because we don't want to overwrite the existing database.

So all you need to do is mention the name of the same SQL server, and the new name for the database. and that should resolve your issue!

Please see the link below this will help you to resolve the issue.

http://www.symantec.com/business/support/index?page=content&id=TECH69212

Please don't forget to mark this as a solution.

Thanks!

Engineer_007
Level 3

Hello Please see the image below to resolve your issue..

Please Don't forget to mark This as a solution.

 

Thanks!

Rockitman
Level 4

Not a solution yet!  Man, this should not be this hard!   Did I ever say I detest Backup Exec and it's lack of simplicity?

I tried to set it up like you said but my restore job failed again with this:

An error occurred on a query to database "fresqlold".

The database to be restored was named "fresql".  Reissue the statement using the WITH REPLACE option to overwrite the "fresqlold" database.

 

What did I do wrong?   

I created a directory on the local D: drive of the server and called it "fresqlold".

I created a new database in Enterprise Manager called "fresqlold".

I created a Restore job and determined the correct backup tape and SQL backup.

I did the Redirect Microsoft Server sets and named the server, left the instance alone and unchecked as it is the default instance, and then type the path  D:\fresqlold in the Use This Path field.

 

HELP!

 

pkh
Moderator
Moderator
   VIP    Certified

I created a new database in Enterprise Manager called "fresqlold".

Did you direct the .mdf and the.ldf  to your fresqlold directory?

Since you have created the fresqlold database, leave the Use This Path field blank.

Rockitman
Level 4

I am very confused now.

I was told to create a new database.  I did.   I called it "fresqlold".

I was also told to use the Microsoft SQL Redirection on my restore.   I was told to check the "Use this path" option and enter the path for where the restore would send the database.    I created a directory off the local D: drive and called it   D:\fresqlold.

Am I doing something wrong here?   You are suggesting that since I've already created a new database,  that I don't need to check the "use this path" field, just to leave it blank.    Well then,  which other option am I to select in the Destination options?   The default option is "Use alternate drive C:",  another option is "use destination instance's default data directory.   

Which of these options am I to select?   I have to select something.

Engineer_007
Level 3

Hello!

Creating an empty database is not required, its optional...

Now since you have created the empty database then you will have to select the "Overwrite existing database" and "take database offline" Options.

My suggestion would be Do not create an empty database and run the restore job again with the new database name in the Re-direction option (Backup exec will automatically create the database)

Moreover you can see the event logs on the SQL server which will tell you the cause of the failure..

Thanks!

Rockitman
Level 4

Ok, I've done as you suggested.   I have deleted the "fresqlold" database.   I have reran the Restore and directed it to "fresqlold" database.  

The job failed again and this is the error from Backup Exec:  (It basically says the same thing in my Event Viewer Application log):

 

The database to be restored was named "fresql".  Reissue the statement using the WITH REPLACE option to overwrite the "fresqlold" database.

 

Reading this error makes no sense to me and obviously,  I'm still doing something wrong,  but what?

 

CraigV
Moderator
Moderator
Partner    VIP    Accredited

...First thing's first...if you are running AOFO with this job, disable AOFO. It isn't recommended with DB backups, and causes some issues with SQL (I have first-hand experience).

Otherwise, you can try the usual patching of the media server and rolling out any patches to the remote servers before trying it again.

Rockitman
Level 4

Dude,  you lost me on AOFO.   What is AOFO?  

And the usual patching of the media server?     What in the heck are you talking about?

This is a stand alone server and stand alone BE 12.5 installation on this server,  utilizing an LTO2 tape drive for the backups.

It doesn't get any simpler than this.   Your  suggestions have flown right over my head.

I'd call in a case with Symantec,  but I don't feel like sitting on hold for 3 hours to never get ahold of a tech!

 

CraigV
Moderator
Moderator
Partner    VIP    Accredited

...sarcasm much...?

AOFO = Advanced Open File Option...used by Backup Exec (BE) to snapshot files. If used with a database backup, it can cause some issues.

As for the stand-alone server, sorry for not picking that up. With regards to "the usual patching" of the server, it would be recommended by Symantec as a starting point normally if your patching isn't up to scratch/date.

The LTO2 drive wouldn't matter. If you can backup to it, you can restore from it. THe only time I would see this becoming an issue is if you had faulty tapes. You can check for tape errors by going to the Media tab in BE, and then clicking on a tape. In the window below you'll see hard read/write errors etc. Excessive errors COULD be a cause, but this would have to be verified.