SQL Server:网络共享上的数据库 [英] SQL Server: database on network share

查看:123
本文介绍了SQL Server:网络共享上的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在PC(终端)上安装了SQL Server。我想创建一个新数据库,其文件(mdf和ldf)将位于网络共享上。



从文件浏览器中,我可以轻松看到共享,但是不是从SSMS的用户界面中获取的。



从技术上讲可以做到吗?可以将实例配置为查看远程驱动器吗?

解决方案

正在寻找完全相同的问题-现在在



从SQL Server 2012开始,官方支持网络共享来创建数据库文件




I have a SQL Server installed on my PC (a terminal). I want to create a new database which its files (mdf & ldf) will be located on a network share.

From the files explorer I can easily see the share, but from the user interface of the SSMS - I don't.

Is it possible technically to do it? Is it possible to configure the instance to "see" remote drives?

解决方案

Was looking for the exact same issue - now in the newer versions these are officially supported.

From SQL Server 2012, network shares are 'officially' supported for creating the database files

Source

Starting with SQL Server 2012, system databases (Master, Model, MSDB, and TempDB), and Database Engine user databases can be installed with Server Message Block (SMB) file server as a storage option.

So essentially, the data files could be in network shares.

Also, regarding the drives to be visible in SSMS, there following blog gives the details

Essentially, we need to do the following:

xp_cmdshell 'net use X: \\server name\share name'

Voila, the drive is now visible:

这篇关于SQL Server:网络共享上的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆