Re: Using osql.exe to set account permissions?

From: Keith Kratochvil (
Date: 06/11/02

From: "Keith Kratochvil" <>
Date: Tue, 11 Jun 2002 09:57:58 -0500

This should be possible. I would try this using three separate calls to the
database server. You will need to call

You can find out about the specific usage of these commands within Books
Online. If you do not have it already, you can download it from Microsoft:

Keith, SQL Server MVP
"John" <> wrote in message
> I have MSDE installed on my system and I need to create a login and set
> permissions with osql.exe (specifically I am trying to do the "Set Account
> Permissions for the SQL Server" as mentioned in this tech article
>;en-us;Q322235). I would
> like to use Enterprise Manager but I do not have access to it. Can I do
> following using osql.exe:
> Create a New Login
> Enter the Domain\UserName for the login
> Set the login for the database box_LM_W3SVC_1_Collab
> Permit database access for that login to that database
> Turn on the db_datareader role for that login for that database
> Can all of the above be done using osql.exe or any other utility that
> with the standard MSDE install? If it can be done how would I do it?
> Thank you to anyone that can provide help!
> Best Regards,
> John

Relevant Pages

  • Re: Install MSDE w/ MSDE Depl.Toolkit. What permissions when using Win Auth?
    ... I created a login using Enterprise Manager on SQL Server on my server. ... Database Access tab I ticked the tick box for the database that I ... Now when my user installed the MSDE database on his machine locally, ...
  • Re: SQL Server 2005 Express Remote connection
    ... I have also deleted the login for Fred from the list of users for my ... So Fred no longer exists as a login or as a user in the SQL Server setup. ... the database? ...
  • Re: Installation OK, but cant connect
    ... > created an access database. ... SQL Server authentication is "client" independent.... ... connections or SQL Server authenticated connections... ... which authenticate user's login at the windows login step... ...
  • Re: Moving a database to another server
    ... onto a server at home. ... The database has a user that has public, db_owner, ... SQL Server login or a Windows login. ...
  • Re: Setting up Linked server to MsAccess
    ... At the server level I have added my windows user group ... At the database level I have added my Server login ...