Solved

Create database login and user using SMO

Posted on 2011-09-13
1
362 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

733 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