Re: permissions for Desktop engine
From: Dan Guzman (danguzman@nospam-earthlink.net)
Date: 06/06/02
- Next message: Edward Bogaard: "Re: User permission"
- Previous message: Matt House: "Re: SQL Server Advertisements"
- In reply to: Cedric Zaugg: "permissions for Desktop engine"
- Next in thread: Cedric Zaugg: "Re: permissions for Desktop engine"
- Reply: Cedric Zaugg: "Re: permissions for Desktop engine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Dan Guzman" <danguzman@nospam-earthlink.net> Date: Thu, 6 Jun 2002 08:09:22 -0500
You can setup security with system stored procedures and execute these
with the OSQL utility or any ad-hoc SQL application. The basic steps
are to add the login to SQL Server, grant database access and role
membership (optional). Below are some untested examples. See the Books
Online for details.
--add SQL Authentication login
EXEC sp_addlogin 'MyLogin', 'MyPassword'
EXEC sp_defaultdb 'MyLogin', 'MyDatabase'
--add Windows Authentication login (existing Windows user)
EXEC sp_grantlogin 'MyDomain\MyLogin'
EXEC sp_defaultdb 'MyDomain\MyLogin', 'MyDatabase'
USE MyDatabase
--setup object permissions
EXEC sp_addrole 'MyRole'
GRANT ALL ON MyTable TO MyRole
--grant database access
EXEC sp_grantdbaccess 'MyLogin'
EXEC sp_grantdbaccess 'MyDomain\MyLogin'
--add role membership
EXEC sp_addrolemember 'MyRole', 'MyLogin'
EXEC sp_addrolemember 'MyRole', 'MyDomain\MyLogin'
-- Hope this helps. Dan Guzman SQL Server MVP ----------------------- SQL FAQ links (courtesy Neil Pike): http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800 http://www.sqlserverfaq.com http://www.mssqlserver.com/faq ----------------------- "Cedric Zaugg" <czaugg@aesa.ch> wrote in message news:adn6li$h4v$1@rex.ip-plus.net... > Hi, > > How can I setup usernames and passwords for the Desktop engine without > having the Entreprise Manager installed? > > Thanks, > Cedric > >
- Next message: Edward Bogaard: "Re: User permission"
- Previous message: Matt House: "Re: SQL Server Advertisements"
- In reply to: Cedric Zaugg: "permissions for Desktop engine"
- Next in thread: Cedric Zaugg: "Re: permissions for Desktop engine"
- Reply: Cedric Zaugg: "Re: permissions for Desktop engine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|