| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

07-01-09, 15:51
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Alpine Califormia
Posts: 1,695
|
|
|
Restore
|
|
Hi guys I know this is a Noob and silly question but I am trying to do a restore
and I am trying to do this corredtly. is this ok??
Code:
USE master
GO
RESTORE DATABASE <SoftWareTesterdb>
FROM DISK = N'<D:\Database\MSSQL\MSSQL.1\MSSQL\Backup\NonProductionDiff.bak'
WITH
FILE = 1,
NOUNLOAD,
REPLACE,
STATS = 10
GO
|
|

07-01-09, 17:13
|
|
Wage drone 24601
|
|
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,781
|
|
Remove the < from the path to the file.
|
|

07-01-09, 23:51
|
|
SQLTeam Scrub
|
|
Join Date: Nov 2002
Location: Jersey
Posts: 9,976
|
|
|
|
Have you tried filelistonly to look at the dump first?
|
|

07-07-09, 12:49
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Alpine Califormia
Posts: 1,695
|
|
Hi all I'm just practicing restoring. I deleted a table from the Adventureworks Database. Here is the statement I used. Any Advice
RESTORE DATABASE [AdventureWorks] FROM DISK = N'E:\TestBackup\NonProdFull' WITH FILE = 1, REPLACE, NOUNLOAD, STATS = 10
GO
here is message I got, hope I did this correctly
10 percent processed.
20 percent processed.
30 percent processed.
40 percent processed.
50 percent processed.
60 percent processed.
70 percent processed.
80 percent processed.
90 percent processed.
100 percent processed.
Processed 21432 pages for database 'AdventureWorks', file 'AdventureWorks_Data' on file 1.
Processed 2 pages for database 'AdventureWorks', file 'AdventureWorks_Log' on file 1.
RESTORE DATABASE successfully processed 21434 pages in 3.416 seconds (51.400 MB/sec).
|
|

07-07-09, 14:03
|
|
Wage drone 24601
|
|
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,781
|
|
The results look correct to me. Is your table back?
|
|

07-07-09, 14:50
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Alpine Califormia
Posts: 1,695
|
|
it sure is  I just wanted to make sure that is the correct restore process
|
|

07-08-09, 13:48
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Alpine Califormia
Posts: 1,695
|
|
I have another question when I did a restore from Differential I got this error message
Code:
RESTORE LOG [AdventureWorks] FROM DISK = N'E:\TestBackup\NonProdDiff' WITH FILE = 1, REPLACE, NOUNLOAD, STATS = 10
GO
Msg 3117, Level 16, State 4, Line 1
The log or differential backup cannot be restored because no files are ready to rollforward.
Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
|
|

07-08-09, 15:04
|
|
Wage drone 24601
|
|
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,781
|
|
Did you restore the full backup before with NORECOVERY?
|
|

07-08-09, 15:18
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Alpine Califormia
Posts: 1,695
|
|
No I didnt restore with the NORECOVERY
sorry I reread what you posted and that was all wrong LOL
|
Last edited by desireemm; 07-08-09 at 18:49.
|

07-08-09, 17:51
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Alpine Califormia
Posts: 1,695
|
|
ok did a restore with NoRecovery and here is the message I got, looks like the log is too recent to apply to the database.
10 percent processed.
20 percent processed.
30 percent processed.
40 percent processed.
50 percent processed.
60 percent processed.
70 percent processed.
80 percent processed.
90 percent processed.
100 percent processed.
Processed 21432 pages for database 'AdventureWorks', file 'AdventureWorks_Data' on file 1.
Processed 2 pages for database 'AdventureWorks', file 'AdventureWorks_Log' on file 1.
RESTORE DATABASE successfully processed 21434 pages in 3.333 seconds (52.680 MB/sec).
Msg 4305, Level 16, State 1, Line 3
The log in this backup set begins at LSN 57000000030400034, which is too recent to apply to the database. An earlier log backup that includes LSN 57000000028000001 can be restored.
Msg 3013, Level 16, State 1, Line 3
RESTORE LOG is terminating abnormally.
|
|

07-08-09, 21:11
|
|
SQL Server Street Fighter
|
|
Join Date: Nov 2004
Location: Down The Rabbit Hole
Posts: 7,766
|
|
I think you are missing a t-log back between the time of the database backup and the time of the t-log you tried to apply.
__________________
software development is where smart people go to waste their lives
|
|

07-09-09, 12:19
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Alpine Califormia
Posts: 1,695
|
|
|
|

07-10-09, 13:19
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Alpine Califormia
Posts: 1,695
|
|
|
|

07-10-09, 13:19
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Alpine Califormia
Posts: 1,695
|
|
sorry i posted twice my mistake
|
Last edited by desireemm; 07-10-09 at 13:23.
|

07-10-09, 15:16
|
|
Wage drone 24601
|
|
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,781
|
|
When you do a restore, you need to kick everyone out of that database, or else they will hold a lock on that database. What I do, is set the database to RESTRICTED_USER, before a restore, just to make sure that no non-admin user can get in. You can also set the database OFFLINE, if you have some applications that for reasons beyond your control are running as administrators. Remember to use the WITH ROLLBACK IMMEDIATE option, as well. Otherwise, you have to wait for the users to politely finish up.
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|