Sp_addlogin

Jul 18, 2006

hi,

I have an VB .NET 2005 application which should create a database and a user on an SQL server both for SQL 2000 and SQL 2005. The last not tested yet. I use SQLConnection to comunicate with the server. I can make the database no problem, but I can't add a new user.The user that runs this stored procedure has rights to execute this procedure. When I try to use the stored procedure: "sp_addlogin" I get the following error :

"-- 'sp_addlogin' was found in the text of this event.
-- The text has been replaced with this comment for security reasons."

Does anyone have any clue what's wrong?

Thanks.

View 7 Replies


ADVERTISEMENT

Sp_addlogin

May 14, 2008

i just want the user have the ability to do sp_addlogin.
pls help me

i successfully ran this query
grant execute on sp_addlogin to userLogin

but when i login with userLogin. It wont work

View 7 Replies View Related

How To Use Sp_addlogin

Jan 10, 2006

Hi all,

I want to add a windows user login which looks like: MachineNameUserName, however back slash "" is not allowed in ap_addlogin. With UserName only, the privileges are not granted correctly as far as I tested. How can I walk around? Any ideas? I use SQL express.

Br,

XZ

 

 

View 3 Replies View Related

Sp_addlogin (SQL2K)

May 9, 2008



Hello,

I am trying to script out a new login in SQL 2000. I can script the login, but I am trying to assign the correct permissions, (e.g. db_datawriter, db_owner) and I am have trouble scripting the permissions. Here is a snippet of what I am looking to accomplish in my script. Remeber, this is 2000 not 2005...

-- This works
exec sp_addlogin @loginame = 'LoginName'
,@passwd = 'Password'
,@defdb = 'Database'
go

-- This doesn't. I am not even sure if this is what I need...
exec sp_addrolemember @rolename = 'AdminCVB'
,@membername = 'db_owner'
go

View 3 Replies View Related

Need Sp_addlogin With CHECK_POLICY = OFF

Jul 17, 2006

Hi

We are using SQL Server-2005 as backend,

i had code like,

sp_addlogin 'a', 'a'

this give error as

"Password validation failed. The password does not meet Windows policy requirements because it is not complex enough"

as this is not full fill the Windows Password policy.

I too check the Local Security Settings is disable for the password settings.

I know i can use

CREATE USER <user> , CHECK_POLICY =OFF

but i want to set CHECK_POLICY =OFF, with the

sp_addlogin stored Procedure.

Any help,hint or code to solve this ???

Regards,

Thanks.

Gurpreet S. Gill







View 8 Replies View Related

Sp_addlogin With @encryptopt = &#39;skip_encryption&#39;

Jan 23, 2001

I am using sp_addlogin ...,@encryptopt = 'skip_encryption' to transfer logins from one machine to another. This works fine for most users but there is a problem with some. As far as I can tell the only pattern is that the ones that fail were originally upgraded from 6.5. They all have a xstatus of 2050 in the sysxlogins table.

View 1 Replies View Related

SQL Server 2005 SP_ADDLOGIN

Feb 2, 2007

Hello Everyone,

We have a mixed environment consisting of some SS2005 with most servers still running on SS2000. Several operating systems are in use. We use mixed mode authentication. To date, all of our SS2005 servers have been installed on Windows Server 2003. In each of these environments we have the password policies disabled on the operating system side (Administration Tools | Local Security Policy). On these servers we have been able to successfully use SP_ADDLOGIN to add logins for SQL Server authentication.

Recently I installed SQL Server 2005 on Windows 2000 SP4 (old I know) as a test environment. Like the 2003 servers, password policies and complexity are shutoff. When I attempt to use SP_ADDLOGIN, however, here I receive:

Server: Msg 15118, Level 16, State 1, Line 1
Password validation failed. The password does not meet Windows policy requirements because it is not complex enough.

Is this a know occurance on the older operating system?

View 6 Replies View Related

Sp_addlogin, Sp_adduser - Error 21770

May 10, 1999

I am trying to add a new user (SQL Server 6.5) from an application program (Delphi 4.0). I was hoping I could do this in a stored procedure that basically acts a a wrapper around the SQL Server stored procedures.

It partially works - here is my procedure:

create procedure AddUserToSQLServer(@loginame varchar(30),
@Password varchar(30) ) as
begin

-- Add User to SQL Server Database
exec mydb.dbo.sp_addlogin @loginame,@Password,'mydb'

exec mydb.dbo.sp_adduser @loginame

end

The sp_addlogin adds the login and sets the default database as mydb. This is OK, except the user still can not login to the application. So I added the sp_adduser. This gives the user access to the application, but I still have a problem. When I go into Executive Manager, and go to the Manage Logins screen by double-clicking on the newly added user, I get the message "Error 21770: The name 'loginame' was not found in the users collection" where loginame is the users login. I click OK to this message, and the user is displayed on the manage logins screen. Their default database is mydb, a check is in the Permit box and their username is in the User column. Alias and Group are blank. When I try to drop the user, I get the same error again (2 times), then error "Error 15175: [SQL Server] login 'loginame' is aliased or mapped to a user in one or more database(s), drop user or alias before dropping login".

The only thing I found that works is to go to SQL and issue sp_dropuser loginame, then I can drop the user.

Anybody see what's wrong? Or know of a FAQ that addresses this situation?

Thanks

Wayne

View 1 Replies View Related

Forcing Password Policy By Modifying Sp_addlogin

Nov 4, 2004

Hi,
did anybody tri force password policy by modifing
sp_addlogin
and
sp_password

Raising custom error if password to be inserted or cnanged does not meet company policy.

Why microsoft did not add this condition in code?

Thank you
Alex

View 2 Replies View Related

Does Security Admin Have Access To Create Logins Using Sp_addlogin

May 31, 2007

i have an asp.net web application that uses SQL2000 backend. any users login to the application using a proper SQL login. so each user has unique logins

One of the roles within the application is to allow the user to create new logins for the application which inturn creates a SQL login. for this i have been using the following special sp's within an application specific sp:-

EXEC sp_addlogin @strUsername, null, 'WEA_MIS', @loginlang
EXEC sp_grantdbaccess @strUsername, @strUsername
EXEC sp_addrolemember @strRole, @strUsername
EXEC sp_password NULL, @strPassword, @strUsername




the only way ican get this to run is if the user executing the sp is a member of sys admin, ideally i dont want to be giving anyone access to sys admin. i thought security admin would allow me to do the above but it doesnt. Is there any other ways or ideas to get around this problem

Cheers,
Craig

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved