Showing posts with label fix. Show all posts
Showing posts with label fix. Show all posts

Tuesday, March 27, 2012

CREATE TABLE rights problems

I cannot fix the rights depending on customers server...

when i create a table dynamicly with ASP.NET for MS SQL 2000, should I use :

CREATE TABLE [dbo] .[Component]

or

CREATE TABLE [Component]

-------

[id_Component] [int] IDENTITY (1, 1) NOT NULL ,

or

[id_Component] [int] IDENTITY (1, 1) COLLATE French_CI_AS NOT NULL ,

-------

shall I add COLLATE French_CI_AS to all columns ?

thank youIf you don't explicitly specify the collation, the system will use the database collation as the default.

It's a best practice to be explicit for DDL/DML. So, [dbo] and [COLLATE] should be specified.|||thank you !

create table permission denied

Hello,
I hope this is something simple to fix, but so far I had no luck...
Situation:
I created sql login, let's say 'test' and allowed access to database
db1. Actually, I made the account as the db_owner of db1. The test
account was not added to any of the server roles. Now, everything is
working fine until I try to create table or view or proc, etc. in the
db1 while logged in as the test user.
When creating table I get that CREATE TABLE permission denied in
database 'db1'. I tried executing GRANT CREATE TABLE after logging on as
sysadmin to that test account. That didn't help. IS there some DENY
somewhere that I don't see? How can I check what is preventing me from
creating table using that account?
Any comments?
Thanksgot it ... database role 'public' had DENY on creating tables. So even
if my test login had GRANT, the DENY on public denied for test as well
because test is public and db_owner.
laimis wrote:
> Hello,
> I hope this is something simple to fix, but so far I had no luck...
> Situation:
> I created sql login, let's say 'test' and allowed access to database
> db1. Actually, I made the account as the db_owner of db1. The test
> account was not added to any of the server roles. Now, everything is
> working fine until I try to create table or view or proc, etc. in the
> db1 while logged in as the test user.
> When creating table I get that CREATE TABLE permission denied in
> database 'db1'. I tried executing GRANT CREATE TABLE after logging on as
> sysadmin to that test account. That didn't help. IS there some DENY
> somewhere that I don't see? How can I check what is preventing me from
> creating table using that account?
> Any comments?
> Thanks