热门标签 | HotTags
当前位置:  开发笔记 > 数据库 > 正文

使用本地服务器组来管理局域网或公网上的SQLSERVER

使用本地服务器组来管理局域网或公网上的SQLSERVER测试的两台机器Windows764位SQLSERVER2005SP5Windows764位SQLSERVER2012SP1打开已注册的服务器窗口你看到已注册服务器里有本地服务器组,SQL2012会多出一个中央管理服务器,暂时不知道中央管理服

使用本地服务器组来管理局域网或公网上的SQLSERVER 测试的两台机器 Windows7 64位 SQLSERVER2005 SP5 Windows7 64位 SQLSERVER2012 SP1 打开已注册的服务器窗口 你看到已注册服务器里有本地服务器组,SQL2012会多出一个中央管理服务器,暂时不知道中央管理服

使用本地服务器组来管理局域网或公网上的SQLSERVER

测试的两台机器

Windows7 64位 SQLSERVER2005 SP5

Windows7 64位 SQLSERVER2012 SP1

打开已注册的服务器窗口

你看到已注册服务器里有本地服务器组,SQL2012会多出一个中央管理服务器,暂时不知道中央管理服务器有什么用,

因为本地服务器组跟中央管理服务器两者的右键菜单是一样的

在本地服务器组上按右键-》 新建服务器注册

输入连接信息,比较简单,香港虚拟主机,我这里使用SQLSERVER身份验证

SQLSERVER身份验证有一个弊端,就是如果要查看对方的SQLSERVER配置管理器就会说权限不够,必须要使用Windows身份验证(域环境)

但是一般要管理公网上的一台SQLSERVER不会有域环境的,所以这里也是比较可惜,不过从安全方面考虑的话,开启WMI必须开启135端口,有一定危险性

我这里先说使用SQLSEVER身份验证而用不了的功能

1、查看SQLSERVER日志

2、服务控制,需要调用WMI提供程序,要域环境才行

3、SQLSERVER配置管理器

--------------------------------------------------------------华丽的分割线----------------------------------------------------------

要在已经注册的服务器上执行一些操作,香港服务器租用,可以在本地服务器组上按右键

主要用到两个操作:(1)新建查询 (2)对象资源管理器

点击“新建查询”,你在新建查询窗口里输入的SQL语句都会在所有已经注册的SQLSERVER上执行一遍

点击“对象资源管理器”,就会在下面的对象资源管理器窗口打开所有已经注册的SQLSERVER的对象资源管理

下面演示一下

对象资源管理器

经过测试,SQL2005在本地服务器组里可以注册SQL2012,SQL2012也可以注册SQL2005

但是SQL2005不能执行查询跟对象管理器批量打开功能,SQL2005功能还是比较欠缺

当本地服务器组里已经注册的服务器比较多的时候,可以导出配置文件,下次重装SQLSERVER的时候就不需要新建这些SQLSERVER注册了,香港服务器,有几百台SQLSERVER的话

逐个逐个SQLSERVER新建注册真的太麻烦了,这时候只需要导入配置文件就可以了,比较方便

配置文件格式 :server.regsrvr

model xmlns"namebaseURIxs:bufferSchema xmlns:xsXMLSchema"definitions xmlns:sfc"documentdocinfoaliasesaliasRegisteredServersaliasessfc:version DomainVersiondocinfodataxs:" xmlns:sfc" xmlns:sml" xmlns:xsXMLSchema" elementFormDefaultxs:element namexs:complexTypexs:sequencexs:" processContentsxs:sequencexs:complexTypexs:elementxs:element namexs:complexTypexs:sequencexs:" processContentsxs:sequencexs:complexTypexs:elementRegisteredServers:bufferData xmlns:RegisteredServers"instances xmlns:sfc"documentdocinfoaliasesaliasaliasessfc:version DomainVersiondocinfodataRegisteredServers:ServerGroup xmlns:RegisteredServers" xmlns:sfc" xmlns:sml" xmlns:xsXMLSchema"RegisteredServers:RegisteredServerssfc:Collectionsfc:Reference sml:refsml:Urisfc:Referencesfc:Reference sml:refsml:Urisfc:Referencesfc:CollectionRegisteredServers:RegisteredServersRegisteredServers:Parentsfc:Reference sml:refsml:Urisfc:ReferenceRegisteredServers:ParentRegisteredServers:Name typeRegisteredServers:ServerType typeRegisteredServers:ServerGroupdatadocumentdocumentdocinfoaliasesaliasaliasessfc:version DomainVersiondocinfodataRegisteredServers:RegisteredServer xmlns:RegisteredServers" xmlns:sfc" xmlns:sml" xmlns:xsXMLSchema"RegisteredServers:Parentsfc:Reference sml:refsml:Urisfc:ReferenceRegisteredServers:ParentRegisteredServers:Name typeRegisteredServers:Description typeRegisteredServers:ServerName typeRegisteredServers:UseCustomConnectionColor typeRegisteredServers:CustomConnectionColorArgb typeRegisteredServers:CustomConnectionColorArgbRegisteredServers:ServerType typeRegisteredServers:ConnectionStringWithEncryptedPassword typeRegisteredServers:ConnectionStringWithEncryptedPasswordRegisteredServers:CredentialPersistenceType typeRegisteredServers:RegisteredServerdatadocumentdocumentdocinfoaliasesaliasaliasessfc:version DomainVersiondocinfodataRegisteredServers:RegisteredServer xmlns:RegisteredServers" xmlns:sfc" xmlns:sml" xmlns:xsXMLSchema"RegisteredServers:Parentsfc:Reference sml:refsml:Urisfc:ReferenceRegisteredServers:ParentRegisteredServers:Name typeRegisteredServers:ServerName typeRegisteredServers:UseCustomConnectionColor typeRegisteredServers:CustomConnectionColorArgb typeRegisteredServers:CustomConnectionColorArgbRegisteredServers:ServerType typeRegisteredServers:ConnectionStringWithEncryptedPassword typeRegisteredServers:CredentialPersistenceType typeRegisteredServers:RegisteredServerdatadocumentinstancesRegisteredServers:bufferDataxs:datadocumentdefinitionsxs:bufferSchemamodel>

推荐阅读
author-avatar
手机用户2502887947_784
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有