Create a SQL Server Database on a network shared drive
(原文地址:http://blogs.msdn.com/b/varund/archive/2010/09/02/create-a-sql-server-database-on-a-network-shared-drive.aspx)
Create a SQL Server Database on a network shared drive
(创建基于网上邻居共享路径的数据库)
Sometime back, I have written blog post on ‘Backing-up SQL Server Database on a network shared drive’. This can be found here. I have received numerous queries on an another related topic i.e. ‘How to Create a SQL Server Database on a network shared drive’. It took sometime (a brand new SQL Release) before I could get the answer as follow:
1. Create a database on Network Share in SQL Server 2008 / SQL Server 2005
In SQL 2008 and SQL 2005, By default, you cannot create a new database on a network share drive.
This restriction is primarily due to fact that, On a network file share, there is always a risk on network errors compromising database integrity, along with I/O performance issues which might partial or total data loss or corruption. Reference >> Microsoft KB # 304261
However, there’s a “workaround”, if in case you still want to go ahead. Follow below steps:
Step 1. Enable the Trace Flag 1807: (Bypasses the check and allows you to configure SQL Server with network-based database files)
DBCC TRACEON(1807, -1)
Step 2. Identify a file share, where SQL Server Service start-up account has FULL access
Step 3. Create the database
CREATE DATABASE [networked] ON PRIMARY
( NAME = N'networked', FILENAME = N'\\varund-win7\ATOMNETWORKDB\networked.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'networked_log', FILENAME = N'\\varund-win7\ATOMNETWORKDB\networked_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
2. Create a database on Network Share in SQL Server 2008R2
Starting SQL Server 2008R2, you are now allowed to cerate database on network file share (UNC path), without the need to Trace 1807
Step 1. Identify a file share, where SQL Server 2008R2 Service start-up account has FULL access
Step 2. Create the database
CREATE DATABASE [networked_r2] ON PRIMARY
( NAME = N'networked_r2', FILENAME = N'\\varund-win7\ATOMNETWORKDB\networked_r2.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'networked_r2_log', FILENAME = N'\\varund-win7\ATOMNETWORKDB\networked_log_r2.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
While the above options will surely help you to manage space used by database file across your networked servers, please be aware of the risk involved (as I discussed above). Once such known issue has been discussed in this CSS post. It is therefore advised to run SQLIOSIM.exe that ships with SQL Server 2008 R2, this has now been updated to allow testing against a UNC locations.
Microsoft recommends that you store database files either on Local Disk or on Storage Area Networks (SANs).
Create a SQL Server Database on a network shared drive的更多相关文章
- P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1
P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1 May ...
- [转]How to: Create a Report Server Database (Reporting Services Configuration)
本文转自:https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms157300%28v%3dsql.10 ...
- How to Kill All Processes That Have Open Connection in a SQL Server Database[关闭数据库链接 最佳方法] -摘自网络
SQL Server database administrators may frequently need in especially development and test environmen ...
- SQL Server Database Backup and Restore in C#
SQL Server Database Backup and Restore in C# Syed Noman Ali Shah, 7 Feb 201 ...
- 转载:Restore SQL Server database and overwrite existing database
转载自:https://www.mssqltips.com/sqlservertutorial/121/restore-sql-server-database-and-overwrite-existi ...
- Visual Studio 2012创建SQL Server Database Project提示失败解决方法
新建一个SQL Server Database Project,提示: Unable to open Database project This version of SQL Server Data ...
- SQL Server database mail问题诊断一例
产品环境sql server database的mail发不出邮件,影响客户的业务,在数据库中进行诊断 诊断sql: EXEC msdb.dbo.sp_send_dbmail @profile_nam ...
- SQL Server database – Error 3743
Database mirroring must be removed before you drop SQL Server database – Error 3743 If you try to dr ...
- SQL Server Database 维护计划创建完整的备份策略
SQL Server的维护计划Maintenance Plan是一个非常实用的维护工具,可以完成大多数的数据库维护任务,通过对这些功能的封装,可以省去很多的代码编写时间.网络上完整介绍的不是很多,特此 ...
随机推荐
- 通过PowerShell启用AADC的密码同步功能
在AADC工具里面也可以启用. 下面这个是世纪互联工程师提供的Powershell脚本(我测试了下是可以的),其中,$adConnector和$aadConnector可以在AADC工具里面找到. $ ...
- 使用数据泵+dblink迁移数据库,适用于本地空间不足的情况
col name for a40 select name,locks,pins from v$db_object_cache where locks > 0 and pins > 0 an ...
- eclipse如何快速查找某个类
2. [Ct rl+Shift +T ] 查找工作空间(Workspace)构建路径中的可找到Java类文件,不要为找不到类而痛苦,而且可以使用“*”.“?”等通配符. 3. 当我们编写了很多的 ...
- uploadfile图片上传和ashx
uploadify.swf需要是支持中文 $(function () { //获取所有上传按钮id $("div[id^='fileInput_']").each(fu ...
- 点单登录原理和java实现简单的单点登录
引用自:http://blog.csdn.net/zuoluoboy/article/details/12851725 摘要: 单点登录(SSO)的技术被越来越广泛地应用到各个领域的软件系统当中.本文 ...
- PHP底层工作原理
最近搭建服务器,突然感觉lamp之间到底是怎么工作的,或者是怎么联系起来?平时只是写程序,重来没有思考过他们之间的工作原理: PHP底层工作原理 图1 php结构 从图上可以看出,php从下到上是一个 ...
- springmvc配置多视图 - tiles, velocity, freeMarker, jsp
转自: http://www.cnblogs.com/shanheyongmu/p/5684595.html <!-- Velocity --> <bean id="vel ...
- Swift 2.x -> Swift 3.0
Swift 3.0 相对于 2.x 有很大变化.特别是因为命名习惯的改变,导致许多 Api 都发生了变化.总的趋势是让表示更简洁. 对旧的代码升级,大部分可以根据提示来进行更正.但也有的需要手动修改. ...
- Swift: 在Swift中桥接OC文件(自己创建的类文件、第三方库文件)
一.介绍 随着Swift的逐渐成熟,使用swift开发或者混合开发已经成为了一个趋势,本身苹果公司也十分推荐使用Swift这门新语言.目前Swift已经更新到了3.0,估计没有多久4.0就要出来了.那 ...
- 分享 rabbitMQ入门详解
原文地址http://blog.csdn.net/cugb1004101218/article/details/21243927 目录(?)[-] rabbitMQ说明文档 rabbitMQ是什么 消 ...