Table of Contents
 SQLServer2005镜像配置脚本(域认证) " > SQLServer2005镜像配置脚本(域认证)
Home Database Mysql Tutorial SQL Server 2005 镜像配置(一)

SQL Server 2005 镜像配置(一)

Jun 07, 2016 pm 03:13 PM
server sql Configuration mirror

SQLServer2005 镜像 配置 脚本(域认证) --在MIR-A上,创建 数据库 镜像 端点 create endpoint DB_MirroringEP AS tcp (listener_port = 5022) for database_Mirroring (role = partner,encryption=supported); go --在MIR-B上,创建 数据库 镜像 端点,用

 SQLServer2005镜像配置脚本(域认证)

--在MIR-A上,创建数据库镜像端点
create endpoint DB_MirroringEP
 AS tcp (listener_port = 5022)
 for database_Mirroring (role = partner,encryption=supported);
go

--在MIR-B上,创建数据库镜像端点,用于伙伴通讯
CREATE ENDPOINT Db_MirroringEP
 AS TCP (LISTENER_PORT = 5022)
 FOR DATABASE_MIRRORING (ROLE = PARTNER, ENCRYPTION = SUPPORTED);
GO
ALTER ENDPOINT Db_MirroringEP STATE = STARTED
GO

--在MIR-W上,创建数据库镜像端点,用于见证通讯
CREATE ENDPOINT Db_MirroringEP
 AS TCP (LISTENER_PORT = 5022)
 FOR DATABASE_MIRRORING (ROLE = WITNESS, ENCRYPTION = SUPPORTED);
GO
ALTER ENDPOINT Db_MirroringEP STATE = STARTED
GO

--在MIR-A,MIR-B,MIR-W上,检查端点配置
SELECT * FROM sys.database_mirroring_endpoints
GO

--在MIR-A,MIR-B,MIR-W上,配置数据库镜像安全性,somodesql.com为自己的域名
use master
go
grant connect on endpoint::"DB_MirroringEP" to "SOMODESQL\sqladmin"
go

--在MIR-A上,对AdventureWorks数据库做完全备份
BACKUP DATABASE AdventureWorks TO  DISK = 'C:\AdventureWorks.bak'
GO

--在MIR-B上恢复AdventureWorks数据库
--通过安全方法,将 C:\AdventureWorks.bak 复制到 MIR-B。
--在 MIR-B 的镜像服务器实例上还原数据库
RESTORE DATABASE AdventureWorks
    FROM DISK = 'C:\AdventureWorks.bak'
    WITH NORECOVERY
GO

--启动数据库镜像,注意顺序,需要在首先在镜像服务器上配置伙伴
--在MIR-B上,指定伙伴端点,somodesql.com为自己的域名
alter database AdventureWorks
set partner = N'TCP://MIR-A.somodesql.com:5022'
GO

--在MIR-A上,指定伙伴端点
alter database AdventureWorks
set partner = N'TCP://MIR-B.somodesql.com:5022'
GO

--在MIR-A上,指定见证服务器端点
ALTER DATABASE AdventureWorks
SET WITNESS = N'TCP://MIR-W.somodesql.com:5022'
GO

--配置数据库镜像事务安全级别
ALTER DATABASE AdventureWorks SET SAFETY FULL
GO

--=================查看数据库镜像配置状态=================
-- 1.)通过Management studio 对象资源管理器,查看主体数据库镜像数据库状态
-- 2.)通过Management studio 对象资源管理器中的数据库属性查看状态
-- 3.)通过系统目录视图查看数据库镜像配置情况

use master
go
SELECT * FROM sys.database_mirroring_endpoints
SELECT * FROM sys.database_mirroring WHERE database_id =
     (SELECT database_id FROM sys.databases WHERE name = 'AdventureWorks')

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1672
14
PHP Tutorial
1277
29
C# Tutorial
1257
24
What is the difference between HQL and SQL in Hibernate framework? What is the difference between HQL and SQL in Hibernate framework? Apr 17, 2024 pm 02:57 PM

HQL and SQL are compared in the Hibernate framework: HQL (1. Object-oriented syntax, 2. Database-independent queries, 3. Type safety), while SQL directly operates the database (1. Database-independent standards, 2. Complex executable queries and data manipulation).

The working principle and configuration method of GDM in Linux system The working principle and configuration method of GDM in Linux system Mar 01, 2024 pm 06:36 PM

Title: The working principle and configuration method of GDM in Linux systems In Linux operating systems, GDM (GNOMEDisplayManager) is a common display manager used to control graphical user interface (GUI) login and user session management. This article will introduce the working principle and configuration method of GDM, as well as provide specific code examples. 1. Working principle of GDM GDM is the display manager in the GNOME desktop environment. It is responsible for starting the X server and providing the login interface. The user enters

CentOS7 various version image download addresses and version descriptions (including Everything version) CentOS7 various version image download addresses and version descriptions (including Everything version) Feb 29, 2024 am 09:20 AM

When loading CentOS-7.0-1406, there are many optional versions. For ordinary users, they don’t know which one to choose. Here is a brief introduction: (1) CentOS-xxxx-LiveCD.ios and CentOS-xxxx- What is the difference between bin-DVD.iso? The former only has 700M, and the latter has 3.8G. The difference is not only in size, but the more essential difference is that CentOS-xxxx-LiveCD.ios can only be loaded into the memory and run, and cannot be installed. Only CentOS-xxx-bin-DVD1.iso can be installed on the hard disk. (2) CentOS-xxx-bin-DVD1.iso, Ce

Usage of division operation in Oracle SQL Usage of division operation in Oracle SQL Mar 10, 2024 pm 03:06 PM

"Usage of Division Operation in OracleSQL" In OracleSQL, division operation is one of the common mathematical operations. During data query and processing, division operations can help us calculate the ratio between fields or derive the logical relationship between specific values. This article will introduce the usage of division operation in OracleSQL and provide specific code examples. 1. Two ways of division operations in OracleSQL In OracleSQL, division operations can be performed in two different ways.

Comparison and differences of SQL syntax between Oracle and DB2 Comparison and differences of SQL syntax between Oracle and DB2 Mar 11, 2024 pm 12:09 PM

Oracle and DB2 are two commonly used relational database management systems, each of which has its own unique SQL syntax and characteristics. This article will compare and differ between the SQL syntax of Oracle and DB2, and provide specific code examples. Database connection In Oracle, use the following statement to connect to the database: CONNECTusername/password@database. In DB2, the statement to connect to the database is as follows: CONNECTTOdataba

Detailed explanation of the Set tag function in MyBatis dynamic SQL tags Detailed explanation of the Set tag function in MyBatis dynamic SQL tags Feb 26, 2024 pm 07:48 PM

Interpretation of MyBatis dynamic SQL tags: Detailed explanation of Set tag usage MyBatis is an excellent persistence layer framework. It provides a wealth of dynamic SQL tags and can flexibly construct database operation statements. Among them, the Set tag is used to generate the SET clause in the UPDATE statement, which is very commonly used in update operations. This article will explain in detail the usage of the Set tag in MyBatis and demonstrate its functionality through specific code examples. What is Set tag Set tag is used in MyBati

Understand Linux Bashrc: functions, configuration and usage Understand Linux Bashrc: functions, configuration and usage Mar 20, 2024 pm 03:30 PM

Understanding Linux Bashrc: Function, Configuration and Usage In Linux systems, Bashrc (BourneAgainShellruncommands) is a very important configuration file, which contains various commands and settings that are automatically run when the system starts. The Bashrc file is usually located in the user's home directory and is a hidden file. Its function is to customize the Bashshell environment for the user. 1. Bashrc function setting environment

How to install, uninstall, and reset Windows server backup How to install, uninstall, and reset Windows server backup Mar 06, 2024 am 10:37 AM

WindowsServerBackup is a function that comes with the WindowsServer operating system, designed to help users protect important data and system configurations, and provide complete backup and recovery solutions for small, medium and enterprise-level enterprises. Only users running Server2022 and higher can use this feature. In this article, we will explain how to install, uninstall or reset WindowsServerBackup. How to Reset Windows Server Backup If you are experiencing problems with your server backup, the backup is taking too long, or you are unable to access stored files, then you may consider resetting your Windows Server backup settings. To reset Windows

See all articles