Hi
I know this is a security problem but i am unsure which access i need to give the account, basically im running the stored procedure as below,
exec('CREATE USER ' + '[' + @Login +']' + ' FOR LOGIN [' + @Login + '] WITH DEFAULT_SCHEMA=[dbo]'),
however when a user runs it it will create the user account however it doesn't use the default schema as dbo instead it uses the login name.
It runs fine if i do it so im guessing theres a permission im missing on the dbo schema for the user.
any help would be appreciated.
I know this is a security problem but i am unsure which access i need to give the account, basically im running the stored procedure as below,
exec('CREATE USER ' + '[' + @Login +']' + ' FOR LOGIN [' + @Login + '] WITH DEFAULT_SCHEMA=[dbo]'),
however when a user runs it it will create the user account however it doesn't use the default schema as dbo instead it uses the login name.
It runs fine if i do it so im guessing theres a permission im missing on the dbo schema for the user.
any help would be appreciated.