Help - Search - Members - Calendar
Full Version: WOT - Now i have a SQL Server Question
914World.com > The 914 Forums > 914World Garage
drewvw
OK...in the spirit of SQL questions being answered the last couple days, i have one that i could REALLY USE SOME HELP WITH.

I am about to tear my hair out here.


In a basic explanation, we are trying to setup a test environment for an application I am building. There are some existing Stored Procedures and they reference a linked server to do some of the work.

For Example:

the stored procs reference dbname.dbo.table where "dbname" is a linked server.


For the test environment, we want to create a linked server by the same name, only it points to the test db on another server "testname" that is exactly the same as production. So do avoid having to change all the names in the stored proc


The problem is we get all kinds of DTC errors depending on what options we try, but they are basically all like "cannot find 'dbname' in syslinks" or "cannot start Distributed Transaction."

its driving me crazy...can anybody give me a link or a step by step on how to do what i am describing above. PLEASE...



drew
blitZ
You can always create a vew, which selects a linked table. This would be helpful transitioning from development to production environments. Create the view with same name in both environments which point to the corresponding linked table, dev or prod. In SQL 7 and later, you can do inserts, updates and selects on views.

CREATE VIEW viewName
AS
Select *
from linkedtabe
SirAndy
QUOTE(drewvw @ Mar 27 2007, 01:11 PM) *

can anybody give me a link or a step by step on how to do what i am describing above.


sounds more like a DNS/network issue ...

is the target server is available on the network under the same name as used in the SP?
is your dev network connected to the live network? if so, you need to make sure that your SQL setup points to the correct linked SQL server ...

can you access the linked server directly using a ODBC DSN?
idea.gif Andy
drewvw
QUOTE(blitZ @ Mar 27 2007, 02:32 PM) *

You can always create a vew, which selects a linked table. This would be helpful transitioning from development to production environments. Create the view with same name in both environments which point to the corresponding linked table, dev or prod. In SQL 7 and later, you can do inserts, updates and selects on views.

CREATE VIEW viewName
AS
Select *
from linkedtabe



right....but that doesn't help in this case because essentially the SPs are already referencing views in many cases, which do just what suggested.
drewvw
QUOTE(SirAndy @ Mar 27 2007, 02:41 PM) *


is the target server is available on the network under the same name as used in the SP?



yes it is, however no links in the test db reference it

QUOTE(SirAndy @ Mar 27 2007, 02:41 PM) *


is your dev network connected to the live network? if so, you need to make sure that your SQL setup points to the correct linked SQL server ...

can you access the linked server directly using a ODBC DSN?



I will pass that on to the DBA, but we are able to access tables via Query Analyzer.

local statements work fine too...its just when you try to ref the Linked Server


i appreciate the input from everyone, today has sucked.
SirAndy
does the linked server run on a non-standard port? idea.gif

i *always* use a port other than 1433 for production SQL servers, even if they're not in the open and firewalled.

if so, it could be that it's missing a setting and tries to access it through the standard port ...

just blurting out stuff ...
biggrin.gif Andy
sjhowitson
popcorn[1].gif
drewvw

I'm back..sorry fighting a cold i had to rest for a bit.


i appreciate the blurting im sending along everything you guys are saying to the DBA.

I am going to try a couple more things ill get back to you.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.