views:

24

answers:

1

Hello everyone,

I want to create a SQL Server 2008 database, and I need to create the database on a network shared location, like \\10.10.10.123\share, but this network shared location is protected by a username and password.

My question is, how to assign such username and password in SQL Server create database statement?

BTW: I have another idea, which is disable username and password protection on the network shared location, but I did not find a solution yet (I find at least need a username -- like Guest, can not remove both username and password).

thanks in advance, George

+1  A: 

Sorry, but you can't create a DB on a network share anyway

gbn
I think the document means when enable trace 1807 it could work. You can see there is a sample, but does not contain solution about how to specify username and password for a network shared disk. Any comments?http://www.sqldba.org/articles/43-sql-server-database-on-UNC-network-drive-trace-flag-1807.aspx
George2
You could try CREATE CREDENTIAL http://msdn.microsoft.com/en-us/library/ms189522.aspx but I've not tried myself There are very good reasons why you don't have SQL Server DBs on network shares...
gbn
Hi gbn, I know it is not good to create DB on network share location. But currently, network shared location is the only places which could contain the large data. It is a temporary solution and I will switch back to local disk when they are ready.I read your create credential statement, but how to use it in create dabatase statement?
George2
http://msdn.microsoft.com/en-us/library/ms161950.aspx it could be automatic. I haven't tried with network shares, sorry...
gbn