Solved

Create database login and user using SMO

Posted on 2011-09-13
1
356 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
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
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.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now