Unable to run insert query

Discussion forum about all things SqlBase or SqlTalk
gringotani

Unable to run insert query

Post by gringotani » 31 Dec 2011, 07:23

I am trying to append engineering masters to my ERP ("Visual Manufacturing") database Workorder table, using an MS Access append query.
My problem is that when I try appending to the Workorder table, I get the error message listed below. I am very experienced using action queries and I am able to append data to other MYSQL tables on my server. In order to attempt fix the problem I ran an SQL statement to grant this table to public, but this didnt help, even though and I am able to run "select" queries against the workorder table and I am logged in as sysadm.
What can I do to fix this problem? Below is my error message and SQL insert query:
ODBC--insert on a linked table 'SYSADM_WORK_ORDER' failed. [GUPTA][ODBC Driver][SQLBase]011502 SEC SVI security violation attempting to access WORK_ORDER (#1102)

Code: Select all

INSERT INTO SYSADM_WORK_ORDER ( TYPE, BASE_ID, LOT_ID, SPLIT_ID, SUB_ID, PART_ID, GLOBAL_RANK, DESIRED_QTY, RECEIVED_QTY, CREATE_DATE, DESIRED_RLS_DATE, DESIRED_WANT_DATE, CLOSE_DATE, COSTED_DATE, STATUS, COPY_FROM_SPLIT_ID, ENGINEERED_BY, ENGINEERED_DATE, DRAWING_ID, DRAWING_REV_NO, PRODUCT_CODE, COMMODITY_CODE, FORWARD_SCHEDULE, POSTING_CANDIDATE, MAT_GL_ACCT_ID, LAB_GL_ACCT_ID, BUR_GL_ACCT_ID, SER_GL_ACCT_ID, VARIABLE_TABLE, ENTITY_ID, SCHEDULE_GROUP_ID, SCHED_START_DATE, SCHED_FINISH_DATE, COULD_FINISH_DATE, EST_MATERIAL_COST, EST_LABOR_COST, EST_BURDEN_COST, EST_SERVICE_COST, ACT_MATERIAL_COST, ACT_LABOR_COST, ACT_BURDEN_COST, ACT_SERVICE_COST, REM_MATERIAL_COST, REM_LABOR_COST, REM_BURDEN_COST, REM_SERVICE_COST, MARKED_FOR_PURGE, PRINTED_DATE, DRAWING_FILE, WAREHOUSE_ID, WIP_VAS_REQUIRED, ALLOCATED_QTY, FULFILLED_QTY, DEF_LBL_FORMAT_ID, HARD_RELEASE_DATE, USER_1, USER_2, USER_3, USER_4, USER_5, USER_6, USER_7, USER_8, USER_9, USER_10, UDF_LAYOUT_ID ) SELECT d.TYPE, d.BASE_ID, d.LOT_ID, d.SPLIT_ID, d.SUB_ID, d.PART_ID, d.GLOBAL_RANK, d.DESIRED_QTY, d.RECEIVED_QTY, d.CREATE_DATE, d.DESIRED_RLS_DATE, d.DESIRED_WANT_DATE, d.CLOSE_DATE, d.COSTED_DATE, d.STATUS, d.COPY_FROM_SPLIT_ID, d.ENGINEERED_BY, d.ENGINEERED_DATE, d.DRAWING_ID, d.DRAWING_REV_NO, d.PRODUCT_CODE, d.COMMODITY_CODE, d.FORWARD_SCHEDULE, d.POSTING_CANDIDATE, d.MAT_GL_ACCT_ID, d.LAB_GL_ACCT_ID, d.BUR_GL_ACCT_ID, d.SER_GL_ACCT_ID, d.VARIABLE_TABLE, d.ENTITY_ID, d.SCHEDULE_GROUP_ID, d.SCHED_START_DATE, d.SCHED_FINISH_DATE, d.COULD_FINISH_DATE, d.EST_MATERIAL_COST, d.EST_LABOR_COST, d.EST_BURDEN_COST, d.EST_SERVICE_COST, d.ACT_MATERIAL_COST, d.ACT_LABOR_COST, d.ACT_BURDEN_COST, d.ACT_SERVICE_COST, d.REM_MATERIAL_COST, d.REM_LABOR_COST, d.REM_BURDEN_COST, d.REM_SERVICE_COST, d.MARKED_FOR_PURGE, d.PRINTED_DATE, d.DRAWING_FILE, d.WAREHOUSE_ID, d.WIP_VAS_REQUIRED, d.ALLOCATED_QTY, d.FULFILLED_QTY, d.DEF_LBL_FORMAT_ID, d.HARD_RELEASE_DATE, d.USER_1, d.USER_2, d.USER_3, d.USER_4, d.USER_5, d.USER_6, d.USER_7, d.USER_8, d.USER_9, d.USER_10, d.UDF_LAYOUT_ID FROM d;

Christof
Germany
Posts: 191
Joined: 06 Mar 2017, 07:27
Location: Frankfurt, Germany

Re: Unable to run insert query

Post by Christof » 02 Jan 2012, 12:19

Is the name of the source table really "d", or did you forget something at this point?

Hth,
Christof

Jeff Luther

Re: Unable to run insert query

Post by Jeff Luther » 04 Jan 2012, 17:37

Good eye, Christof! The 'd' table name might well be the problem.

If not, gringotani, my method of debugging is often to break something down to simpler parts, test each and perhaps find the problem that way. In your case, does the INSERT work OK in a test if you remove the "...SELECT FROM..." section and just hard-code in some dummy data values?

I know you wrote:
I am able to run "select" queries against the workorder table..
but that is an INSERT you are having trouble with and perhaps there's a DML rights' issue for SYSADM_WORK_ORDER?

gringotani

Re: Unable to run insert query

Post by gringotani » 05 Jan 2012, 22:28

table "D" is a a valid table name. the insert query functions when I append to an Access table copy of the MYSQL workorder table.
pelase tell me more about "DML". perhaps that may be the solutuion to my problem
Many thanks, Nathaniel

Jeff Luther

Re: Unable to run insert query

Post by Jeff Luther » 09 Jan 2012, 23:08

please tell me more about "DML"
"DML" is only the English abbreviation for Data Manipulation Language. That is, it refers to the SQL commands INSERT, UPDATE & DELETE. But to use any of those SQL commands you must have DB authority to make changes to the database and to specific tables. I only wondered if perhaps you only had SELECT privileges for that DB table, but couldn't make any changes.

gringotani

Re: Unable to run insert query

Post by gringotani » 10 Jan 2012, 18:41

Thanks for your reply. I still need your advice on how to fix my problem. I always run all my action queiries using the SYSADM username. is it possble that sysadm doesnt have append rights to the Workorder table, but does have rights to all other tables?

Jeff Luther

Re: Unable to run insert query

Post by Jeff Luther » 12 Jan 2012, 16:28

I still need your advice on how to fix my problem.
This sounds like a Database authority issue. See your SYSADMIN DB person, contact Vis. Manuf., read the CCOD PDF and SQL/DBA PDF manuals.
ERP ("Visual Manufacturing") database
That's a 3rd-party company using the DB and contacting them is important, too. They may have a schema and info. for their DB.
ODBC--insert on a linked table 'SYSADM_WORK_ORDER' failed. [GUPTA][ODBC Driver][SQLBase]011502 SEC SVI security violation attempting to access WORK_ORDER (#1102)
That sounds like a security issue on the DB. If you don't know about DB issues, then contact V/M and find out more about how they have set up the DB. I can try to point out the problem -- like "your car is smoking and that may be that it needs a 'ring job' -- but I cannot go in and solve/fix this for you ("I cannot rebuild the engine").

gringotani

Re: Unable to run insert query

Post by gringotani » 13 Jan 2012, 06:45

thank you very much for all of your help. This site is awesome!

RainerE
Germany
Posts: 2283
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: Unable to run insert query

Post by RainerE » 13 Jan 2012, 10:58

If you really connect to the database as SYSADM and if you get a security violation message, I believe it's a bug in the ODBC driver. This because SYSADM always has all rights.
But if you connect as an other user, you do not have enough privileges on the table.

To find out all the privileges on the table, use SQLTalk, connect as SYSADM an run the following queries:
1) to find out the privileges on table SYSADM_WORK_ORDER
select * from systabauth where ttname = 'SYSADM_WORK_ORDER';
2) to find out if additional column authorities exists
select * from syscolauth where tname = 'SYSADM_WORK_ORDER';

Additionally you can query all users with the following statement:
select name, resourceauth, dbaauth from SYSUSERAUTH;

In general, you can query the database design as of any of the system tables. To find out which system tables exists, use the following query:
select * from SYSTABLES where creator = 'SYSADM' and name like 'SYS%';

Regards,
Rainer

francmulloy

Re: Unable to run insert query

Post by francmulloy » 16 Feb 2012, 02:21


Return to “SqlBase General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 1 guest