Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Add Enterprise Manager registrations quickly

By Jeremy Brown,

Use this Perl script to add Enterprise Manager registrations from a text file. The text file should contain three fields seperated by spaces. The first two fields are the server groups you want to create, and the last is the server name. ex...

Production Accounting ACTPRSQL01
QA Accounting ACTQASQL01

The script also goes out and registers all SQL Servers broadcasting on the network under a category called UNKNOWN.

I have hard-coded the script using integrated security to register the servers, but you can always easily modify this in the RegisterServer subroutine.

If you don't want to lose your current Enterprise Manager config, follow these steps...

1. Open Enterprise Manager

2. Go to Tools > Options.

3. Note the Read/Store user independent option - this is very important!

4. If the box is checked, uncheck it and exit EM. Open regedit (not regedt32, we're not changing registry permissions!). Delete all the subkeys (folders) under ...

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\80\Tools\SQLEW\Registered Servers X

5. If the box is NOT checked, check it and exit EM. Open regedit (not regedt32, we're not changing registry permissions!). Delete all the subkeys (folders) under ...

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

6. Create your text file and run the script.

perl registerservers.pl -fTextFileName.txt

Your EM should now contain a bunch of SQL Servers you have come to love and enjoy, along with a bunch of other ones you had no idea existed. If you want to flip back to your old config, just toggle the Read/Store user independent option back to where it was.

By the way, in case you were asking, you can't simply copy the registry keys from one machine to another. The SQL Server info is encrypted.

Future upgrades: (Ok, known bugs, gee whiz!)

1. Error handling
2. RegisterServer subroutine to not add existing registered servers.
3

Total article views: 269 | Views in the last 30 days: 2
 
Related Articles
FORUM

SQL Server could not register with Microsoft Distributed Transaction Coordinator (MS DTC

SQL Server could not register with Microsoft Distributed Transaction Coordinator (MS DTC

FORUM

Error while registering new Server

Error while registering new Server

FORUM

microsoft sql server management studio is unable to load this document. Class not registered

microsoft sql server management studio is unable to load this document. Class not registered

FORUM

microsoft sql server management studio is unable to load this document. Class not registered

microsoft sql server management studio is unable to load this document. Class not registered

FORUM

Register SQL Server instances in MS.

Powershell Script to register sql server instances automatically to management studio

 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones