Cross server database connection

  • Hi there,

    I need to do Cross server database query pls help me. Scenario below

    Note: All the server is in same network, using sqlserver 2005

    Server A : 10.1.1.1

    Server B : 10.1.1.2

    i am in Server A (10.1.1.1) i need to query like this and get results

    select * from 10.1.1.2.abc.dbo.sysobjects where xtype = 'P'

    if ic an able to do this then i can do a inner join and find out what r the stored procedures missing in both servers.

    basically i need to compare 2 server databases and find out the missing stored procedures or differences

    Cheers

  • You are better off getting RedGate's SQLCompare or ApexSQL's SQLDiff products which do the comparison's for you. RedGate has 14 day free trail and I believe ApexSQL has a trial and a light version for small databases.

    If you have to do it in sql you need to setup a linked server (you can't use IP addresses as the name so you need an alias) which connects using an account that has appropriate rights. Check BOL for linked servers and Aliases.

  • Create a linkedserver and use brackets [] around the ip address.

    Dan

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply