Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Problem with mapped drive

Author  Topic 

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2009-12-11 : 10:26:00
Hallo,

I am working with Microsoft Sql server 2005, so when I right click 'Databases' and select 'Attach' I can only see the local drives C & G.

I have mapped another drive - Z from another server and I want to attach a database from this drive (Z).

How can I make it possible to view drive- Z and attach the database?

Thank you very much indeed

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-12-11 : 10:51:27
I believe you have to copy it over to the local filesystem.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2009-12-11 : 10:56:22
True, but the problem is the local file system has insufficient space. I have large amount of space on another server, thats why I optioned to map it to the drive and copied the database. Now I wanted to link to this database when I attach it. This will make it possible for me to run very long queries..without worrying of insufficient space taken by the database

Thanks for the suggestion though..

Any ideas
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-12-11 : 11:00:49
You have to use unc path, not mapped drive letter. enable trace flag 1807

see http://support.microsoft.com/kb/304261
Go to Top of Page

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2009-12-11 : 11:10:05

How can I do this please, the link doesn't really show me the procedure..

Thanks
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-12-11 : 11:15:13
DBCC TRACEON(1807)
Go to Top of Page

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2009-12-11 : 11:34:38
Tried it and received this error;


DBCC TRACEON(1807)
use master
go
sp_attach_db 'ODSData5','Z:\TechTeam\ODSData\ODSData5.mdf','Z:\TechTeam\ODSData\ODSData5_log.ldf'
go



DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "Z:\TechTeam\ODSData\ODSData5.mdf" failed with the operating system error 3(error not found).
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-12-11 : 11:36:42
quote:
Originally posted by russell

You have to use unc path, not mapped drive letter. enable trace flag 1807

see http://support.microsoft.com/kb/304261

Go to Top of Page

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2009-12-11 : 11:53:04
Tried it and received the same error;

DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "\\199.168.10.185\TechTeam\ODSData\ODSData5.mdf" failed with the operating system error 53(error not found).
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-12-11 : 12:03:49
SQL Server service account has full control permission over \\199.168.10.185\TechTeam\ODSData\ ?
Go to Top of Page

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2009-12-11 : 12:33:53
yes
Go to Top of Page
   

- Advertisement -