Showing posts with label physname. Show all posts
Showing posts with label physname. Show all posts

Monday, March 26, 2012

Problem with attaching database

I try to attach a db by running the following command:

EXEC sp_attach_single_file_db @.dbname = 'test',

@.physname = 'C:\Documents and Settings\renee.wilson\My Documents\PD DD 2.nvp'

But I get the following error message:

File activation failure. The physical file name "C:\Documents and Settings\renee.wilson\My Documents\PD DD 2_log.LDF" may be incorrect.

The log cannot be rebuilt because the database was not cleanly shut down.

It looks like that the db was not detached from the server properly. I know that .LDF file does not exist, therefore, I was hoping by running the sp_attach_single_file_db, a new .LDF file can be created.

Any body has any idea on how to fix the problem? Thanks in advance.

Hi,

one last chance left, here are some instructions for the crashd database:

http://groups.google.de/group/microsoft.public.sqlserver.server/browse_frm/thread/f584b644548cd68f

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Thanks, Jens.

But, I tried both suggestions in

http://groups.google.de/group/microsoft.public.sqlserver.server/browse_frm/thread/f584b644548cd68f

without much luck.

I am having the following problems:

1. DBCC rebuilt_log does not exist in SQL Server 2005 Express which I am using.

2. When the database is in emergency mode, which I can see via the tool(Microsoft SQL Server Management Studio Express) I am using, I can not view any of its object, for example, I click on Tables(try to see the tables), I get error msg: Could not continue scan with NOLOCK due to data movement, (Microsoft SQL Server, Error:601). For the same reason, I can not generate scripts as suggested.

Any further suggestion? Thanks in advance.

problem with attach database

EXEC sp_attach_single_file_db @.dbname = 'mydatabase',
@.physname = 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\'mydatabase'.mdf'

Server: Msg 5180, Level 22, State 1, Line 1
Could not open FCB for invalid file ID 0 in database 'mydatabase'.

Connection Broken

What can I do with such error of my database?
Was my database lost?
Any help would be appreciate!
Best regards,
AdamHi

Does the filename really have quotes in it? ( 'mydatabase'.mdf )

John

"Adam Polech" <polada1@.poczta.onet.pl> wrote in message
news:cd8lbt$fc9$1@.213.17.164.114...
> EXEC sp_attach_single_file_db @.dbname = 'mydatabase',
> @.physname = 'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data\'mydatabase'.mdf'
> Server: Msg 5180, Level 22, State 1, Line 1
> Could not open FCB for invalid file ID 0 in database 'mydatabase'.
> Connection Broken
> What can I do with such error of my database?
> Was my database lost?
> Any help would be appreciate!
> Best regards,
> Adam