469,898 Members | 1,757 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Help for a new user

I've created a DB in SQL Server, and a user 'X', administrator on it. The DB
is genereted by a file, using osql. The tables' owner is 'X', but when I
try to insert some rows into the tables (by osql), the response is:
"INSERT permission denied on object 'DUMMY', database 'EC_PROVA', owner
'X' "

Is there anybody that can help me?
Thank you.
Fede
Jul 20 '05 #1
4 1599
fede (fedina_no_chicca_spam@libero_spam_no.it) writes:
I've created a DB in SQL Server, and a user 'X', administrator on it.
The DB is genereted by a file, using osql. The tables' owner is 'X',
but when I try to insert some rows into the tables (by osql), the
response is: "INSERT permission denied on object 'DUMMY', database
'EC_PROVA', owner 'X' "


As whom do you run the INSERT statement?

What does "sp_helprotect DUMMY" say?
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

"Erland Sommarskog" <es****@sommarskog.se> ha scritto nel messaggio
As whom do you run the INSERT statement? I launch a script using this command line:
osql -U X -P passX -D SQLPROVA -i "Schema20040723.sql" -o "SchemaCrea.log"
So, I think the user is X.... What does "sp_helprotect DUMMY" say?

It doesn't say anything...
Jul 20 '05 #3
fede (fedina_no_chicca_spam@libero_spam_no.it) writes:
"Erland Sommarskog" <es****@sommarskog.se> ha scritto nel messaggio
As whom do you run the INSERT statement?


I launch a script using this command line:
osql -U X -P passX -D SQLPROVA -i "Schema20040723.sql" -o "SchemaCrea.log"
So, I think the user is X....


But I don't what it's that script. It is difficult to assist when I don't
have full information of what you are doing. If that script performs

CREATE TABLE dummy (a int NOT NULL)
go
INSERT dummy (a) VALUES(12)

This should succeed. So I assume you are doing something else, but I don't
know what.
What does "sp_helprotect DUMMY" say?


It doesn't say anything...


Not even?

Server: Msg 15330, Level 11, State 1, Procedure sp_helprotect, Line 346
There are no matching rows on which to report.

By the way, what does SELECT @@version say on your server?

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4
"Erland Sommarskog" <es****@sommarskog.se> ha scritto nel messaggio
news:Xn********************@127.0.0.1...
But I don't what it's that script. It is difficult to assist when I don't
have full information of what you are doing. If that script performs
This is a piece of code in the script:

CREATE TABLE X.DUMMY (
ATTIVITA varchar(30) NOT NULL,
DATA datetime NOT NULL,
UTENTE varchar(30) NOT NULL,
TEMPO datetime NULL,
NOTA varchar(50) NULL,
DBVERS varchar(15) NULL,
EURO varchar(1) NOT NULL,
PRIMARY KEY (DATA, ATTIVITA, UTENTE)
)

go
insert into X.DUMMY (data, attivita, utente, nota, euro, dbvers)
values ('01/01/1999','POTWIN3','PROJECT','NON ELIMINARE MAI!',
'S', '038')

But the problem is not on the script (this script, with obviously
differences is used to create db in DB2 and Oracle), because I've tried to
launch it from SQL Query Analyzer and it works well (using as default the
administrator user 'sa').
The problem seems to be the authorizations for user X, used to create the
schema of the DB, created as administrator in SQL Server. When I look the
properties of the table, it seems that X has the rights to insert, delete
and update data in the table.
By the way, what does SELECT @@version say on your server?


Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows
NT 5.0 (Build 2195: Service Pack 4)
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Patrick Lim | last post: by
10 posts views Thread by Elizabeth Harmon | last post: by
28 posts views Thread by Siv | last post: by
15 posts views Thread by Jay | last post: by
5 posts views Thread by tabani | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.