dbTalk Databases Forums  

Database mirroring - Client redirection

microsoft.public.sqlserver.clustering microsoft.public.sqlserver.clustering


Discuss Database mirroring - Client redirection in the microsoft.public.sqlserver.clustering forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter
 
Posts: n/a

Default Database mirroring - Client redirection - 10-28-2007 , 10:15 AM






Helo,
i install and configure database mirroring in SQL 2005 with automatic
failover. Client aplications use ADO.NET or the native SQL Server client
driver to connect to database. I know i have to write next connection string:
"Data Source=ServerA;Failover Partner=ServerB;Initial
Catalog=AdventureWorks;Integrated Security=True;"
but the problem is i dont know where. Is there any file on aplication server
that i have to change with this string so that ADO.NET or native SQL client
driver will know what the is second server.
I am only administrating server and dont know much about programing SQL so i
would apreciate any help or link for solution.

Thanks


Reply With Quote
  #2  
Old   
Linchi Shea
 
Posts: n/a

Default RE: Database mirroring - Client redirection - 10-28-2007 , 06:56 PM






This is a problem on the client side and it depends on how the client
accesses the connection string. If the client hardcodes the connection
string, you would have to modify the source code and recompile. Hopefully,
this is not case. Often, the client may read the connection string from a
config file. In the case, you can just modify the config file.

So to find out where, you should ask the owners of the client applications.
If you have no clue where you may find the connections strings, chances are
you are not the right person to make the change.

Linchi

"Peter" wrote:

Quote:
Helo,
i install and configure database mirroring in SQL 2005 with automatic
failover. Client aplications use ADO.NET or the native SQL Server client
driver to connect to database. I know i have to write next connection string:
"Data Source=ServerA;Failover Partner=ServerB;Initial
Catalog=AdventureWorks;Integrated Security=True;"
but the problem is i dont know where. Is there any file on aplication server
that i have to change with this string so that ADO.NET or native SQL client
driver will know what the is second server.
I am only administrating server and dont know much about programing SQL so i
would apreciate any help or link for solution.

Thanks


Reply With Quote
  #3  
Old   
Peter
 
Posts: n/a

Default RE: Database mirroring - Client redirection - 10-29-2007 , 09:05 AM



The problem here is that i have to migrate all database from multi sql server
to one server. Currently there are around 8 aplication who use SQL (wsus,
MOM, desktopautority, SIM, sharepoint...). I was hoping that it would be more
easy.

What about NLB with SQL mirroring. I test it today and still aplication
didnt want to connect to mirror database. Didnt put a lot of effort yet, but
would that work?

Thanks.

"Linchi Shea" wrote:

Quote:
This is a problem on the client side and it depends on how the client
accesses the connection string. If the client hardcodes the connection
string, you would have to modify the source code and recompile. Hopefully,
this is not case. Often, the client may read the connection string from a
config file. In the case, you can just modify the config file.

So to find out where, you should ask the owners of the client applications.
If you have no clue where you may find the connections strings, chances are
you are not the right person to make the change.

Linchi

"Peter" wrote:

Helo,
i install and configure database mirroring in SQL 2005 with automatic
failover. Client aplications use ADO.NET or the native SQL Server client
driver to connect to database. I know i have to write next connection string:
"Data Source=ServerA;Failover Partner=ServerB;Initial
Catalog=AdventureWorks;Integrated Security=True;"
but the problem is i dont know where. Is there any file on aplication server
that i have to change with this string so that ADO.NET or native SQL client
driver will know what the is second server.
I am only administrating server and dont know much about programing SQL so i
would apreciate any help or link for solution.

Thanks


Reply With Quote
  #4  
Old   
Linchi Shea
 
Posts: n/a

Default RE: Database mirroring - Client redirection - 10-29-2007 , 06:43 PM



I'm not up to date with NLB. But if it's still just for load balancing, I
doubt you should configure it with databbase mirroring since database
mirroring is not meant for load balancing. Note that the standby is not
available, so there is nothing to load balance with.

Linchi

"Peter" wrote:

Quote:
The problem here is that i have to migrate all database from multi sql server
to one server. Currently there are around 8 aplication who use SQL (wsus,
MOM, desktopautority, SIM, sharepoint...). I was hoping that it would be more
easy.

What about NLB with SQL mirroring. I test it today and still aplication
didnt want to connect to mirror database. Didnt put a lot of effort yet, but
would that work?

Thanks.

"Linchi Shea" wrote:

This is a problem on the client side and it depends on how the client
accesses the connection string. If the client hardcodes the connection
string, you would have to modify the source code and recompile. Hopefully,
this is not case. Often, the client may read the connection string from a
config file. In the case, you can just modify the config file.

So to find out where, you should ask the owners of the client applications.
If you have no clue where you may find the connections strings, chances are
you are not the right person to make the change.

Linchi

"Peter" wrote:

Helo,
i install and configure database mirroring in SQL 2005 with automatic
failover. Client aplications use ADO.NET or the native SQL Server client
driver to connect to database. I know i have to write next connection string:
"Data Source=ServerA;Failover Partner=ServerB;Initial
Catalog=AdventureWorks;Integrated Security=True;"
but the problem is i dont know where. Is there any file on aplication server
that i have to change with this string so that ADO.NET or native SQL client
driver will know what the is second server.
I am only administrating server and dont know much about programing SQL so i
would apreciate any help or link for solution.

Thanks


Reply With Quote
  #5  
Old   
Luca Bianchi
 
Posts: n/a

Default Re: Database mirroring - Client redirection - 11-02-2007 , 01:25 AM



Quote:
I'm not up to date with NLB. But if it's still just for load balancing, I
doubt you should configure it with databbase mirroring since database
mirroring is not meant for load balancing. Note that the standby is not
available, so there is nothing to load balance with.
....unless you create a snapshot on mirror database...
But in this way you have a secondary db alligned to snapshot time and you
could use it only for reporting and other activity that don't require you
real time data...
It's not properly load balancing but it's a way to reduce some activity on
principal database...

Quote:
Linchi
Ciao


--
Luca Bianchi
Microsoft MVP - SQL Server
http://community.ugiss.org/blogs/lbianchi



Reply With Quote
  #6  
Old   
Linchi Shea
 
Posts: n/a

Default Re: Database mirroring - Client redirection - 11-02-2007 , 10:19 AM



Quote:
...unless you create a snapshot on mirror database...
But in this way you have a secondary db alligned to snapshot time and you
could use it only for reporting and other activity that don't require you
real time data...
It's not properly load balancing but it's a way to reduce some activity on
principal database...
That setup would not make sense at all. On one computer, you have a
read/write database and on the other computer you have this snapshot that is
read only. If NLB directs a read/write SQL statement to the snapshot
computer, you are hosed. And if you statically direct all the read-only
queries to the snapshot, you don't need NLB at all.

Linchi

"Luca Bianchi" wrote:

Quote:
I'm not up to date with NLB. But if it's still just for load balancing, I
doubt you should configure it with databbase mirroring since database
mirroring is not meant for load balancing. Note that the standby is not
available, so there is nothing to load balance with.

...unless you create a snapshot on mirror database...
But in this way you have a secondary db alligned to snapshot time and you
could use it only for reporting and other activity that don't require you
real time data...
It's not properly load balancing but it's a way to reduce some activity on
principal database...

Linchi

Ciao


--
Luca Bianchi
Microsoft MVP - SQL Server
http://community.ugiss.org/blogs/lbianchi


Reply With Quote
  #7  
Old   
Luca Bianchi
 
Posts: n/a

Default Re: Database mirroring - Client redirection - 11-03-2007 , 11:17 AM



Quote:
That setup would not make sense at all. On one computer, you have a
read/write database and on the other computer you have this snapshot that
is
read only. If NLB directs a read/write SQL statement to the snapshot
computer, you are hosed. And if you statically direct all the read-only
queries to the snapshot, you don't need NLB at all.
I put in evidence that you can only redirect to the read only copy some kind
of activity (ie reporting) that don't require real time data; the
redirection couldn't be automatic, but made by the application.
Obviously this is NOT a "real" load balancing scenario, but a way to reduce
activity, that could be relevant, on primary database...

Quote:
Linchi
Ciao


--
Luca Bianchi
Microsoft MVP - SQL Server
http://community.ugiss.org/blogs/lbianchi



Reply With Quote
  #8  
Old   
Peter
 
Posts: n/a

Default RE: Database mirroring - Client redirection - 11-05-2007 , 08:30 AM



Its still for load balance, but what can i do if i cant change connection
string on multiple apllication.

With NLB all apllication will connect to one virtual ip or name and when i
will lost primary or principal server the NLB and witness server will reroute
connecton. I did try it and its working but also have some drawbacks.

"Linchi Shea" wrote:

Quote:
I'm not up to date with NLB. But if it's still just for load balancing, I
doubt you should configure it with databbase mirroring since database
mirroring is not meant for load balancing. Note that the standby is not
available, so there is nothing to load balance with.

Linchi

"Peter" wrote:

The problem here is that i have to migrate all database from multi sql server
to one server. Currently there are around 8 aplication who use SQL (wsus,
MOM, desktopautority, SIM, sharepoint...). I was hoping that it would be more
easy.

What about NLB with SQL mirroring. I test it today and still aplication
didnt want to connect to mirror database. Didnt put a lot of effort yet, but
would that work?

Thanks.

"Linchi Shea" wrote:

This is a problem on the client side and it depends on how the client
accesses the connection string. If the client hardcodes the connection
string, you would have to modify the source code and recompile. Hopefully,
this is not case. Often, the client may read the connection string from a
config file. In the case, you can just modify the config file.

So to find out where, you should ask the owners of the client applications.
If you have no clue where you may find the connections strings, chances are
you are not the right person to make the change.

Linchi

"Peter" wrote:

Helo,
i install and configure database mirroring in SQL 2005 with automatic
failover. Client aplications use ADO.NET or the native SQL Server client
driver to connect to database. I know i have to write next connection string:
"Data Source=ServerA;Failover Partner=ServerB;Initial
Catalog=AdventureWorks;Integrated Security=True;"
but the problem is i dont know where. Is there any file on aplication server
that i have to change with this string so that ADO.NET or native SQL client
driver will know what the is second server.
I am only administrating server and dont know much about programing SQL so i
would apreciate any help or link for solution.

Thanks


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.