数据库|mysql教程
SQLServer,默认路径,默认备份路
数据库-mysql教程
棋牌app源码下载架设教程,ubuntu软件未显示,爬虫网盘源码,php 提交delete,流量池seolzw
本环境是SQL Server Standard Version 64-bit 和 SQL Server Standard Version 64-bit 双实例同时安装在一个Windows Server Standard Version 64-bit OS上
qq域名防报毒工具源码,vscode文件查找,ubuntu窗口移动不了,tomcat请求隔离,sqlite多表拼接,jquery轮播插件,aspx搭配前端什么框架,爬虫代码html,ios 与php,亚马逊关键词seo,phpcms 房产网站,班级网页制作源代码,手机端网页模板代码,html中实现tab切换页面,erp管理系统 asp源码下载,自媒体网站程序源代码lzw
安卓课程表源码,AMD安ubuntu黑屏,安装了2个tomcat,爬虫背景音效,php base58,谷歌seo一个月工资一般多少lzw
以下仅为参照,如果有多个实例,可能会有些许不同:
本环境是SQL Server Standard Version 64-bit 和 SQL Server Standard Version 64-bit 双实例同时安装在一个
Windows Server Standard Version 64-bit OS上:
代码
代码如下:
Windows Server Standard Version 64-bit
SQL Server Standard Version 64-bit
查询用户库Data文件默认路径:
DECLARE @DefaultData VARCHAR(100)
EXEC master..xp_regread @rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer’,
@value_name=’DefaultData’,
@DefaultData=@DefaultData OUTPUT
SELECT @DefaultData
查询用户库Log文件默认路径:
DECLARE @DefaultLog VARCHAR(100)
EXEC master..xp_regread @rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer’,
@value_name=’DefaultLog’,
@DefaultLog=@DefaultLog OUTPUT
SELECT @DefaultLog
查询用户库备份文件默认路径:
DECLARE @BackupDirectory VARCHAR(100)
EXEC master..xp_regread @rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer’,
@value_name=’BackupDirectory’,
@BackupDirectory=@BackupDirectory OUTPUT
SELECT @BackupDirectory
修改用户库Data文件默认路径:
EXEC master..xp_regwrite
@rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer’,
@value_name=’DefaultData’,
@type=’REG_SZ’,
@value=’D:\SQL\Data’
修改用户库Log文件默认路径:
EXEC master..xp_regwrite
@rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer’,
@value_name=’DefaultLog’,
@type=’REG_SZ’,
@value=’D:\SQL\Log’
修改用户库备份文件默认路径:
EXEC master..xp_regwrite
@rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer’,
@value_name=’BackupDirectory’,
@type=’REG_SZ’,
@value=’D:\SQL\DBBak’
代码如下:
Windows Server Standard Version 64-bit
SQL Server Standard Version 64-bit
查询用户库Data文件默认路径:
DECLARE @DefaultData VARCHAR(100)
EXEC master..xp_regread @rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL10.SQL\MSSQLServer’,
@value_name=’DefaultData’,
@DefaultData=@DefaultData OUTPUT
SELECT @DefaultData
查询用户库Log文件默认路径:
DECLARE @DefaultLog VARCHAR(100)
EXEC master..xp_regread @rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL10.SQL\MSSQLServer’,
@value_name=’DefaultLog’,
@DefaultLog=@DefaultLog OUTPUT
SELECT @DefaultLog
查询用户库备份文件默认路径:
DECLARE @BackupDirectory VARCHAR(100)
EXEC master..xp_regread @rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL10.SQL\MSSQLServer’,
@value_name=’BackupDirectory’,
@BackupDirectory=@BackupDirectory OUTPUT
SELECT @BackupDirectory
修改用户库Data文件默认路径:
EXEC master..xp_regwrite
@rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL10.SQL\MSSQLServer’,
@value_name=’DefaultData’,
@type=’REG_SZ’,
@value=’D:\SQL\Data’
修改用户库Log文件默认路径:
EXEC master..xp_regwrite
@rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL10.SQL\MSSQLServer’,
@value_name=’DefaultLog’,
@type=’REG_SZ’,
@value=’D:\SQL\Log’
修改用户库备份文件默认路径:
EXEC master..xp_regwrite
@rootkey=’HKEY_LOCAL_MACHINE’,
@key=’Software\Microsoft\Microsoft SQL Server\MSSQL10.SQL\MSSQLServer’,
@value_name=’BackupDirectory’,
@type=’REG_SZ’,
@value=’D:\SQL\DBBak’
如果觉得《SQL Server / 用户数据库文件默认路径和默认备份路径修》对你有帮助,请点赞、收藏,并留下你的观点哦!