Showing posts with label dbname. Show all posts
Showing posts with label dbname. Show all posts

Monday, March 26, 2012

Problem with attaching database on network share (SQL Server 2005)

I'm trying to execute following command:
DBCC TRACEON (1807, -1);
sp_attach_db @.dbname = N'PGDT', @.filename1 = N'\\Server\D\SQL
DataBase\PGDT\PGDT.mdf', @.filename2 = '\\Server\D\SQL
DataBase\PGDT\PGDT_log.ldf'
and I get following error:
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "\\Server\D\SQL DataBase\PGDT\PGDT.mdf" failed
with the operating system error 5(error not found).
Note: this file exists and I have full permissions
Any help appreciated.
Hi
Do you have permission to this path?
Why would you want to do that? RESTORE , doesn't help you?
"D" <destro@.mail.com> wrote in message news:dmedq5$sv8$1@.ss405.t-com.hr...
> I'm trying to execute following command:
> DBCC TRACEON (1807, -1);
> sp_attach_db @.dbname = N'PGDT', @.filename1 = N'\\Server\D\SQL
> DataBase\PGDT\PGDT.mdf', @.filename2 = '\\Server\D\SQL
> DataBase\PGDT\PGDT_log.ldf'
> and I get following error:
> Msg 5133, Level 16, State 1, Line 1
> Directory lookup for the file "\\Server\D\SQL DataBase\PGDT\PGDT.mdf"
> failed with the operating system error 5(error not found).
>
> Note: this file exists and I have full permissions
> Any help appreciated.
>
|||Solved!
I had to start sql server under Administrator account, and not local
account.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:euzNHQ$8FHA.2040@.TK2MSFTNGP14.phx.gbl...
> Hi
> Do you have permission to this path?
> Why would you want to do that? RESTORE , doesn't help you?
>
> "D" <destro@.mail.com> wrote in message news:dmedq5$sv8$1@.ss405.t-com.hr...
>
|||Yup - worked like that in SQL 2000 as well (for remote backups and
restores). You will probably need to check that other services e.g.
agent can still work with SQL running on the domain account. Agree with
above - a remote ATTACH sounds like a pretty risky idea - performance
will likely be lousy and could be fragile as network issues will
destabilise?

Problem with attaching database on network share (SQL Server 2005)

I'm trying to execute following command:
DBCC TRACEON (1807, -1);
sp_attach_db @.dbname = N'PGDT', @.filename1 = N'\\Server\D\SQL
DataBase\PGDT\PGDT.mdf', @.filename2 = '\\Server\D\SQL
DataBase\PGDT\PGDT_log.ldf'
and I get following error:
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "\\Server\D\SQL DataBase\PGDT\PGDT.mdf" failed
with the operating system error 5(error not found).
Note: this file exists and I have full permissions
Any help appreciated.Hi
Do you have permission to this path?
Why would you want to do that? RESTORE , doesn't help you?
"D" <destro@.mail.com> wrote in message news:dmedq5$sv8$1@.ss405.t-com.hr...
> I'm trying to execute following command:
> DBCC TRACEON (1807, -1);
> sp_attach_db @.dbname = N'PGDT', @.filename1 = N'\\Server\D\SQL
> DataBase\PGDT\PGDT.mdf', @.filename2 = '\\Server\D\SQL
> DataBase\PGDT\PGDT_log.ldf'
> and I get following error:
> Msg 5133, Level 16, State 1, Line 1
> Directory lookup for the file "\\Server\D\SQL DataBase\PGDT\PGDT.mdf"
> failed with the operating system error 5(error not found).
>
> Note: this file exists and I have full permissions
> Any help appreciated.
>|||Solved!
I had to start sql server under Administrator account, and not local
account.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:euzNHQ$8FHA.2040@.TK2MSFTNGP14.phx.gbl...
> Hi
> Do you have permission to this path?
> Why would you want to do that? RESTORE , doesn't help you?
>
> "D" <destro@.mail.com> wrote in message news:dmedq5$sv8$1@.ss405.t-com.hr...
>|||Yup - worked like that in SQL 2000 as well (for remote backups and
restores). You will probably need to check that other services e.g.
agent can still work with SQL running on the domain account. Agree with
above - a remote ATTACH sounds like a pretty risky idea - performance
will likely be lousy and could be fragile as network issues will
destabilise?

Problem with attaching database on network share (SQL Server 2005)

I'm trying to execute following command:
DBCC TRACEON (1807, -1);
sp_attach_db @.dbname = N'PGDT', @.filename1 = N'\\Server\D\SQL
DataBase\PGDT\PGDT.mdf', @.filename2 = '\\Server\D\SQL
DataBase\PGDT\PGDT_log.ldf'
and I get following error:
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "\\Server\D\SQL DataBase\PGDT\PGDT.mdf" failed
with the operating system error 5(error not found).
Note: this file exists and I have full permissions
Any help appreciated.Hi
Do you have permission to this path?
Why would you want to do that? RESTORE , doesn't help you?
"D" <destro@.mail.com> wrote in message news:dmedq5$sv8$1@.ss405.t-com.hr...
> I'm trying to execute following command:
> DBCC TRACEON (1807, -1);
> sp_attach_db @.dbname = N'PGDT', @.filename1 = N'\\Server\D\SQL
> DataBase\PGDT\PGDT.mdf', @.filename2 = '\\Server\D\SQL
> DataBase\PGDT\PGDT_log.ldf'
> and I get following error:
> Msg 5133, Level 16, State 1, Line 1
> Directory lookup for the file "\\Server\D\SQL DataBase\PGDT\PGDT.mdf"
> failed with the operating system error 5(error not found).
>
> Note: this file exists and I have full permissions
> Any help appreciated.
>|||Solved!
I had to start sql server under Administrator account, and not local
account.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:euzNHQ$8FHA.2040@.TK2MSFTNGP14.phx.gbl...
> Hi
> Do you have permission to this path?
> Why would you want to do that? RESTORE , doesn't help you?
>
> "D" <destro@.mail.com> wrote in message news:dmedq5$sv8$1@.ss405.t-com.hr...
>> I'm trying to execute following command:
>> DBCC TRACEON (1807, -1);
>> sp_attach_db @.dbname = N'PGDT', @.filename1 = N'\\Server\D\SQL
>> DataBase\PGDT\PGDT.mdf', @.filename2 = '\\Server\D\SQL
>> DataBase\PGDT\PGDT_log.ldf'
>> and I get following error:
>> Msg 5133, Level 16, State 1, Line 1
>> Directory lookup for the file "\\Server\D\SQL DataBase\PGDT\PGDT.mdf"
>> failed with the operating system error 5(error not found).
>>
>> Note: this file exists and I have full permissions
>> Any help appreciated.
>|||Yup - worked like that in SQL 2000 as well (for remote backups and
restores). You will probably need to check that other services e.g.
agent can still work with SQL running on the domain account. Agree with
above - a remote ATTACH sounds like a pretty risky idea - performance
will likely be lousy and could be fragile as network issues will
destabilise?sql

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