Code Snippet
TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server 'MS-DB'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Could not redo log record (805:390:13), for transaction ID (0:55765), on page (1:1061), database 'aws' (database ID 5). Page: LSN = (804:451:25), type = 2. Log: OpCode = 2, context 3, PrevPageLSN: (805:150:13). Restore from a backup of the database, or repair the database.
During redoing of a logged operation in database 'aws', an error occurred at log record ID (805:390:13). Typically, the specific failure is previously logged as an error in the Windows Event Log service. Restore the database from a full backup, or repair the database.
Could not open new database 'aws'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 3456)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=3456&LinkId=20476
BUTTONS:
OK
HELP ME!!try to attach only the mdf file of your database.
run a command like this :
create database yourdb on (name =yourdb, filename='C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\yourmdffile.mdf') for attach
If it doesn't work do what your message say
|||Don't work...
The message....
Code Snippet
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'aws'. CREATE DATABASE is aborted.
Msg 3456, Level 21, State 1, Line 1
Could not redo log record (805:390:13), for transaction ID (0:55765), on page (1:1061), database 'aws' (database ID 5). Page: LSN = (804:451:25), type = 2. Log: OpCode = 2, context 3, PrevPageLSN: (805:150:13). Restore from a backup of the database, or repair the database.
Msg 3313, Level 21, State 2, Line 1
During redoing of a logged operation in database 'aws', an error occurred at log record ID (805:390:13). Typically, the specific failure is previously logged as an error in the Windows Event Log service. Restore the database from a full backup, or repair the database.
|||A last try :
when i said to attach only the mdf file i thaught to following thing:
don't use the log file when making the operation of attaching (put only de mdf file in the folder); so , SQL should recreate the log file.
|||Ok,
I try this...
and
Code Snippet
File activation failure. The physical file name "c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\aws_log.ldf" may be incorrect.
The log cannot be rebuilt because the database was not cleanly shut down.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'aws'. CREATE DATABASE is aborted.
|||If you have not a backup try to recover with third party. It say :
"Selective recovery means repairing only those transactions and objects that are damaged" Maybe they can help you.
To the other part you have to review the procedures of using servers in your organization (using UPS etc) because "the database was not cleanly shutdown"
|||As your db was not cleanly shut down you can perform as below
(a) Create a database with the same name in another directory as the one you're trying to attach
(b) Re-create all filesgroups and files as necessary
(c) Shutdown the server
(d) Swap in the old mdf file and any ndf files
(e) Bring up the server and let the database attempt to be recovered and then go into suspect
(f) Put the database in single-user mode.
(g) Run DBCC CHECKDB (dbname, REPAIR_ALLOW_DATA_LOSS) which will rebuild the log and run full repair
(h) Return database to online, multi-user mode.
As your db was not cleanly shut down you can perform as below
ok(a) Create a database with the same name in another directory as the one you're trying to attach
ok(b) Re-create all filesgroups and files as necessary
ok(c) Shutdown the server
ok(d) Swap in the old mdf file and any ndf files
ok(e) Bring up the server and let the database attempt to be recovered and then go into suspect
(f) Put the database in single-user mode.
Well
I cant put the database in single-user mode, i receive this message whend i did this commands...
Commands:
Use aws
go
sp_dboption 'aws', 'dbo use only', false
go
sp_dboption 'aws','single_user', true
go
dbcc checkdb ('aws',repair_allow_data_loss)
aws is my DB
Message:
Msg 926, Level 14, State 1, Line 1
Database 'aws' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.
Msg 926, Level 14, State 1, Line 1
Database 'aws' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
sp_dboption command failed.
Msg 3456, Level 21, State 1, Line 1
Could not redo log record (805:390:13), for transaction ID (0:55765), on page (1:1061), database 'aws' (database ID 5). Page: LSN = (804:451:25), type = 2. Log: OpCode = 2, context 3, PrevPageLSN: (805:150:13). Restore from a backup of the database, or repair the database.
Msg 3313, Level 21, State 2, Line 1
During redoing of a logged operation in database 'aws', an error occurred at log record ID (805:390:13). Typically, the specific failure is previously logged as an error in the Windows Event Log service. Restore the database from a full backup, or repair the database.
Msg 3414, Level 21, State 1, Line 1
An error occurred during recovery, preventing the database 'aws' (database ID 5) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.
===================
Then i put the server in Single User mode and execute the command below: ( -m -c )
DBCC CHECKDB (aws, REPAIR_ALLOW_DATA_LOSS)
and receive this message:
Msg 926, Level 14, State 1, Line 1
Database 'aws' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.
======
Well
The DB was atach again, but i cant recovery the data =(
No comments:
Post a Comment