RE: add users in sql server using batch file

From: Peter Feakins (PeterFeakins_at_discussions.microsoft.com)
Date: 08/09/04


Date: Mon, 9 Aug 2004 11:01:03 -0700

You can use osql to execute your sql statements. sp_addlogin is used to add a
sql login, while sp_grantLogin is used to add a windows login.
sp_grantdbaccess can be used to add a user to a database. All are described
with examples in BOL.

"culam" wrote:

> I am trying to add user via batch file.
> Can anyone help me with a command?
>
> Thanks,
> Culam



Relevant Pages