I tried to use sp_attach_single_file_db to attach to a MDF file which is probably corrupted in a power failure. But, whenever I run this stored procedure, I get some error message like
Change language setting to us_english
Server: msg 945, Level 14, State 2, line 1
Database 'AlbumSQL' can not be opened because some of the files could not be activated.
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'AlbumSQL'. CREATE DATABASE is aborted.
There is also a Ldf file in the same folder, but when I tried to use sp_attach_db, I get the other message
Server: Msg 5172, Level 16, State 15, Line 1
The header for file 'd:\data\albumsql_log.ldf' is not a valid database file header. The PageAudit property is incorrect.
Can you help me some hint to solve this problem? Thanks.
-Alex HuangIS it possible that there is more than one data file.. Attach single file db
only works when there is only one data file... (Based on the error message,
that kind of sounds like it might be happening.)
Otherwise it is probably time to open a call to PSS>
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Alex Huang" <alexh@.ulead.com> wrote in message
news:3DBA8115-8DCC-4853-8ED5-F53B15619452@.microsoft.com...
> I tried to use sp_attach_single_file_db to attach to a MDF file which is
probably corrupted in a power failure. But, whenever I run this stored
procedure, I get some error message like
> Change language setting to us_english
> Server: msg 945, Level 14, State 2, line 1
> Database 'AlbumSQL' can not be opened because some of the files could not
be activated.
> Server: Msg 1813, Level 16, State 2, Line 1
> Could not open new database 'AlbumSQL'. CREATE DATABASE is aborted.
> There is also a Ldf file in the same folder, but when I tried to use
sp_attach_db, I get the other message
> Server: Msg 5172, Level 16, State 15, Line 1
> The header for file 'd:\data\albumsql_log.ldf' is not a valid database
file header. The PageAudit property is incorrect.
> Can you help me some hint to solve this problem? Thanks.
> -Alex Huang
Showing posts with label power. Show all posts
Showing posts with label power. Show all posts
Subscribe to:
Posts (Atom)