Enterprise Manager - SQL Server Registration script

  • Hi

    We work in a large enterprise as developers. Our workstations and network are administered remotely and we have little ability to influence policies and have limited admin rights on our workstations.

    We need access to 5 servers. If we go into SQL Enterprise manager we can register our 5 servers. This persists as long as we dont reboot the workstation. On re-boot all the registrations are lost.

    Is there a command line on Enterprise Manager or series of registry entries that I can run that will register all my servers from a script.

    PS my servers need to be registered in order to get into SQL Query analyser so that would not be a solution!!!!

    Thanks

    Chris

  • register your servers, and then call regedit.

    browse to this key:

    [HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\80\Tools\SQLEW\Registered Servers X\SQL Server Group]

    you'll see all the servers you registered; simply export that key.

    to test, delete the key within Regedit and then call Enterprise Manager; no servers appear.

    double click the saved export registry to insert the keys for the local user currently logged in; call Enterprise manager again and poof the servers are restored.

    HTH

     

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I tried exporting to another machine's EM but did not work (left my previous entries blank). Is this a requirement to import back to the original server? I'm hesitant to delete the key from here!!

    Thanks!!

  • i guess i'm confused a bit.... this works perfectly on my machine; let me explain a bit:

    enterprise manager looks on the local machine for the key we exported....

    so when i exported the key Registered Servers X, which contained all it's subkeys and values to the text file, that file should be potable to another user's machine... so if i logon to machine_89 as myself, and run that .reg file, then when i run enterprise manager, all the servers show up in EM for me to connect to witht eh saved connection information that exists int eh data of the regkey.

    this key does not get installed on the server, unless you are connecting to all the other servers via EM/QA from that server.....

     

    i was assuming this was because some network profile was preventing you from saving this information inthe registry, and only allowing working values....

    can you explain what you expect the reg key to do?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks Lowell

     

    This works perfectly!!!

    Just what I was looking for.

     

    Chris

    To chubbsm

    You imply you are doing this on the server. It should be from the workstation that is running EM.

     

    Chris

  • What I did was to export the reg key from my primary workstation and brought it over to another workstation. I went into regedit and deleted the key. I then double clicked on the the key I brought over. I could see all the registered servers in regedit but when I brought up EM it saw none?

    Maybe I'm doing something wrong; will try again!

  • I just tried it a couple more times, it actually added all the groups I have defined but none of them have the server entries. I can see the entries in regedit but not showing in EM.

    I'm probably going off on another tangent here but I deleted Registered servers X and then closed regedit. Bringing up EM shows the default group? (of course it's empty!) I would think this group would be gone? Back to regedit; Registered Servers X is back with the empty default group? I didn't try recovering any registry keys so it must be picking it up from somewhere else.

    Thanks (this sounds like a good idea, I just haven't tried deleting my primary WS entries!)

  • if EM was open when you imported the key, the changes would not show up...whem EM closes, it overwrites the keys with it's running configuration....

    you need to make sure EM is closed, import the key, then open EM to see the servers you imported from the otehr developer's settings.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • That's the way I had been doing it, closing EM before importing registry. Maybe service pack issue or something with the machine I'm exporting to.

    Oh well!! Thanks anyways!

Viewing 9 posts - 1 through 8 (of 8 total)

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