Author |
Topic |
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-06-26 : 15:24:16
|
I have a script that I run few times a month.The data i need to access is stored locally in one of a company's servers. I have created a script that collect some info from other remote servers, my script usually runs remotly using Remote desktop and then access windows command to execut a .SQL file.My situation is : At the run time of my script remotly, I will need to compare some data from the first server with data that's stored in the client databases (remote) using my local machine (Remote desktop). It is complex in away that there will be 3 machine involved. Im thinking to generate text files from my local database manually, load the same data into a the remote servers, and them run the audit from my machine.Please, any idea, thought, suggestion will be appreciated! this is SQL 2000 :)Thanks,--------------------------Get rich or die trying-------------------------- |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
xhostx
Constraint Violating Yak Guru
277 Posts |
|
xhostx
Constraint Violating Yak Guru
277 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-06-27 : 12:54:20
|
quote: Originally posted by tkizer Yes. Please lookup linked servers in Books Online. Linked servers allow you to query a remote server using the 4-part naming convention.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
Thanks, I have advanced a little bit:EXEC sp_addlinkedserver @server='Servername', @srvproduct='SQLOLEDB',@provider='SQLOLEDB', @datasrc='100.150.180.99'I succeeded adding this server, I can see it listed when I execute this command:exec sp_linkedserversHowever, when I try select from any tabley using the following, it wont work:select * from [100.150.180.99].dbname.dbo.tablenameI get this error:Server: Msg 7202, Level 11, State 2, Line 1Could not find server '100.150.180.99' in sysservers. Execute sp_addlinkedserver to add the server to sysservers.Any help will be appreciated.Thanks,--------------------------Get rich or die trying-------------------------- |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-06-27 : 13:26:18
|
quote: Originally posted by tkizer You need to use the value you specified in @server.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
Yes, that was helpful.SQL server tries to retrieve data but I think for some security reason, I didnt succeed.here is what the error said:Server: Msg 17, Level 16, State 1, Line 1SQL Server does not exist or access denied.I usually access this server through Remote Desktop.Any help please, thanks.--------------------------Get rich or die trying-------------------------- |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-06-27 : 14:45:32
|
quote: Originally posted by tkizer Try adding the port number in @datasrc. I am not sure if it supports it there or not. If it doesn't, you'll need to add a client alias on the first server.IPAddress,PortNumberActually before modifying the linked server, try connecting via Enterprise Manager/Query Analyzer using IPAddress,PortNumber.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
I have added an alia with the same IP address, but EM rejects (failed)I would add the port number but I think the network configuration is setup to reject this type of connection, even tried pingging on the same address IP address with a TIME OUT.Again, If I could get through this security layer, it will succeed!!Do you think login information could be a reason too?Thanks.--------------------------Get rich or die trying-------------------------- |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-06-27 : 15:53:16
|
quote: Originally posted by tkizer If a ping doesn't work, this isn't going to work. The error is very misleading. It never means a security reason. I wish they'd change the text. They made the error even more confusing in newer versions.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
according to my situation this server can only be accessed through REMOTE DESKTOP. do you think they should grant me more privilages?Thanks Tara.--------------------------Get rich or die trying-------------------------- |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|