I do not understand the sequence in which to add logins/users. A couple
of things to note. I can not use vbscript - it has to be done using the
sqldmo objects (or in a sql script).
The sequence I use now is:
1- create login, set default db
2- add login to sql server
3- set db owner
4- create user
5- add user to master db
6- add user to tempdb - blows up here
Error 'Microsoft SQL-DMO: [SQL-DMO]This object is already in a
collection.'
I need the user in 3 dbs. Any help greatly appreciated. Thinking about
it...I bet by adding it to the master db that it is automatically added
to tempdb so I will try to add it to the 2rd db and see if that works.
Thanks!
-Will 2 11312
Will (wm****@msn.com ) writes:
I do not understand the sequence in which to add logins/users. A couple
of things to note. I can not use vbscript - it has to be done using the
sqldmo objects (or in a sql script).
The sequence I use now is:
1- create login, set default db
2- add login to sql server
3- set db owner
4- create user
5- add user to master db
6- add user to tempdb - blows up here
Error 'Microsoft SQL-DMO: [SQL-DMO]This object is already in a
collection.'
I need the user in 3 dbs. Any help greatly appreciated. Thinking about
it...I bet by adding it to the master db that it is automatically added
to tempdb so I will try to add it to the 2rd db and see if that works.
Permit me to be curious why you need to add the user to master and tempdb?
There is rarely any reason to do this, least of all in master.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se
Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinf...ons/books.mspx
I don't know about the tempdb thing, but anytime I want to know how to
do something with script I'll just load up profiler and do it through
the GUI, then pick through the script and clean it up a bit.
Erland Sommarskog wrote:
Will (wm****@msn.com ) writes:
I do not understand the sequence in which to add logins/users. A couple
of things to note. I can not use vbscript - it has to be done using the
sqldmo objects (or in a sql script).
The sequence I use now is:
1- create login, set default db
2- add login to sql server
3- set db owner
4- create user
5- add user to master db
6- add user to tempdb - blows up here
Error 'Microsoft SQL-DMO: [SQL-DMO]This object is already in a
collection.'
I need the user in 3 dbs. Any help greatly appreciated. Thinking about
it...I bet by adding it to the master db that it is automatically added
to tempdb so I will try to add it to the 2rd db and see if that works.
Permit me to be curious why you need to add the user to master and tempdb?
There is rarely any reason to do this, least of all in master.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se
Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinf...ons/books.mspx This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mattsh |
last post by:
I am having some issues adding user logins to SQL Server. When I
search for users in Active Directory from Security->Logins->New Login,
I can search for and add users using the short name (samaccount, ex
domain\abcde). However, when I search for users using their CA name
(ex. domanin\firstname.lastname), the user is not found.
Is there some setting that needs to be activated in SQL Server to see
the CA name as well as the samaccount...
|
by: mgPA |
last post by:
Short: How can I limit the number of concurrent logins to Access
(2000) DB?
Long: I seem to be having the problem discussed in previous postings
of having more than 9 or 10 concurrent logins. If I can limit the
number of concurrent logins to 8 or 9, that would satisfy our needs.
Thanks
|
by: Craig G |
last post by:
i am currently building a small user maintenace system which works across
different SQL db's and servers.
for a logon screen i am using SQLDMO to get a list of all SQLServers on
network, once logged on this then populates a list of db's on that SQL
server. by clicking OK i more or less build a connection string for the
database that the user wishes to maintain.
one of the maintenace functions is to be able to change the user passwords...
|
by: Rico |
last post by:
Hello,
I have an ASP web app with an SQL back end. I am currently migrating to a
new Windows 2003 Server machine and SQL Server 2005 Express. When I import
the old database, I'm trying to grant the IUSR_MachineName account access to
the database, but I can't seem to find that user account. I'm clicking new
users, and when I type this user in, SQL doesn't recognize it, and when I
click "Browse" all I see is BUILTIN/Administrators,...
|
by: Alex |
last post by:
Hi,
I am new to the mysteries of SQLDMO.
I have written a program whereby the user can select which SQL server
to connect to on the Network and this works fine.
I am using the SQLDMO.Application.ListAvailableSQLServers routine and
this works fine.
However, the Server on the users machine appears as 'Local'
| |
by: David |
last post by:
Hi all,
I must be going blind because i can not these options anywhere.
We have a 2005 SQL Server running, what will become a live database
asap. This is running currently within a domain. Unfortunately the
users of the database currently automatically log in using their domain
username. How can this be blocked, so that they have to use a sa style
login. (Is this setup on the ODBC driver end?).
|
by: bob66k88 |
last post by:
What is the easiest way to move SQL Server 2005 databases from one old
server to a new server?
|
by: Lee T. Hawkins |
last post by:
I am having a number of problems over the last two full days trying to get
an ASP.NET 2.0 application to connect to a SQL Server 2005 database...
First off, I built this application w/ Visual Studio 2005 SP1 and had it
working perfectly on my Windows XP machine on SQL Server 2005 Express. I
decided to publish this application to a test development server (with both
the SQL and IIS servers on the same box) running on:
Windows Server...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |