October 10, 2007 at 3:27 pm
Hi
Because of the user credential synchronisation of Navision we want to create logins without a password or may with an empty one. But with: create login xy with password = '' , a message means the password isn't strong enough(realy true).
So with SSMS it is possible to create a login without password. How to do it with a script?
Thanks for help
Jan
October 10, 2007 at 3:45 pm
add this to the end of your create login statement:
, CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
October 10, 2007 at 4:21 pm
Could find it in the help, thanks.
Also you can set the Default_Database. But what about the database role or the system role?
October 10, 2007 at 5:26 pm
Adding role membership is a separate operation from creating a login. Use sp_srvrolemember to make a login a member of a server role and sp_adduser to add a user to a database and make it a member of a database role.
Greg
Greg
October 10, 2007 at 6:10 pm
Greg Charles (10/10/2007)
Use sp_srvrolemember to make a login a member of a server role and sp_adduser to add a user to a database and make it a member of a database role.
With respect to SQL Server 2005, sp_adduser is deprecated. It still works for backward compatibility, but CREATE USER should be used. Use sp_addrolemember to add a database user to a role. For instance:
USE MyDatabase;
GO
CREATE USER JohnDoe FOR LOGIN JohnDoe;
GO
EXEC sp_addrolemember 'MyRole', 'JohnDoe';
GO
K. Brian Kelley
@kbriankelley
October 11, 2007 at 12:18 pm
Doh!! And it's sp_addsrvrolemember to add a login to a fixed server role.
Greg
Greg
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply