Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
peted
Starting Member
2 Posts |
Posted - 2003-12-16 : 07:16:29
|
| Probably a well cover topic, i have search for an answer for my quiery but no luck,i have a list of servers i add using sp_addlinkedserver, sometimes the server is not avialble of there is a security problem getting a connection. as sp_linkedserver just adds the server name to the sysservers table without checking if the server can be contacted or even if it exists.anybody know of a way to check the security/exsistance of a server once it is linked? this needs to be done in a loop to check all servers can be contacted without bombing the job out.any help would be great. |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2003-12-16 : 08:03:02
|
| I'm sure somebody could come up with something more sophisticated.....but the following might provide a useful (temporary) hack....first....you could (using xp_cmdshell) ping the server to see if it is alivethen if that works....you could select top 1 getdate() from servername.master.dbo.sysservers to prove sql is active on the relevant machine.if there's a permissions problem....then maybe the latter will show up a particular errorcode? (in my environment...i don't have a permissions problem...(and don't want to create one either)) |
 |
|
|
peted
Starting Member
2 Posts |
Posted - 2003-12-17 : 04:39:41
|
| Thanks for the response,the problem is that any command that requires access to the linked server will bomb out the whole program, even is the cmd is exec (@cmd) or sp_executesql, the code is terminated with wahtever erro be it not found or access denied. This also means i cannot set a flag against the offending server.I just need to get through the list of servers. |
 |
|
|
|
|
|