(1)查询证书相关信息
SELECT * FROM sys.certificates 查看证书
SELECT * FROM sys.endpoints 查看端点
SELECT * FROM sys.syslogins 查看登录
SELECT * FROM sys.sysusers 查看用户
(2)删除可用性组
(3)删除端点
DROP ENDPOINT Hadr_endpoint
(4)删除证书
DROP CERTIFICATE sqlserver_1_certificate
DROP CERTIFICATE sqlserver_2_certificate
DROP CERTIFICATE sqlserver_3_certificate
(5)删除物理证书
在[root@hqlserver ~]# cd /var/opt/mssql/data/下删除证书
(注:在三台机子上做同样操作)
(6)新建端点及证书
CREATE CERTIFICATE hb_sqlserver_2_certificate WITH SUBJECT = ‘hb_sqlserver_2 AG Certificate’,EXPIRY_DATE=‘06/06/2066’ (创建证书,默认情况证书有效期为一年,可自定义过期时间)
BACKUP CERTIFICATE hb_sqlserver_2_certificate TO FILE=’/var/opt/mssql/data/hb_sqlserver_2_certificate.cert’ (将证书备份到相应目录下,用于其他节点证书还原)
CREATE ENDPOINT Hadr_endpoint STATE=STARTED AS TCP ( LISTENER_PORT=5022,LISTENER_IP=ALL)
FOR DATABASE_MIRRORING (AUTHENTICATION=CERTIFICATE hb_sqlserver_2_certificate,ROLE=ALL)
(创建端点)
GRANT CONNECT ON ENDPOINT ::Hadr_endpoint TO AG_Login; (端点授权)
(7)恢复其他节点证书
CREATE CERTIFICATE hb_sqlserver_3_certificate AUTHORIZATION AG_Login FROM FILE=’/var/opt/mssql/data/hb_sqlserver_3_certificate.cert’
操作结束后即可创建可用性组文章来源:https://www.toymoban.com/news/detail-466438.html
/usr/bin/rsync --daemon --config=/usr/local/bin/rsyncd.conf文章来源地址https://www.toymoban.com/news/detail-466438.html
到了这里,关于SQLServer证书过期,重做证书的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!