Tuesday, March 27, 2012
Create table rights
I have given a user ddladmin to a database, but this user still can't create
tables. I tried to "grant create tables to username" that ran sucessfully
but still can't create a table in my DB.
Can anyone tell me what I missed for this user? he can drop tables but not
create them.
Thanks,
JoeWith the specific 'create table' permission or the DDLAdmin role membership
that should permit the user to creatr the table.
How is the user atempting to create the table? Are they executing a DDL
script? If they are executing a script, make sure that the CREATE TABLE
script does not have the dbo context set in the table name. If it does, an
d
the user executing the scriipt is not a DBO, then they will be unable to
successfully create the table. If the script does have dbo. in the table
name, just remove the dbo. from the name and try executing it.
"jaylou" wrote:
> hi All,
> I have given a user ddladmin to a database, but this user still can't crea
te
> tables. I tried to "grant create tables to username" that ran sucessfully
> but still can't create a table in my DB.
> Can anyone tell me what I missed for this user? he can drop tables but no
t
> create them.
> Thanks,
> Joe
>|||Hi,
Looks like some one DENY the create table previlage for that user. But in
this case a GRANT command will over rule the DENY.
Could you post the exact error you are getting after running the GRANT
statement.
Thanks
Hari
SQL Server MVP
"jaylou" <jaylou@.discussions.microsoft.com> wrote in message
news:8DF5770F-4D14-4ADE-A3F1-2A47AFB3AAD4@.microsoft.com...
> hi All,
> I have given a user ddladmin to a database, but this user still can't
> create
> tables. I tried to "grant create tables to username" that ran sucessfully
> but still can't create a table in my DB.
> Can anyone tell me what I missed for this user? he can drop tables but
> not
> create them.
> Thanks,
> Joe
>|||i think the user is be a member of a denied group
or he is denied as an individual
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"jaylou" wrote:
> hi All,
> I have given a user ddladmin to a database, but this user still can't crea
te
> tables. I tried to "grant create tables to username" that ran sucessfully
> but still can't create a table in my DB.
> Can anyone tell me what I missed for this user? he can drop tables but no
t
> create them.
> Thanks,
> Joe
>|||Hi Hari,
Here is the error I get when I try to create a table with this userID
"Server: Msg 262, Level 14, State 1, Line 1
CREATE TABLE permission denied in database 'SOXstuff'."
I don't need to add him to a server role as well as the DB_DDLADMIN?
Thanks again,
Joe
"Hari Prasad" wrote:
> Hi,
> Looks like some one DENY the create table previlage for that user. But in
> this case a GRANT command will over rule the DENY.
> Could you post the exact error you are getting after running the GRANT
> statement.
> Thanks
> Hari
> SQL Server MVP
>
>
> "jaylou" <jaylou@.discussions.microsoft.com> wrote in message
> news:8DF5770F-4D14-4ADE-A3F1-2A47AFB3AAD4@.microsoft.com...
>
>|||hi Jose,
Is there a way to find out if he is being denied? I have granted him
DB_DDLADMIN rights to the database. that should over ride the deny correct?
Thanks,
Joe
"Jose G. de Jesus Jr MCP, MCDBA" wrote:
[vbcol=seagreen]
> i think the user is be a member of a denied group
> or he is denied as an individual
>
> --
> Jose de Jesus Jr. Mcp,Mcdba
> Data Architect
> Sykes Asia (Manila philippines)
> MCP #2324787
>
> "jaylou" wrote:
>|||If I try to create in EM. I get a message saying:
I am not logged on as databse owner or SA.
When I try to save it it tells me I dnt have create rights.
Do I need to be SA or owner to create a table? I didnt think I had to be.
"Hari Prasad" wrote:
> Hi,
> Looks like some one DENY the create table previlage for that user. But in
> this case a GRANT command will over rule the DENY.
> Could you post the exact error you are getting after running the GRANT
> statement.
> Thanks
> Hari
> SQL Server MVP
>
>
> "jaylou" <jaylou@.discussions.microsoft.com> wrote in message
> news:8DF5770F-4D14-4ADE-A3F1-2A47AFB3AAD4@.microsoft.com...
>
>|||Hi Hari
Which case are you talking about that GRANT will overrule a DENY?
Thanks
Kalen Delaney
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:Od%237RfPrFHA.528@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Looks like some one DENY the create table previlage for that user. But in
> this case a GRANT command will over rule the DENY.
> Could you post the exact error you are getting after running the GRANT
> statement.
> Thanks
> Hari
> SQL Server MVP
>
>
> "jaylou" <jaylou@.discussions.microsoft.com> wrote in message
> news:8DF5770F-4D14-4ADE-A3F1-2A47AFB3AAD4@.microsoft.com...
>
>|||Kalen,
From my understanding Grant will override the exsisting deny as well as a
deny staement will override the exsisting Grant. I may be wrong since I can
t
seem to get my user create table rights in my DB without giving DB_Owner
rights.
"Kalen Delaney" wrote:
> Hi Hari
> Which case are you talking about that GRANT will overrule a DENY?
> Thanks
> Kalen Delaney
> "Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
> news:Od%237RfPrFHA.528@.TK2MSFTNGP09.phx.gbl...
>
>|||Don't think a grant overrides a deny. Deny takes precedence.
It almost sounds like you may be referring to revoke which
removes a previously granted or denied permission. Revoke
and Deny are very different.
-Sue
On Tue, 30 Aug 2005 13:19:07 -0700, jaylou
<jaylou@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Kalen,
>From my understanding Grant will override the exsisting deny as well as a
>deny staement will override the exsisting Grant. I may be wrong since I ca
nt
>seem to get my user create table rights in my DB without giving DB_Owner
>rights.
>"Kalen Delaney" wrote:
>
Sunday, March 11, 2012
Create Proc Parameter Issue
I have created a stored proc that is set to accept @.username =
varchar(40)...it fails when the username is FULLY qualified with Domain name
...ex: 'MyDomain\Username'...how do I get my procedure to except this FULL
name?
Thanks...M.Please post some sample code on how you execute that.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Michelle" <smiley2211@.yahoo.com> schrieb im Newsbeitrag
news:eVrMaXrZFHA.3220@.TK2MSFTNGP14.phx.gbl...
> Hi All,
> I have created a stored proc that is set to accept @.username =
> varchar(40)...it fails when the username is FULLY qualified with Domain
> name ...ex: 'MyDomain\Username'...how do I get my procedure to except this
> FULL name?
> Thanks...M.
>|||The datatype for usernames in SQL (as used in the system tables) is sysname,
which is equivalent to nvarchar(128). Use that instead of varchar(40).
Jacco Schalkwijk
SQL Server MVP
"Michelle" <smiley2211@.yahoo.com> wrote in message
news:eVrMaXrZFHA.3220@.TK2MSFTNGP14.phx.gbl...
> Hi All,
> I have created a stored proc that is set to accept @.username =
> varchar(40)...it fails when the username is FULLY qualified with Domain
> name ...ex: 'MyDomain\Username'...how do I get my procedure to except this
> FULL name?
> Thanks...M.
>|||Yes, I tried sysname as well...still errors: "Associated statement is not
prepared"
************snippet********
CREATE PROCEDURE sp_getprivs (@.username sysname = null) AS
set nocount on
declare @.dbn varchar(30)
declare test cursor for
select name from master..sysdatabases
etc....
*****************
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:%23$f5sirZFHA.3780@.tk2msftngp13.phx.gbl...
> The datatype for usernames in SQL (as used in the system tables) is
> sysname, which is equivalent to nvarchar(128). Use that instead of
> varchar(40).
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Michelle" <smiley2211@.yahoo.com> wrote in message
> news:eVrMaXrZFHA.3220@.TK2MSFTNGP14.phx.gbl...
>|||Sorry...I execute this as such...
sp_getprivs 'MyDomain\Username'
Thanks...M
"Michelle" <smiley2211@.yahoo.com> wrote in message
news:ukE3YorZFHA.2496@.TK2MSFTNGP14.phx.gbl...
> Yes, I tried sysname as well...still errors: "Associated statement is not
> prepared"
> ************snippet********
> CREATE PROCEDURE sp_getprivs (@.username sysname = null) AS
> set nocount on
> declare @.dbn varchar(30)
> declare test cursor for
> select name from master..sysdatabases
> etc....
> *****************
>
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid>
> wrote in message news:%23$f5sirZFHA.3780@.tk2msftngp13.phx.gbl...
>|||Try using delimiters:
sp_getprivs '[MyDomain\Username]'
Jacco Schalkwijk
SQL Server MVP
"Michelle" <smiley2211@.yahoo.com> wrote in message
news:OhhR1qrZFHA.2412@.TK2MSFTNGP10.phx.gbl...
> Sorry...I execute this as such...
> sp_getprivs 'MyDomain\Username'
> Thanks...M
> "Michelle" <smiley2211@.yahoo.com> wrote in message
> news:ukE3YorZFHA.2496@.TK2MSFTNGP14.phx.gbl...
>|||Thanks, that worked...
...M
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:ui3WLisZFHA.2884@.tk2msftngp13.phx.gbl...
> Try using delimiters:
> sp_getprivs '[MyDomain\Username]'
>
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Michelle" <smiley2211@.yahoo.com> wrote in message
> news:OhhR1qrZFHA.2412@.TK2MSFTNGP10.phx.gbl...
>
Thursday, March 8, 2012
Create new login non case sensitive
I am trying to create a new login on a database, and I want that username and password NOT to be case sensitive. Do I have to set this at the server level or can I set this in the SQL script?
Here is the script I am currently using...
IF EXISTS (SELECT * FROM dbo.sysusers WHERE [name] = 'UName')
BEGIN
EXEC sp_dropuser 'UserName'
EXEC sp_droplogin 'UserName'
END
EXEC sp_addlogin 'UserName', 'Password', 'Database'
GO
EXEC sp_adduser 'UserName', 'Password', 'db_datareader'
GO
Any help would be appreciated...
David
SQL Server 2005 only uses case sensitive password, this is an intentional behavior change for SQL Server 2005.See http://msdn2.microsoft.com/en-us/library/ms143359.aspx for more details.
Thanks,
-Raul Garcia
SDE/T
SQL Server Engine
|||Also, the sp_adduser statement is incorrect - there is no password for users; the second parameter of sp_adduser is the user's name in the database. See http://msdn2.microsoft.com/en-us/library/ms181422.aspx for more information on sp_adduser.
Thanks
Laurentiu
Wednesday, March 7, 2012
create login for existing database user
I've this problem with a database user that was restored from a backup. If i
want to re-create the same username for sql login, it fails. This also
happens when i try to delete the user to set the ownership to someone else.
Is it possible to work around it.
THX!
See sp_change_users_login in SQL Server 2000 Books Online. I have some code
that identifies all such logins. For more information on this, go to:
http://vyaskn.tripod.com/troubleshoo...phan_users.htm
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Ezekil" <ezekiel@.lycos.nl> wrote in message
news:uQsqA3lbEHA.1292@.TK2MSFTNGP11.phx.gbl...
Hello,
I've this problem with a database user that was restored from a backup. If i
want to re-create the same username for sql login, it fails. This also
happens when i try to delete the user to set the ownership to someone else.
Is it possible to work around it.
THX!
|||I think because of you have orphaned users.
Try to use 'sp_change_users_login' you can find detailed information on BOL.
"Ezeki?l" wrote:
> Hello,
> I've this problem with a database user that was restored from a backup. If i
> want to re-create the same username for sql login, it fails. This also
> happens when i try to delete the user to set the ownership to someone else.
> Is it possible to work around it.
> THX!
>
>
|||Hello
Please refer to the following article for more information on this topic :
240872 HOW TO: Resolve Permission Issues When You Move a Database Between
http://support.microsoft.com/?id=240872
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Hi,
I tried to run sp_change_users_login from the query analyzer, but with no
success. Could you give me an example how to use it?
THNX!
"Umut Nazlica" <UmutNazlica@.discussions.microsoft.com> wrote in message
news:5C2324D3-ACB0-45DE-A89F-22DA6A8E5CD8@.microsoft.com...
> I think because of you have orphaned users.
> Try to use 'sp_change_users_login' you can find detailed information on
BOL.[vbcol=seagreen]
>
> "Ezekil" wrote:
If i[vbcol=seagreen]
else.[vbcol=seagreen]
|||Hi,
I assume that you have the login already exists in SQL Server.
Let's say username : user login_name: login
sp_change_users_login 'UPDATE_ONE', 'username', 'login'
Regards..
"Ezeki?l" wrote:
> Hi,
> I tried to run sp_change_users_login from the query analyzer, but with no
> success. Could you give me an example how to use it?
> THNX!
> "Umut Nazlica" <UmutNazlica@.discussions.microsoft.com> wrote in message
> news:5C2324D3-ACB0-45DE-A89F-22DA6A8E5CD8@.microsoft.com...
> BOL.
> If i
> else.
>
>
create login for existing database user
I've this problem with a database user that was restored from a backup. If i
want to re-create the same username for sql login, it fails. This also
happens when i try to delete the user to set the ownership to someone else.
Is it possible to work around it.
THX!See sp_change_users_login in SQL Server 2000 Books Online. I have some code
that identifies all such logins. For more information on this, go to:
http://vyaskn.tripod.com/troubleshooting_orphan_users.htm
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Ezekiël" <ezekiel@.lycos.nl> wrote in message
news:uQsqA3lbEHA.1292@.TK2MSFTNGP11.phx.gbl...
Hello,
I've this problem with a database user that was restored from a backup. If i
want to re-create the same username for sql login, it fails. This also
happens when i try to delete the user to set the ownership to someone else.
Is it possible to work around it.
THX!|||Hello
Please refer to the following article for more information on this topic :
240872 HOW TO: Resolve Permission Issues When You Move a Database Between
http://support.microsoft.com/?id=240872
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Hi,
I tried to run sp_change_users_login from the query analyzer, but with no
success. Could you give me an example how to use it?
THNX!
"Umut Nazlica" <UmutNazlica@.discussions.microsoft.com> wrote in message
news:5C2324D3-ACB0-45DE-A89F-22DA6A8E5CD8@.microsoft.com...
> I think because of you have orphaned users.
> Try to use 'sp_change_users_login' you can find detailed information on
BOL.
>
> "Ezekiël" wrote:
> > Hello,
> >
> > I've this problem with a database user that was restored from a backup.
If i
> > want to re-create the same username for sql login, it fails. This also
> > happens when i try to delete the user to set the ownership to someone
else.
> >
> > Is it possible to work around it.
> >
> > THX!
> >
> >
> >
create login for existing database user
I've this problem with a database user that was restored from a backup. If i
want to re-create the same username for sql login, it fails. This also
happens when i try to delete the user to set the ownership to someone else.
Is it possible to work around it.
THX!See sp_change_users_login in SQL Server 2000 Books Online. I have some code
that identifies all such logins. For more information on this, go to:
http://vyaskn.tripod.com/troublesho...rphan_users.htm
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Ezekil" <ezekiel@.lycos.nl> wrote in message
news:uQsqA3lbEHA.1292@.TK2MSFTNGP11.phx.gbl...
Hello,
I've this problem with a database user that was restored from a backup. If i
want to re-create the same username for sql login, it fails. This also
happens when i try to delete the user to set the ownership to someone else.
Is it possible to work around it.
THX!|||I think because of you have orphaned users.
Try to use 'sp_change_users_login' you can find detailed information on BOL.
"Ezeki?l" wrote:
> Hello,
> I've this problem with a database user that was restored from a backup. If
i
> want to re-create the same username for sql login, it fails. This also
> happens when i try to delete the user to set the ownership to someone else
.
> Is it possible to work around it.
> THX!
>
>|||Hello
Please refer to the following article for more information on this topic :
240872 HOW TO: Resolve Permission Issues When You Move a Database Between
http://support.microsoft.com/?id=240872
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Hi,
I tried to run sp_change_users_login from the query analyzer, but with no
success. Could you give me an example how to use it?
THNX!
"Umut Nazlica" <UmutNazlica@.discussions.microsoft.com> wrote in message
news:5C2324D3-ACB0-45DE-A89F-22DA6A8E5CD8@.microsoft.com...
> I think because of you have orphaned users.
> Try to use 'sp_change_users_login' you can find detailed information on
BOL.[vbcol=seagreen]
>
> "Ezekil" wrote:
>
If i[vbcol=seagreen]
else.[vbcol=seagreen]|||Hi,
I assume that you have the login already exists in SQL Server.
Let's say username : user login_name: login
sp_change_users_login 'UPDATE_ONE', 'username', 'login'
Regards..
"Ezeki?l" wrote:
> Hi,
> I tried to run sp_change_users_login from the query analyzer, but with no
> success. Could you give me an example how to use it?
> THNX!
> "Umut Nazlica" <UmutNazlica@.discussions.microsoft.com> wrote in message
> news:5C2324D3-ACB0-45DE-A89F-22DA6A8E5CD8@.microsoft.com...
> BOL.
> If i
> else.
>
>
Friday, February 24, 2012
Create failed for User Computername\Username
Hello,
After creating a new SSMSExpress Login username account, Iuse it as the Database User of the attached database (aspnetdb.mdf), but Ireceive this error.
...
Additional information:
->An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.Express.ConnectionInfo)
->The login already has an account under a different user name. (Microsoft SQL Server,
Error: 15063)
...
I am sure such username account is not yet members of that database(aspnetdb.mdf) for this are the users present
-dbo
-guest
-INFORMATION_SCHEMA
-sys
-COMPUTERNAME\ASPNET
-CONPUTERNAME\IUSR_COMPUTERNAME
cheers,
imperialx
Logins and users are two different things.
Logins are defined at global level. Users are simply a mapping from a login to a username.
Try opening SSMSE and open the security folder. Under logins you will see all the "logins" (users) that have already been created. I bet the user you are trying to create is in that list.
Hope it points you in the right direction
Friday, February 17, 2012
Create database with username and password
Hello!
I can't figure it out how to create a database with an username and a password. I'm using Visual Studio 2005 and Microsoft SQL Server 2005.
Can someone help me out?
Greetings,
Persyn Bert.
u need to use CREATE LOGIN & CREATE USER....for more check
http://msdn2.microsoft.com/en-us/library/ms173463.aspx
also,i think need to go thru the SQL server security model once...
http://www.developer.com/tech/article.php/721441
.....its an old article but still will gv a very clear picture
|||Hello Imran Nathani!
Thank you for responding, but I what I really want to know is how tosecure a database with a username and password, not creating users in a table of a database.
Greetings
Persyn Bert
|||i think thats what i have given...............|||
Oops, I'm very sorry...
Where do I past the code for execution?
Greetings
Persyn Bert
I appreciate your help!
Greetings
Persyn Bert