Solved

Create database login and user using SMO

Posted on 2011-09-13
1
359 Views
Last Modified: 2012-06-27
I am trying to create Login and user programatically  using SMO sql 2008
if the login ( i.e testlogin) already exist  in the database then i want to creat a user(i.e test user) and give read only access and map this login and user ..
if the login is new then create a login and user and give the read only access..
how can i do this programatically using SMO sql 2008?

0
Comment
Question by:jung1975
1 Comment
 
LVL 19

Accepted Solution

by:
Rimvis earned 500 total points
ID: 36534406
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Run SQL Server Proc from Access 11 31
sql server tables from access 18 22
sql server service accounts 4 27
How to debug a store procedure in MS SQL 2008? 3 10
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question