Create database to share folder
-
Hi all, Currently, I used SQL Server 2008 to create database on share folder as below query: DBCC TRACEON (1807,-1) CREATE DATABASE 20100914 ON (NAME="20100914_dat",FILENAME="\\HOST1\SHARE\20100914_DATA.MDF") LOG ON (NAME="20100914_log",FILENAME="\\HOST1\SHARE\20100914_LOG.LDF") with \\HOST1\SHARE has full permission for all person. When I run above query, the error is shown: System.Data.SqlClient.SqlException: Directory lookup for the file "\\HOST1\SHARE\20100914_DATA.MDF" failed with the operating system error 5(failed to retrieve text for this error. Reason: 15105). CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Pls help me to solve it if you know. Thanks a lot.
-
Hi all, Currently, I used SQL Server 2008 to create database on share folder as below query: DBCC TRACEON (1807,-1) CREATE DATABASE 20100914 ON (NAME="20100914_dat",FILENAME="\\HOST1\SHARE\20100914_DATA.MDF") LOG ON (NAME="20100914_log",FILENAME="\\HOST1\SHARE\20100914_LOG.LDF") with \\HOST1\SHARE has full permission for all person. When I run above query, the error is shown: System.Data.SqlClient.SqlException: Directory lookup for the file "\\HOST1\SHARE\20100914_DATA.MDF" failed with the operating system error 5(failed to retrieve text for this error. Reason: 15105). CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Pls help me to solve it if you know. Thanks a lot.
Error 5 indicates that the access has been denied; your share probably needs a username/password combination. If you want to share your data, create a TCP/IP connection to the server from a remote machine, putting the database on a unc-path is asking for problems;
If access to a disk resource requires that a share be mapped, or if the disk resource appears as a remote server through a UNC path, (for example, \\Servername\Sharename), on the network, then by default, the disk storage system is not supported as a location for SQL Server databases.
I are Troll :suss: