使用發布與訂閱能不能實現這個需求

我看2005上還有個鏡像 但是之前沒弄過,不知道這兩個功能可不可以實現這個需求

?

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שישי 05 יוני 2009 03:51

是故障轉移.這需要用群集服務器,

如果只是同步數據庫數據,用復制訂閱就可實現了ROY WU(吳熹)

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:17

יום שישי 05 יוני 2009 04:16

מנחה דיון

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:18

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:18

יום שישי 05 יוני 2009 04:20

מנחה דיון

因為這些之前都沒使用過,所以不是很熟悉到底功能如何  只是知道存在這個手段

故障轉移的話,用數據庫鏡像和集群都可以實現嗎

還有個就是

64為的iis能否使用32位的SQL Server,64和32位的數據庫之間能建立故障轉移嗎?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שישי 05 יוני 2009 04:44

可不可以使用2臺機器實現高可用性的鏡像功能?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שישי 05 יוני 2009 08:46

Yes you can.

יום שישי 05 יוני 2009 13:10

另外個問題,

我看了下,需要配置證書,但是在網上看到說只在主題服務器和standby機器上配置證書,那么是否在見證服務器上建立證書?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 00:33

Is it for database mirroring?

שבת 06 יוני 2009 00:43

Is it for database mirroring?

yes

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 01:34

Not on witness, take look at 'Example: Setting Up Database Mirroring Using Certificates (Transact-SQL)' in books online.

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:19

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:19

שבת 06 יוני 2009 02:26

数据同步可以用raplication,mirror或log shipping来做。

standby其实是HA的概念,用cluster。

这两个是不同的概念。

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:19

שבת 06 יוני 2009 02:32

可不可以將主體服務器和見證服務器配置在同一臺機器上?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 02:37

可以的.witness可以放在principle上或者mirror上,但这是不推荐的。witness负责做failover的控制,因为它是一个“证明人”,如果principle down了,witness也就down了。

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

שבת 06 יוני 2009 02:44

可以的.witness可以放在principle上或者mirror上,但这是不推荐的。witness负责做failover的控制,因为它是一个“证明人”,如果principle down了,witness也就down了。

只需要不同的端口就好了嗎?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 02:45

具体步骤和注意事项,可以参考sql 2k5 BOL How to: Create the Mirror Database :)

שבת 06 יוני 2009 02:48

我參照

http://www.kuqin.com/database/20080525/8908.html

做鏡像

可是,到最后在主體數據庫上執行

ALTERDATABASEshishanSETPARTNER='TCP://10.168.6.45:5022';

但是報錯

Msg 1418, Level 16, State 1, Line 1

The server network address "TCP://10.161.32.252:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

請問應該怎么弄啊?

因為下周一就要到正式機上開始配置了

所以時間有點緊。。If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 03:04

再到 鏡像機上去

ALTERDATABASEceshiSETPARTNER='TCP://10.168.6.49:5022';

執行成功,但是發現鏡像機上的ceshi數據庫的狀態還是正在還原

到主體服務器機上看,發現狀態沒變化,還是正常的狀態If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 03:08

可以的.witness可以放在principle上或者mirror上,但这是不推荐的。witness负责做failover的控制,因为它是一个“证明人”,如果principle down了,witness也就down了。

只需要不同的端口就好了嗎?

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

No. You may talk about different instances on same physical machine, but still not recommended.

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

שבת 06 יוני 2009 03:10

Are they on same network? Is port open?

שבת 06 יוני 2009 03:11

Are they on same network? Is port open?

有一個加了域的,另外一個沒加域

以后正式機都是在同一個域中

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 03:13

Are they on same network? Is port open?

在主體服務器上可以使用  telnet 鏡像服務器IP 5022進去

說明那邊的5022端口是開著的,對吧?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 03:15

Does sql service account have permission on other servers? Did you try set mirroring with wizard?

שבת 06 יוני 2009 03:26

Does sql service account have permission on other servers? Did you try set mirroring with wizard?

你是說的sql server的啟動賬戶嗎?

在每臺機器上都是使用不同的啟動賬戶啟動的

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 03:32

之前也看了牛可的視頻,關于2005的

他里面是在同一臺機器上安裝了3個虛擬機,來實現三臺機器做鏡像的功能

他里面說服務器的數據庫引擎的服務賬戶都是同個名稱,口令也相同

就直接在三臺機器上使用

grant connect on endpoint::"DBmirroring" to "SQL 2K5SP1\SQL Service"

他所說的這個賬戶是指什么賬戶?

并且該賬戶是怎么建立的?

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

נערך על-ידי

Wison-Ho

שבת 06 יוני 2009 03:54

שבת 06 יוני 2009 03:38

That's sql service startup account.

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

שבת 06 יוני 2009 04:01

That's sql service startup account.

但是我看了下,他在SQL Server的login里面也包含該賬戶,我加這種賬戶到SQL Server中去的時候,前面都帶的有機器的名稱/賬戶名稱

但是他怎么三SQL Server里的login上都沒機器名稱呢?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 05:00

That's sql service startup account.

但是我看了下,他在SQL Server的login里面也包含該賬戶,我加這種賬戶到SQL Server中去的時候,前面都帶的有機器的名稱/賬戶名稱

但是他怎么三SQL Server里的login上都沒機器名稱呢?

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

镜像有两种验证方式:1 使用证书,这种验证方式对启动账户没有要求。  第二种则需要使用域账户(而不是你所说的机器名/账户名称)作为启动账户,然后授权其连接endpoint的权限。SQL SERVER Engine Test

סומן כתשובה על-ידי

Wison-Ho

שבת 06 יוני 2009 06:33

סימון כתשובה בוטל על-ידי

Wison-Ho

שבת 06 יוני 2009 06:33

סימון כתשובה בוטל על-ידי

Wison-Ho

שבת 06 יוני 2009 06:33

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

שבת 06 יוני 2009 06:31

מנחה דיון

That's sql service startup account.

但是我看了下,他在SQL Server的login里面也包含該賬戶,我加這種賬戶到SQL Server中去的時候,前面都帶的有機器的名稱/賬戶名稱

但是他怎么三SQL Server里的login上都沒機器名稱呢?

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

镜像有两种验证方式:1 使用证书,这种验证方式对启动账户没有要求。  第二种则需要使用域账户(而不是你所说的机器名/账户名称)作为启动账户,然后授权其连接endpoint的权限。

SQL SERVER Engine Test

那使用證書驗證,是要在三臺機器上都要創建證書嗎?

我只是在主體服務器上創建了證書,在鏡像服務器上創建了證書,我的想法是將主體服務器上的另外個實例設置為見證服務器。所以就沒在上面建立證書。

還有個問題,我按照http://www.kuqin.com/database/20080525/8908.html說的方法做了,

怎么就不能實現鏡像功能呢?

可是,到最后在主體數據庫上執行

ALTERDATABASEshishanSETPARTNER='TCP://10.168.6.45:5022';

但是報錯

Msg 1418, Level 16, State 1, Line 1

The server network address "TCP://10.161.32.252:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

但是在主體服務器上telnet 鏡像服務器IP 5022都可以的

能不能解釋下,原因何在  下周就要到正式機上去配置了。。If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

שבת 06 יוני 2009 06:38

A:Main  B:Mirror   C:Witness

step1:

backup database  used for mirroring ON A

restore the backup file ON B with norecovery

step2:

create endpoint ON A/B/A

create endpoint endpoint_name as tcp(listener=5022) for database_mirroring(role=partner,encryption=supported);

alter endpoint endpoint_name state=started.

create endpoint endpoint_name as tcp(listener=5022) for database_mirroring(role=partner,encryption=supported);

alter endpoint endpoint_name state=started.

Here I set another instance ON A as witness

create endpoint endpoint_name as tcp(listener=5023) for database_mirroring(role=witness,encryption=supported);

alter endpoint endpoint_name state=started.

step3: configure safety

I configure this step as

http://www.kuqin.com/database/20080525/8908.html

create certificate

step4:startup mirroring

the sequence is ON B A A

alter database dbname

set partner=N'TCP://A's IP:5022'

alter database dbname

set partner=N'TCP://B's IP:5022'

alter database dbname

set partner=N'TCP://A's IP:5023'

then

alter database dbname

set safety full --ON A

but it generated an error

Msg 1418, Level 16, State 1, Line 1

The server network address "TCP://10.161.32.252:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

Could you tell me the place where should I change to make it correct?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום ראשון 07 יוני 2009 03:43

看你的代码是想用证书作为验证方式,但你创建证书之后并没有使用啊SQL SERVER Engine Test

יום ראשון 07 יוני 2009 04:05

מנחה דיון

Dear all:

我按照

http://alan328.com/SQL2005_Database_Mirroring_Tutorial.aspx

上面的步驟進行配置數據庫鏡像

當在主體服務器上執行

-- HOST A againalter database good set partner = 'TCP://server2.ace.local:7024';

GO

alter database good set witness = 'TCP://mc.ace.local:7024';

GO

的時候,就報錯:

Database "good" is not configured for database mirroring.

這次還好,沒出現network的錯誤。

請問這個應該怎么解決啊?

謝謝If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שני 08 יוני 2009 06:23

當在主體服務器上執行

-- HOST A againalter database good set partner = 'TCP://server2.ace.local:7024';

GO

alter database good set witness = 'TCP://mc.ace.local:7024';

GO

的時候,就報錯:

Database "good" is not configured for database mirroring.

這次還好,沒出現network的錯誤。

謝謝

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

哪个语句出错了?第一个还是第二个

alter database good set partner = 'TCP://server2.ace.local:7024';

GO

alter database good set witness = 'TCP://mc.ace.local:7024';

GO

SQL SERVER Engine Test

יום שני 08 יוני 2009 06:26

מנחה דיון

當在主體服務器上執行

-- HOST A againalter database good set partner = 'TCP://server2.ace.local:7024';

GO

alter database good set witness = 'TCP://mc.ace.local:7024';

GO

的時候,就報錯:

Database "good" is not configured for database mirroring.

這次還好,沒出現network的錯誤。

謝謝

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

哪个语句出错了?第一个还是第二个

alter database good set partner = 'TCP://server2.ace.local:7024';

GO

alter database good set witness = 'TCP://mc.ace.local:7024';

GO

SQL SERVER Engine Test

第一個的時候就出錯了

第二個同樣報錯If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שני 08 יוני 2009 06:44

mirror数据库出了问题,

你是怎么创建mirror数据库的?

具体的语句是什么

有时候还需要将日志还原到mirror

SQL SERVER Engine Test

יום שני 08 יוני 2009 06:59

מנחה דיון

我看了下,說是需要將SQL Server上的Named Pipes的開啟,我開啟后,

再次執行

-- HOST A againalter database good set partner = 'TCP://server2.ace.local:7024';

GO

alter database good set witness = 'TCP://mc.ace.local:7024';

GO

當執行第一條語句的時候,報錯:

Msg 1418, Level 16, State 1, Line 1

The server network address "TCP://10.161.34.78:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

執行第二條的時候還是報錯:

Database "good" is not configured for database mirroring.

做數據庫鏡像是否需要將Named Pipes開啟?

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שני 08 יוני 2009 07:00

你使用telnet命令查看一下,能否登录到目标端口SQL SERVER Engine Test

יום שני 08 יוני 2009 07:03

מנחה דיון

mirror数据库出了问题,

你是怎么创建mirror数据库的?

具体的语句是什么

有时候还需要将日志还原到mirror

SQL SERVER Engine Test

他不是需要將主體服務器上的數據庫恢復到鏡像服務器上嗎

在主體服務器上的操作:

backup database dbm to disk='d:\dbm.bak'

then

backup log dbm to disk='d:\dbm.trn'

然后將備份文件弄到鏡像服務器上

restore database dbm from disk='d:\dbm.bak' with norecovery

restore database dbm from disk='d:\dbm.trn' with norecovery

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שני 08 יוני 2009 07:05

你使用telnet命令查看一下,能否登录到目标端口

SQL SERVER Engine Test

在三臺機器上均可使用telnet命令登陸到對應的端口

我使用netstat -abn 也可以在三臺機器上發現該端口已經開啟

另外三臺機器上的防火墻都是關閉狀態。

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שני 08 יוני 2009 07:11

Anyone could help me?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שני 08 יוני 2009 09:03

Does certificate work? Possible to move server to domain and start sql with domain account?

יום שני 08 יוני 2009 15:13

Does certificate work? Possible to move server to domain and start sql with domain account?

How to judge the certificate can work?

The test circumstance is no domain

But the official is in the domain.

will  it be easier to configure the mirror in domain circumstance?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שני 08 יוני 2009 23:59

Yes, much easier in domain.

יום שלישי 09 יוני 2009 00:19

Yes, much easier in domain.

The steps of configuring safety is such as?

Will it need the cirtificate authentication?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 00:29

你使用telnet命令查看一下,能否登录到目标端口

SQL SERVER Engine Test

在三臺機器上均可使用telnet命令登陸到對應的端口

我使用netstat -abn 也可以在三臺機器上發現該端口已經開啟

另外三臺機器上的防火墻都是關閉狀態。

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

如果你可以telnet,那应该是证书的问题,导致链接endpoint时出错(权限)SQL SERVER Engine Test

יום שלישי 09 יוני 2009 02:14

מנחה דיון

Don't need certificate.

יום שלישי 09 יוני 2009 02:17

另外個問題:

配置數據庫鏡像是否需要開啟具名管道?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 02:19

Not required.

יום שלישי 09 יוני 2009 02:23

不需要,镜像使用tcp进行通讯SQL SERVER Engine Test

יום שלישי 09 יוני 2009 02:24

מנחה דיון

Don't need certificate.

如果选择证书验证方式,证书是必须的SQL SERVER Engine Test

יום שלישי 09 יוני 2009 02:25

מנחה דיון

Don't need certificate.

如果选择证书验证方式,证书是必须的

SQL SERVER Engine Test

但是我使用證書驗證的時候,就報錯。上面有個答復里面有那錯誤。

總之很郁悶。。

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 02:29

Don't have to use certificate if servers are in same domain.

יום שלישי 09 יוני 2009 02:30

Don't have to use certificate if servers are in same domain.

我現在先在測試機上搞這東西,有兩臺是在同個域中,另外一臺沒加域,就使用證書驗證

只是正式機是在同個域的環境中,現在還沒那條件去實驗在同個域中的鏡像設置呢。。If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 02:33

Don't need certificate.

如果选择证书验证方式,证书是必须的

SQL SERVER Engine Test

但是我使用證書驗證的時候,就報錯。上面有個答復里面有那錯誤。

總之很郁悶。。

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

如果你的服务器都在域内,没必要使用证书。

配置镜像经常会出现你说的错误,解决方法已经提到了,仔细检查吧SQL SERVER Engine Test

יום שלישי 09 יוני 2009 02:34

מנחה דיון

Tried start sql service with same account on all servers?

יום שלישי 09 יוני 2009 02:34

Tried start sql service with same account on all servers?

我現在按照

http://www.sql-articles.com/index.php?page=articles/cng-dbmrr.htm

的步驟在同一臺機器上的三個實例之間建立了鏡像,并且成功。

假如我要在三臺機器上實現鏡像的配置,按么應該在其中的step8上的accounts那里輸入什么賬戶名稱?

如果不存在域環境,那么是否需要在賬戶名稱前面加上計算機名稱?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 03:43

另外如果我在同個域中配置鏡像的話,比較簡單的方法是不是,將三臺機器上的SQL Server服務都使用域賬戶啟動,然后在grant connect to SQL Server的啟動域賬戶就好了嗎?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 03:58

另外如果我在同個域中配置鏡像的話,比較簡單的方法是不是,將三臺機器上的SQL Server服務都使用域賬戶啟動,然后在grant connect to SQL Server的啟動域賬戶就好了嗎?

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

对,授权连接endpoint的权限就可以了

grant connect on endpoint::xxx to domian\userSQL SERVER Engine Test

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

יום שלישי 09 יוני 2009 06:20

מנחה דיון

Tried start sql service with same account on all servers?

我現在按照

http://www.sql-articles.com/index.php?page=articles/cng-dbmrr.htm

的步驟在同一臺機器上的三個實例之間建立了鏡像,并且成功。

假如我要在三臺機器上實現鏡像的配置,按么應該在其中的step8上的accounts那里輸入什么賬戶名稱?

如果不存在域環境,那么是否需要在賬戶名稱前面加上計算機名稱?

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

不太清楚 UI界面如何配置镜像。

不过因该是三个机器上的各个实例的服务的启动账户.

“如果不存在域環境,那么是否需要在賬戶名稱前面加上計算機名稱? ”

你是想用证书验证方式吧, 这种情况下对于sqlserver服务的启动账户没有要求,所以谈不上你说的“賬戶名稱前面加上計算機名稱?”

SQL SERVER Engine Test

יום שלישי 09 יוני 2009 06:29

מנחה דיון

我想請問下,應該怎么模擬,故障自動轉移

我將機器上的作為主體服務器的實例停止,再重啟,他變為mirror,先前的mirror變為princinple

我是這樣模擬的,但是不成功。

我首先在其他機器上連接到主體服務器,可以查詢,但是當重啟主體服務器后,就不能查詢了,因為他變為mirror了。

我應該怎樣才能模擬出真正的故障自動轉移?If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 06:40

自动的故障转移需要有witness,它会自动进行角色切换

如果你的程序想使用,看看:http://msdn.microsoft.com/en-us/library/ms366348.aspxSQL SERVER Engine Test

יום שלישי 09 יוני 2009 06:50

מנחה דיון

自动的故障转移需要有witness,它会自动进行角色切换

如果你的程序想使用,看看:http://msdn.microsoft.com/en-us/library/ms366348.aspx

SQL SERVER Engine Test

我設置的有witness,在模擬的主體服務器上查看鏡像的配置,里面三個角色都存在,下面的鏡像模式為高可用性。

看書上和網上其他地方說,高可用性模式是可以實現故障自動轉移的。

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 08:03

自动的故障转移需要有witness,它会自动进行角色切换

如果你的程序想使用,看看:http://msdn.microsoft.com/en-us/library/ms366348.aspx

SQL SERVER Engine Test

看著那網址,比較頭暈。你能說一種比較簡單的模擬故障轉移的方法嗎?

我試了,從數據庫上看是可以轉移,但是怎么在用戶端實現呢?

比如我使用一個賬戶連接到主體數據庫, 然后將主體數據庫停止掉,再次使用該賬戶執行開始運行的語句的時候,他就會報錯:該數據庫被是鏡像數據庫,不能

被用作操作之類的

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 08:07

failover之后,principal和mirroring的角色调换了,所以继续使用以前的链接时就会遇到你提到的错误。

解决方法是在连接字符串中设置:

一下是之前链接的末尾处

Example Connection String

For example, to explicitly connect using TCP/IP to the AdventureWorks database on either Partner_A or Partner_B, a client application that uses the ODBC Driver could supply the following connection string:

"Server=Partner_A; Failover_Partner=Partner_B; Database=AdventureWorks; Network=dbmssocn"

Alternatively, the client could use the IP address and port number to identify the initial partner, Partner_A; for example, if the IP address is 250.65.43.21 and the port number is 4734, the connection string would be:

"Server=250.65.43.21,4734; Failover_Partner=Partner_B; Database=AdventureWorks; Network=dbmssocn"

进行设置之后,如果发生failover,应用还是会尝试去链接原始的的princial,在若干次以后(这里有个算法,查msdn),就会转向到新的principal(也就是以前的mirror)SQL SERVER Engine Test

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

יום שלישי 09 יוני 2009 08:31

מנחה דיון

failover之后,principal和mirroring的角色调换了,所以继续使用以前的链接时就会遇到你提到的错误。

解决方法是在连接字符串中设置:

一下是之前链接的末尾处

Example Connection String

For example, to explicitly connect using TCP/IP to the AdventureWorks database on either Partner_A or Partner_B, a client application that uses the ODBC Driver could supply the following connection string:

"Server=Partner_A; Failover_Partner=Partner_B; Database=AdventureWorks; Network=dbmssocn"

Alternatively, the client could use the IP address and port number to identify the initial partner, Partner_A; for example, if the IP address is 250.65.43.21 and the port number is 4734, the connection string would be:

"Server=250.65.43.21,4734; Failover_Partner=Partner_B; Database=AdventureWorks; Network=dbmssocn"

进行设置之后,如果发生failover,应用还是会尝试去链接原始的的princial,在若干次以后(这里有个算法,查msdn),就会转向到新的principal(也就是以前的mirror)

SQL SERVER Engine Test

比如我在另外臺機器上,使用SQL Server 2005客戶端先連接主體服務器上的test庫,select * from test.dbo.test

按照你上面所說的應該怎樣將那些語句加在這語句后面?

If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 08:44

那个是连接字符串,在程序中控制,不是在数据库里

例如你使用ADO.NET链接数据库:

SqlConnection con=new SqlConnection();

con.ConnectionString="Server=250.65.43.21,4734; Failover_Partner=Partner_B; Database=AdventureWorks; Network=dbmssocn"//在这里SQL SERVER Engine Test

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

סומן כתשובה על-ידי

Wison-Ho

יום רביעי 10 יוני 2009 03:22

יום שלישי 09 יוני 2009 08:48

מנחה דיון

那个是连接字符串,在程序中控制,不是在数据库里

例如你使用ADO.NET链接数据库:

SqlConnection con=new SqlConnection();

con.ConnectionString="Server=250.65.43.21,4734; Failover_Partner=Partner_B; Database=AdventureWorks; Network=dbmssocn"//在这里

SQL SERVER Engine Test

謝謝 不厭其煩的為我解釋這些

這論壇真的不錯。

這些版主大大些也很盡責。

TKSIf you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום שלישי 09 יוני 2009 08:56

大概是關于鏡像的最后一個問題

三臺機器:SQL Server 2005

兩臺是X86,一臺為X64的。

版本均為SP2,

可否實現鏡像,X64的作為見證服務器If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום רביעי 10 יוני 2009 00:30

That will work.

יום רביעי 10 יוני 2009 00:58

哎 搞了半天,他們現在只需要一個異地備份的就好了。

我想的太好了,還說實現故障自動轉移呢。

被否決的原因是:產線都沒這東西,為什么這東西需要自動轉移

還好,可以作為學習。If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

יום רביעי 10 יוני 2009 01:08

10php1c,很急的一個問題,請幫幫忙相关推荐

  1. 解决C3P0又出現一個問題,如下的Exception:

    C3P0又出現一個問題,如下的Exception: org.springframework.transaction.CannotCreateTransactionException: Could no ...

  2. imp-00017 oracle2298,急,imp怪異問題,請高手協助

    我原有系統平台是:window2003 32位+oracle9.0 32位版本,現exp導出dmp文件后,想倒入到linux 64位 oracle10.2.0.4 64位平台上,但倒了幾次老提示以下錯 ...

  3. 寫博客過程中遇到的問題

    科技還不夠方便,即便是現在,互聯網發展這麼多年了,寫個博客,非常不順手. 1.漢字跟代碼混排,此時中英文標點符號切換頻繁,如何應付? 2.漢字跟英文混排,選用哪個字體最好?漢字我鐘愛PMingLiu, ...

  4. 響應式設計中百分比 % 的問題

    問題 為了要能夠解釋得更清楚我們需要實作一小段跟我們會遇到的問題相關的程式碼 .list-item {float: left;width: 33%; } 現在您可能會想知道關於上面這段程式碼有什麼問題 ...

  5. Unity3D與IE8兼容有問題

    今天在測試U3D的時候,發現一個問題,用IE打開并登陸后會很卡,這個現象在編譯成Windows的時候沒有.測試后發現在開通網絡后才有,所以開始懷疑是網絡傳輸的問題.后經過測試發現不是,很是奇怪. 在偶 ...

  6. java menuitem 乱码_MenuItem 顯示中文亂碼問題解決方案

    今天在使用Java做系統托盤圖標(TrayIcon),需要為其增加一個右鍵彈出菜單(PopupMenu),在使用菜單項(MenuItem)時,遇到了一個非常痛苦的事情:中文亂碼----.這個問題不經常 ...

  7. nginx+web.py+fastcgi(spawn-fcgi)的session失效問題

    2019独角兽企业重金招聘Python工程师标准>>> web.py是用DiskStore保存session文件的,參考官網的例子,結果直接python code.py運行沒問題,但 ...

  8. html中百分比都支持吗,響應式設計中百分比%的問題_html/css_WEB-ITnose

    問題 為了要能夠解釋得更清楚我們需要實作一小段跟我們會遇到的問題相關的程式碼 .list-item { float: left; width: 33%;} 現在您可能會想知道關於上面這段程式碼有什麼問 ...

  9. (原創) 如何解決DE2_LCM_CCD上下顛倒左右相反與無法設定曝光值的問題? (SOC) (DE2)...

    AbstractDE2_LCM_CCD是友晶科技為DE2和其130萬像素CMOS與彩色LCD所寫的範例,但官方的範例會造成上下顛倒左右相反與曝光值無法設定的問題,本文提出解決方式. Introduct ...

  10. matlab求最小割,matlab實現圖割算法中的最大流最小割Max-flow/min-cut問題(一)

    本篇主要介紹matlab實現Max-flow/min-cut的方法,介紹一種只實現了Max-flow/min-cut的工具箱Bk_matlab. 一:最大流最小割的由來 了解這個問題之前先說說這個問題 ...

最新文章

  1. Centos7-安装mysql5-7
  2. ICLR 2019八大趋势:RNN正在失去光芒,强化学习仍最受欢迎
  3. 火狐linux ubuntu16.04,Ubuntu 16.04 安装 Firefox 48.0 beta版
  4. 计算机听不到音乐怎么回事,电脑听不到声音怎么解决 电脑听不到声音的处理方法...
  5. 计算机是管理信息系统的必要条件吗,管理信息系统复习题(有答案)..doc
  6. 搜狗高速浏览器怎么设置页面字体 设置方法介绍
  7. Java 算法 质因数2
  8. 请问我应该怎么做,才能让前端的基础打牢固?
  9. php中声明一个函数,php学习笔记之 函数声明
  10. 一位38岁的老码农在退休前和年轻码农们的互动
  11. php的substr函数的作用是,PHP substr函数的实现功能技巧讲解
  12. C#andSql获取当前日期格式
  13. 一条龙教程:Matlab下使用yalmip(工具箱)+cplex(求解器)
  14. linux鼠标指针隐藏,触摸屏鼠标指针隐藏消失方法
  15. python美团外卖_美团外卖不满意分析_Python和Excel
  16. 阿里云短信服务java发送短信验证码
  17. 用python给小孩随机生成一组10以内加减法
  18. 思杰改进图形以提升虚拟桌面性能
  19. GCC 编译 C(C++)静态链接库(gcc -L、gcc -l)和动态链接库(gcc -fPIC -shared)的创建和使用
  20. 使命召唤手游如何在电脑上玩 使命召唤手游模拟器教程

热门文章

  1. ketchup 消息队列rabbitmq使用
  2. day 46 http和html
  3. alert获取输入框内容_Alert弹出框处理
  4. cytoscape使用方法_Cytoscape的使用方法(带图片解析)
  5. 文科生学大数据分析吃力吗
  6. MySQL 高可用MMM安装部署以及故障转移详细资料汇总
  7. Window环境下 Jenkins Master/Slaver模式 + Svn 部署
  8. [读书笔记]2.标准误差 标准差 信度 实例计算说明
  9. 第二章 02 天牛质感
  10. 联想笔记本怎么重装系统?联想笔记本一键重装