Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alter Login/Create Login
Message
From
04/05/2006 04:09:51
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01118735
Message ID:
01119045
Views:
25
Richard,

I wasnt aware of that, however you could take the same approach with the CREATE LOGIN command.

Something like:

Exec('Create Login ' + @SomeUser)

Regards

Jon

>sp_addlogin is being removed in the next version of SQL Server. That's why I did not use that.
>
>Thanks though.
>
>
>>Soemthing like this
>>
>>Declare @SomeUser Varchar(128)
>>set @SomeUser = 'FredtheBed'
>>
>>EXEC sp_addlogin @SomeUser, 'food', 'isc_clients'
>>
>>
>>>Is there a way to accomplish something like:
>>>
>>>
>>>CREATE PROCEDURE Secure.dbo.AddUser
>>>@SomeUser Varchar(128)
>>>
>>>
>>>CREATE LOGIN @SomeUser with password = '93846756', default_database='Secure'
>>>create user @SomeUser
>>>
>>>
>>>I have found a post that suggests a building string and using EXEC. Is there some other way? If not, I'll deal.
>>>
>>>TIA
>>>Richard
Previous
Reply
Map
View

Click here to load this message in the networking platform