-
restor from back up error
I usually use the following statement to restore a database and it work find. but now I got error. can anyone tell me why??
use master
go
RESTORE DATABASE sequences
FROM disk='H:\backup\sequences(Jun16).bak'
WITH REPLACE,
NORECOVERY
go
error
Server: Msg 4306, Level 16, State 1, Line 1
The preceding restore operation did not specify WITH NORECOVERY or WITH STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH STANDBY for all but the final step.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
________
Ford galaxie specifications
Last edited by sql; 03-06-2011 at 01:39 AM.
-
Are you peforming multiple restores? Is this your full script or is there more?
-
Do you try to restore from full db backup?
-
Hi all,
Thank you for the replies.
I found if my back up statement is
backup database sequences
to disk ='H:\backup\sequencesJun16.bak' then ican use
use master
go
RESTORE DATABASE sequences
FROM disk='H:\backup\sequencesJun16.bak'
WITH REPLACE to restore my database
but if I do the following back up statement
backup database sequences
to disk ='H:\backup\sequencesJun16.bak'
with description='sequences backup' ,
differential,
init,
stats=9
then when I try restore I got error as before. what mistake I made??
________
Extreme Q
Last edited by sql; 03-06-2011 at 01:39 AM.
-
hi
even
restore database sequences
from disk='H:\backup\sequencesJun17.bak'
with replace
Server: Msg 3101, Level 16, State 2, Line 1
Exclusive access could not be obtained because the database is in use.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
what is wrong
________
Toyota Ts010
Last edited by sql; 03-06-2011 at 01:39 AM.
-
That's a pretty clear error message I think. There is anybody connected to your database (an applciaiton, a user directly or yourself by having a query analyzer window open to the DB you want to restore).
-
As for the first question, you did a differential backup, not a full backup. Before you can restore the differential backup, you have to first restore the last full backup and any other differential backups between the full and that differential.
For the second question, andi_g69 told you the reason already. Run sp_who or sp_who2 to find out who is connected to the database. Use KILL to kill the connection if you have to. My guess will be that you find out that you're the one connected to it. To restore, there can only be 1 connection to the database, the one doing the restore.
One thing people often overlook is that when you have the Query Analyzer object explorer open, it has a connection open too. So if you close the query window or switch it to another database, the object explorer still has a connection open.
-
If you need restore from differential backups, have to use 'with norecovery' when restore full backup.
-
Hi all,
thank you fro the replies. My situation is . at small organization have a lot of medicat data. my duty is built an onlin database, allow use to do search, upload and download.
Now I don't have clean ideal at connections, is that true, if I leave the server open, lets said any one doing the search, or input, I can't restore my datbase?
I need more hit . please!!
________
Honda XR250R history
Last edited by sql; 03-06-2011 at 01:39 AM.
-
That is correct. That's where having more than 1 production SQL Server comes in real handy.
-
Hi thank you for reply.
but I did not find any insert action at that time, but I don't know the read action, for my letter knowledge, read action is not make any lack action.
I have Mysql 2000 + tomcate. allow how many connection at some time. can't let' ssaid 10 more people aceess the database at some time??
or what i need to improve???
Thank you
________
Gm Foods
Last edited by sql; 03-06-2011 at 01:40 AM.
-
It doesn't matter what types of actions are being done. If there is another connection to the database at all, even a connection that is idle doing nothing, it will fail.
-
Hi all,
thank you for the reply, I close my tomcat server then I can restore.
i still have questionat
1) on sql server how can I found out who connect to database?
2) why back up work ok and restore did not work when sb connect to rhis server can I got more information??
Thank you
________
Opel Vectra
Last edited by sql; 03-06-2011 at 01:40 AM.
-
1) Execute sp_who2 in Query Analyzer or look at Management --> Current Activity --> Process Info in Enterprise Manager
2) For Backup the process does only need read access to the tables.
For Restore the process needs write access. Imagine there is a user locking a record how should the restore process replace this record?
-
Hi all ,
Thank you for all the replies. I click my current activity, I got Process info, Locks /Process ID, locks/Object. I did read help in SQl , bu tstill not every sure on it , I need more information on database process. please introduce some useful link .
Thank you
________
Iolite vaporizer
Last edited by sql; 03-06-2011 at 01:40 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|