I have a database file that someone copied from a computer before they
formated that computer. (I know all about how to backup the database properly
and why you should verify backups are good, but it was not me and I am trying
to help this person recover as much data as possible).
Whenever I try to attach the 2005 database to a new SQL 2005 install I get a
tornpage error. My guess is that the database file was corrupted in the copy
and not repairable, but I would like to atleast try to do the
recover_with_data_loss option. The problem is that I can never get the
database to attach so that it is possible to run the dbcc checkdb.
My question is, is it possible to either repair the database unattached or
is there a way get the database attached enough for me to be able to run the
repair utility?
Thanks
btw, the error is
SQL Server detected a logical consistency-based I/O error: torn page
(expected signature: 0x55555555; actual signature: 0xa6c59cbd). It occurred
during a read of page (1:20635) in database ID 15 at offset 0x0000000a136000
in file 'C:\New Folder\StoreInfo.mdf'. Additional messages in the SQL Server
error log or system event log may provide more detail. This is a severe error
condition that threatens database integrity and must be corrected
immediately. Complete a full database consistency check (DBCC CHECKDB). This
error can be caused by many factors; for more information, see SQL Server
Books Online.
Could not open new database 'StoreInfo'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 824)
Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts
Wednesday, March 7, 2012
repairing an unattached SQL 2005 DB
repairing an unattached SQL 2005 DB
I have a database file that someone copied from a computer before they
formated that computer. (I know all about how to backup the database properl
y
and why you should verify backups are good, but it was not me and I am tryin
g
to help this person recover as much data as possible).
Whenever I try to attach the 2005 database to a new SQL 2005 install I get a
tornpage error. My guess is that the database file was corrupted in the cop
y
and not repairable, but I would like to atleast try to do the
recover_with_data_loss option. The problem is that I can never get the
database to attach so that it is possible to run the dbcc checkdb.
My question is, is it possible to either repair the database unattached or
is there a way get the database attached enough for me to be able to run the
repair utility?
Thanksbtw, the error is
SQL Server detected a logical consistency-based I/O error: torn page
(expected signature: 0x55555555; actual signature: 0xa6c59cbd). It occurred
during a read of page (1:20635) in database ID 15 at offset 0x0000000a136000
in file 'C:\New Folder\StoreInfo.mdf'. Additional messages in the SQL Serve
r
error log or system event log may provide more detail. This is a severe erro
r
condition that threatens database integrity and must be corrected
immediately. Complete a full database consistency check (DBCC CHECKDB). This
error can be caused by many factors; for more information, see SQL Server
Books Online.
Could not open new database 'StoreInfo'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 824)
formated that computer. (I know all about how to backup the database properl
y
and why you should verify backups are good, but it was not me and I am tryin
g
to help this person recover as much data as possible).
Whenever I try to attach the 2005 database to a new SQL 2005 install I get a
tornpage error. My guess is that the database file was corrupted in the cop
y
and not repairable, but I would like to atleast try to do the
recover_with_data_loss option. The problem is that I can never get the
database to attach so that it is possible to run the dbcc checkdb.
My question is, is it possible to either repair the database unattached or
is there a way get the database attached enough for me to be able to run the
repair utility?
Thanksbtw, the error is
SQL Server detected a logical consistency-based I/O error: torn page
(expected signature: 0x55555555; actual signature: 0xa6c59cbd). It occurred
during a read of page (1:20635) in database ID 15 at offset 0x0000000a136000
in file 'C:\New Folder\StoreInfo.mdf'. Additional messages in the SQL Serve
r
error log or system event log may provide more detail. This is a severe erro
r
condition that threatens database integrity and must be corrected
immediately. Complete a full database consistency check (DBCC CHECKDB). This
error can be caused by many factors; for more information, see SQL Server
Books Online.
Could not open new database 'StoreInfo'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 824)
Repairing .mdf file.
Hi,
Because the .ldf file of my database 'FlexKIDS' had grown
beyong his limits (2,5 G) and I had no space left to do a
backup/shrink of the transaction log, I detached the
database and physically removed the transaction log.
When I re-attach the database (.mdf) with
the EnterpriseManger (sp_attach_db)I received the
following error:
error 1813:Could not open new database 'FlexKIDS'
createdatabase aborted.
Device activation error.The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\data\FlexKIDS_log.ldf' maybe incorrect.
Who can HELP me recover my database only from
the corrupted .mdf file (FlexKIDS.mdf)?
Cheers Jack. (jbonapart@.dicon.nl)Jack
What is the full sp_attach_single_file_db command you are
using?
Regards
John|||John,
EXEC sp_attach_single_file_db @.dbname = 'FlexKIDS',
@.physname = 'D:\Microsoft SQL\MSSQL\Data\FlexKIDS.mdf'
OUTPUT:
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'FlexKIDS'. CREATE DATABASE is
aborted.
Device activation error. The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.
>--Original Message--
>Jack
>What is the full sp_attach_single_file_db command you are
>using?
>Regards
>John
>.
>|||John,
I am also including the sp_attach_db command results:
EXEC sp_attach_db @.dbname = 'FlexKIDS',
@.filename1 = 'D:\Microsoft SQL
MSSSQL\Data\FlexKIDS.mdf'
OUTPUT:
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'FlexKIDS'. CREATE DATABASE is
aborted.
Device activation error. The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.|||Jack
I just tried it on my system. And it was fine. I created a
database FlexKids, detached it and deleted the log. Used
the same sp_attach_single_db comand you used .
I got one error, by default the data file was created as
FlexKids_data.mdf. When I amended the attach it worked
just fine.
Unless that is your problem, I do not know what else to
suggest, check you have no typos in your command.
Can you copy the .mdf to another server and try to attach
it, just to see if it will work.
Regards
John
>--Original Message--
>John,
>EXEC sp_attach_single_file_db @.dbname = 'FlexKIDS',
> @.physname = 'D:\Microsoft SQL\MSSQL\Data\FlexKIDS.mdf'
>
>OUTPUT:
>Server: Msg 1813, Level 16, State 2, Line 1
>Could not open new database 'FlexKIDS'. CREATE DATABASE
is
>aborted.
>Device activation error. The physical file
>name 'D:\Microsoft SQL
>Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.
>
>>--Original Message--
>>Jack
>>What is the full sp_attach_single_file_db command you
are
>>using?
>>Regards
>>John
>>.
>.
>
Because the .ldf file of my database 'FlexKIDS' had grown
beyong his limits (2,5 G) and I had no space left to do a
backup/shrink of the transaction log, I detached the
database and physically removed the transaction log.
When I re-attach the database (.mdf) with
the EnterpriseManger (sp_attach_db)I received the
following error:
error 1813:Could not open new database 'FlexKIDS'
createdatabase aborted.
Device activation error.The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\data\FlexKIDS_log.ldf' maybe incorrect.
Who can HELP me recover my database only from
the corrupted .mdf file (FlexKIDS.mdf)?
Cheers Jack. (jbonapart@.dicon.nl)Jack
What is the full sp_attach_single_file_db command you are
using?
Regards
John|||John,
EXEC sp_attach_single_file_db @.dbname = 'FlexKIDS',
@.physname = 'D:\Microsoft SQL\MSSQL\Data\FlexKIDS.mdf'
OUTPUT:
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'FlexKIDS'. CREATE DATABASE is
aborted.
Device activation error. The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.
>--Original Message--
>Jack
>What is the full sp_attach_single_file_db command you are
>using?
>Regards
>John
>.
>|||John,
I am also including the sp_attach_db command results:
EXEC sp_attach_db @.dbname = 'FlexKIDS',
@.filename1 = 'D:\Microsoft SQL
MSSSQL\Data\FlexKIDS.mdf'
OUTPUT:
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'FlexKIDS'. CREATE DATABASE is
aborted.
Device activation error. The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.|||Jack
I just tried it on my system. And it was fine. I created a
database FlexKids, detached it and deleted the log. Used
the same sp_attach_single_db comand you used .
I got one error, by default the data file was created as
FlexKids_data.mdf. When I amended the attach it worked
just fine.
Unless that is your problem, I do not know what else to
suggest, check you have no typos in your command.
Can you copy the .mdf to another server and try to attach
it, just to see if it will work.
Regards
John
>--Original Message--
>John,
>EXEC sp_attach_single_file_db @.dbname = 'FlexKIDS',
> @.physname = 'D:\Microsoft SQL\MSSQL\Data\FlexKIDS.mdf'
>
>OUTPUT:
>Server: Msg 1813, Level 16, State 2, Line 1
>Could not open new database 'FlexKIDS'. CREATE DATABASE
is
>aborted.
>Device activation error. The physical file
>name 'D:\Microsoft SQL
>Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.
>
>>--Original Message--
>>Jack
>>What is the full sp_attach_single_file_db command you
are
>>using?
>>Regards
>>John
>>.
>.
>
Repair Master db
Today, while working on repairing another issue, I managed to cause an even
bigger issue. Of course, I was not smart enough to backup the db before
touching it...
I have a new instance of SQL Server 2000 running on a Windows 2003 machine.
I ran into some issues with logins and, following instructions from an
article I found, I was trying to delete a single row from the
master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
statement and ended up deleting everything in that table. Now I can't
connect at all.
Is there any solution besides reinstalling SQL Server?
Thank You,
Jason Williard
Read up on rebuildm.exe in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Williard" <jason@.pcsafe.net> wrote in message news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an even bigger issue. Of
> course, I was not smart enough to backup the db before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003 machine. I ran into some issues
> with logins and, following instructions from an article I found, I was trying to delete a single
> row from the master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the statement
> and ended up deleting everything in that table. Now I can't connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>
|||You can run Rebuildm.exe in the \80\tools\binn to rebuild master database.
-oj
"Jason Williard" <jason@.pcsafe.net> wrote in message
news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an
> even bigger issue. Of course, I was not smart enough to backup the db
> before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003
> machine. I ran into some issues with logins and, following instructions
> from an article I found, I was trying to delete a single row from the
> master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
> statement and ended up deleting everything in that table. Now I can't
> connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>
bigger issue. Of course, I was not smart enough to backup the db before
touching it...
I have a new instance of SQL Server 2000 running on a Windows 2003 machine.
I ran into some issues with logins and, following instructions from an
article I found, I was trying to delete a single row from the
master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
statement and ended up deleting everything in that table. Now I can't
connect at all.
Is there any solution besides reinstalling SQL Server?
Thank You,
Jason Williard
Read up on rebuildm.exe in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Williard" <jason@.pcsafe.net> wrote in message news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an even bigger issue. Of
> course, I was not smart enough to backup the db before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003 machine. I ran into some issues
> with logins and, following instructions from an article I found, I was trying to delete a single
> row from the master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the statement
> and ended up deleting everything in that table. Now I can't connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>
|||You can run Rebuildm.exe in the \80\tools\binn to rebuild master database.
-oj
"Jason Williard" <jason@.pcsafe.net> wrote in message
news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an
> even bigger issue. Of course, I was not smart enough to backup the db
> before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003
> machine. I ran into some issues with logins and, following instructions
> from an article I found, I was trying to delete a single row from the
> master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
> statement and ended up deleting everything in that table. Now I can't
> connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>
Repair Master db
Today, while working on repairing another issue, I managed to cause an even
bigger issue. Of course, I was not smart enough to backup the db before
touching it...
I have a new instance of SQL Server 2000 running on a Windows 2003 machine.
I ran into some issues with logins and, following instructions from an
article I found, I was trying to delete a single row from the
master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
statement and ended up deleting everything in that table. Now I can't
connect at all.
Is there any solution besides reinstalling SQL Server?
Thank You,
Jason WilliardRead up on rebuildm.exe in Books Online.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Williard" <jason@.pcsafe.net> wrote in message news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an even bigger issue. Of
> course, I was not smart enough to backup the db before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003 machine. I ran into some issues
> with logins and, following instructions from an article I found, I was trying to delete a single
> row from the master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the statement
> and ended up deleting everything in that table. Now I can't connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>|||You can run Rebuildm.exe in the \80\tools\binn to rebuild master database.
--
-oj
"Jason Williard" <jason@.pcsafe.net> wrote in message
news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an
> even bigger issue. Of course, I was not smart enough to backup the db
> before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003
> machine. I ran into some issues with logins and, following instructions
> from an article I found, I was trying to delete a single row from the
> master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
> statement and ended up deleting everything in that table. Now I can't
> connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>
bigger issue. Of course, I was not smart enough to backup the db before
touching it...
I have a new instance of SQL Server 2000 running on a Windows 2003 machine.
I ran into some issues with logins and, following instructions from an
article I found, I was trying to delete a single row from the
master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
statement and ended up deleting everything in that table. Now I can't
connect at all.
Is there any solution besides reinstalling SQL Server?
Thank You,
Jason WilliardRead up on rebuildm.exe in Books Online.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Williard" <jason@.pcsafe.net> wrote in message news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an even bigger issue. Of
> course, I was not smart enough to backup the db before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003 machine. I ran into some issues
> with logins and, following instructions from an article I found, I was trying to delete a single
> row from the master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the statement
> and ended up deleting everything in that table. Now I can't connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>|||You can run Rebuildm.exe in the \80\tools\binn to rebuild master database.
--
-oj
"Jason Williard" <jason@.pcsafe.net> wrote in message
news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an
> even bigger issue. Of course, I was not smart enough to backup the db
> before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003
> machine. I ran into some issues with logins and, following instructions
> from an article I found, I was trying to delete a single row from the
> master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
> statement and ended up deleting everything in that table. Now I can't
> connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>
Repair Master db
Today, while working on repairing another issue, I managed to cause an even
bigger issue. Of course, I was not smart enough to backup the db before
touching it...
I have a new instance of SQL Server 2000 running on a Windows 2003 machine.
I ran into some issues with logins and, following instructions from an
article I found, I was trying to delete a single row from the
master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
statement and ended up deleting everything in that table. Now I can't
connect at all.
Is there any solution besides reinstalling SQL Server?
Thank You,
Jason WilliardRead up on rebuildm.exe in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Williard" <jason@.pcsafe.net> wrote in message news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com
..
> Today, while working on repairing another issue, I managed to cause an eve
n bigger issue. Of
> course, I was not smart enough to backup the db before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003 machine
. I ran into some issues
> with logins and, following instructions from an article I found, I was try
ing to delete a single
> row from the master.sysxlogins table. Well, I failed to add "WHERE name =
''" to the statement
> and ended up deleting everything in that table. Now I can't connect at al
l.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>|||You can run Rebuildm.exe in the \80\tools\binn to rebuild master database.
-oj
"Jason Williard" <jason@.pcsafe.net> wrote in message
news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an
> even bigger issue. Of course, I was not smart enough to backup the db
> before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003
> machine. I ran into some issues with logins and, following instructions
> from an article I found, I was trying to delete a single row from the
> master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
> statement and ended up deleting everything in that table. Now I can't
> connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>
bigger issue. Of course, I was not smart enough to backup the db before
touching it...
I have a new instance of SQL Server 2000 running on a Windows 2003 machine.
I ran into some issues with logins and, following instructions from an
article I found, I was trying to delete a single row from the
master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
statement and ended up deleting everything in that table. Now I can't
connect at all.
Is there any solution besides reinstalling SQL Server?
Thank You,
Jason WilliardRead up on rebuildm.exe in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Williard" <jason@.pcsafe.net> wrote in message news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com
..
> Today, while working on repairing another issue, I managed to cause an eve
n bigger issue. Of
> course, I was not smart enough to backup the db before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003 machine
. I ran into some issues
> with logins and, following instructions from an article I found, I was try
ing to delete a single
> row from the master.sysxlogins table. Well, I failed to add "WHERE name =
''" to the statement
> and ended up deleting everything in that table. Now I can't connect at al
l.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>|||You can run Rebuildm.exe in the \80\tools\binn to rebuild master database.
-oj
"Jason Williard" <jason@.pcsafe.net> wrote in message
news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an
> even bigger issue. Of course, I was not smart enough to backup the db
> before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003
> machine. I ran into some issues with logins and, following instructions
> from an article I found, I was trying to delete a single row from the
> master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
> statement and ended up deleting everything in that table. Now I can't
> connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>
Subscribe to:
Posts (Atom)