Attaching SQL database on UNC path

SunsetSunset Member Posts: 201
edited 2007-10-13 in SQL General
How do I attach a database on an unc path on SQL 2005?

Due to discplace shortage I'm trying to attach a database using an unc path. Through some reading I have seen that I need to set traceflag 1807, but it's still not working :cry:

I can point to the mdf file when sql askes me what database to attach. This works. But then I have to point where individual files are currently located and now SQL gives me the message "Not found" If I try to attach the database anyway, it gives me

TITLE: Microsoft SQL Server Management Studio

Attach database failed for Server 'sqlserver'. (Microsoft.SqlServer.Smo)


Directory lookup for the file "UNC-PATH\NAVISION4_Data.mdf" failed with the operating system error 5(Access is denied.). (Microsoft SQL Server, Error: 5133)

For help, click: http://go.microsoft.com/fwlink?ProdName ... nkId=20476



Unfortunately the link doesn't provide any help.

Anybody here that has had any success in attaching this way?
Don't just take my word for it, test it yourself

Comments

  • DenSterDenSter Member Posts: 8,307
    I haven't been able to attach data file through the network. It seems that SQL Server doesn't allow that. A better place to search for an answer might be the public SQL Server newsgroups (usenet on news.microsoft.com, or you can access the communities through the MS website)
  • nunomaianunomaia Member Posts: 1,153
    By default, you cannot create a database file in UNC path Server 2000.
    Turn on trace flag 1807 to change this.

    DBCC TRACEON(1807)
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • SunsetSunset Member Posts: 201
    I tried setting flag 1807, both local and global (1807,-1)
    The result was getting from error 5110 (I think) to error 5133
    Don't just take my word for it, test it yourself
Sign In or Register to comment.