Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alter Login/Create Login
Message
De
04/05/2006 04:09:51
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01118735
Message ID:
01119045
Vues:
24
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform