Tuesday, February 14, 2012

Can't write to SQL Table

I'm not the SQL admin, but I'm trying to help fix a problem. Here's the
situation:
Microsoft SQL Server running Windows 2000 Server. Workstation connecting
via ODBC using SQL Driver.
We have a program on the workstation that pulls information from a single
table. There are over 800 tables in the database. For some reason the
application "scans" the entire database every time it pulls data from the
table we need. This takes a very long time. To try to combat this, we
created a restricted ID that only has access to the table we want. Now
reading from the table much faster.
However, now we can't write to the table. The table name is
"ups_work_table". When we try to write data to it, we get an error
"ups_work_table_trig_ins No data found for row".
So the admin person (as I understand it) made the ID part of a group that
has greater rights. The problem here is that again the ID has access to all
the tables and reading/writing is painfully slow. There has been talk of
groups & roles and how the group settings override the settings of the ID.
So restricting the access of the ID is defeated by giving it greater rights.
My question is: How can we restrict the ID to access a single table and
give that ID read, write, insert, & delete permissions for that table?
Thanks.Hi
The error "ups_work_table_trig_ins No data found for row" looks like an
error getting raised by some code in the "ups_work_table" insert trigger.
Have a look at that trigger. Possibly, a lookup is beign done on some other
data, and because a specific user is expected by the code, it fails.
Regards
Mike
"Terry Olsen" wrote:

> I'm not the SQL admin, but I'm trying to help fix a problem. Here's the
> situation:
> Microsoft SQL Server running Windows 2000 Server. Workstation connecting
> via ODBC using SQL Driver.
> We have a program on the workstation that pulls information from a single
> table. There are over 800 tables in the database. For some reason the
> application "scans" the entire database every time it pulls data from the
> table we need. This takes a very long time. To try to combat this, we
> created a restricted ID that only has access to the table we want. Now
> reading from the table much faster.
> However, now we can't write to the table. The table name is
> "ups_work_table". When we try to write data to it, we get an error
> "ups_work_table_trig_ins No data found for row".
> So the admin person (as I understand it) made the ID part of a group that
> has greater rights. The problem here is that again the ID has access to a
ll
> the tables and reading/writing is painfully slow. There has been talk of
> groups & roles and how the group settings override the settings of the ID.
> So restricting the access of the ID is defeated by giving it greater right
s.
> My question is: How can we restrict the ID to access a single table and
> give that ID read, write, insert, & delete permissions for that table?
> Thanks.
>
>

No comments:

Post a Comment