February 21, 2005 at 6:44 am
Hi,
Background
we are currently maintaining and developing one systems in 4 diffrent countries. Each system is running on their own database server. Each database server has one business system (Our application) and one ERP system. These business and ERP systems talks to each other.
Problem
We do have some performance problems since the fact that the ERP system is very CPU consuming, and that affects our other business system.
Workaround
We would like to isolate our ERP system from our business system. One way to do this is by adding a new server that holds the ERP system. So that we will end up with 2 database servers for each country.
In that case we would use linked server as a method to make the systems communicate with each others.
Problem, we need to have a generic code that works for all servers - otherwise it will end up with a mess of procedures and sourcecode.
Is there not a way to add a linked server as an Alias, instead of servername?
Thanks, Joakim
February 21, 2005 at 7:36 am
You can specify an alias for a linked server. Select the datasource to be other data source and select the driver for SQL server.
February 22, 2005 at 4:44 am
Hi,
Could you explain this a little bit further?
Joakim
February 22, 2005 at 7:06 am
Instead of the server names, You can use genric names as linked server names, e.g.
Define the business linked server on the ERP db server, given the linked server name as something like "BussinessServer"
Define the ERP linked server on the business db server, given the linked server name as something like "ERPServer"
In your stored procedures, you can reference ERP server by "ERPServer" in the business server, and reference the business server by "BussinessServer" in the ERP server.
It's location or server name independant.
February 22, 2005 at 7:32 am
Right click Linked Servers and click on New Linked Servers.
Enter say test(or anything else) as the name of the linked server.
Under server type, select the option other data source and select Microsoft OLE DB Provider for SQL server
Enter the name of the server in Data Source
February 22, 2005 at 7:35 am
Great!
But do I need to connect through a ODBC? Or could I connect directly to the SQL server with an alias? I havent figured out how it suppose to work with out an ODBC.
Thanks, Joakim
February 22, 2005 at 7:47 am
You don't have to create an ODBC. Just give you servername in Data Source
February 22, 2005 at 9:42 am
I got this from someone last week:
exec sp_addlinkedserver 'ALIAS', ' ', 'SQLOLEDB', 'SOURCE_SERVER_NAME'
exec sp_addlinkedsrvlogin 'ALIAS',FALSE,'sa','sa','sa_password'
February 22, 2005 at 9:45 am
Each server needing connection to the new linked server should have its client network utility updated to a common name chosen as a alias and that name used as the linked server's name. In that way, generic code can be developed.
February 23, 2005 at 9:11 am
Nilssond is correct. Use client connectivity to define the alias.
Carl Davis
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply