Curser in SQL(for coonectiong to deifferent servers)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vineetbindal
    New Member
    • Jan 2009
    • 57

    #1

    Curser in SQL(for coonectiong to deifferent servers)

    Hi all,,

    Can someone please give me an idea about writing a stored procedure script which will do the following--

    1. Connect to remote server(if allready coonected delete the current server object and create a new server object).

    2. login to the database on the remote server.

    3. check if a specif stored procedure is there or not(if stored procedure exist delete it and create new... with all the new functionality of that stored procedure)

    4. there is a table name(user log) get all the data from the userlog..

    Can you please help me with that , i need to connect to 4 servers and do that same for all of them.

    if some one can give me an example that will be great other wise please tell me -

    1. how can i detect a server object and if it exist how can i delete it(through sql)

    2. how can i detect ant delete, create stored procedure on remote server through this stored procedure

    Regards,

    Vineet Bindal
Working...