To create login in many servers.

  • Hi,

    Its an interview question.How to create a login in 500 servers at one shot????

    Regards,
    Saravanan

  • Just saw this, and didn't want to leave it unanswered.

    If you are on 2005, and can't use PoSh, I'd actually script this with SQLCMD and use VBScript to call SQLCMD with a list of users and servers.

    In PoSh, similar concept. You'll connect to each instance, hopefully with a list of servers, and then run execute the create method on each.

  • Quick trick, in SSMS press CTRL+ALT+G to view Registered Servers, if they are grouped you can right click on the group, new query and that instance of the query will be executed on all servers in that group.

    😎

  • Eirikur Eiriksson (4/24/2015)


    Quick trick, in SSMS press CTRL+ALT+G to view Registered Servers, if they are grouped you can right click on the group, new query and that instance of the query will be executed on all servers in that group.

    😎

    Eirikur, I can't tell you how many times I've told people about the running SQL against multiple servers using the group. They're always so surprised and can't believe it's that easy.

  • Ed Wagner (4/25/2015)


    Eirikur Eiriksson (4/24/2015)


    Quick trick, in SSMS press CTRL+ALT+G to view Registered Servers, if they are grouped you can right click on the group, new query and that instance of the query will be executed on all servers in that group.

    😎

    Eirikur, I can't tell you how many times I've told people about the running SQL against multiple servers using the group. They're always so surprised and can't believe it's that easy.

    I know Ed, such useful things as standardizing colour coding for groups, having DAC groups, importing and exporting groups as .regsrvr etc. just don't seems to get through to them.

    😎

    Maybe you should do a little write up on this, that would be useful!;-)

  • Eirikur Eiriksson (4/24/2015)


    Quick trick, in SSMS press CTRL+ALT+G to view Registered Servers, if they are grouped you can right click on the group, new query and that instance of the query will be executed on all servers in that group.

    😎

    I've known that, though I'd use Red Gate's MultiScript to do it. In this case, I wanted one machine for testing, but that would work for multiple instances.

Viewing 6 posts - 1 through 5 (of 5 total)

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