cancel
Showing results for 
Search instead for 
Did you mean: 

Unknown table name:PERSON

Former Member
0 Kudos

Hi,

I created a table in dbmcli :

C:\>dbmcli.exe -d MAXDB2 -u DBADMIN,pwd -c sql_execute CREATE TABLE person (pno FIXED(6), name CHAR(20), city

CHAR(20))

OK

C:\>dbmcli.exe -d MAXDB2 -u DBADMIN,pwd -c sql_execute select count(*) from person

OK

END

0

But when query in SQL STUDIO, I receive :

--- Error -


Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed

Base table not found;-4004 POS(23) Unknown table name:PERSON

select count( *) from person

What is wrong ?

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

MichaelTe
Contributor
0 Kudos

Hello,

did you connect with the same user to SQL Studio?

Perhaps you have to use the following name for the table "dbadmin.person"?

Regards, Michael

Former Member
0 Kudos

Hi,

thank you. yes in both I was dbadmin and also I tried :

select count(*) from dbadmin.person.

But did not work.

Former Member
0 Kudos

any help ?

It is realy strange for me. SQL STUDIO is not synchronized with dbmcli.

steffen_schildberg
Active Participant
0 Kudos

What was the error message when running the query

select count(*) from dbadmin.person

as dbadmin?

Steffen

Former Member
0 Kudos

Thank you.

Here it is :

Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed

Base table not found;-4004 POS(22) Unknown table name:PERSON

select count(*) from dbadmin.person

lbreddemann
Active Contributor
0 Kudos

HI there,

please run


select user() from dual

when logged on in SQL Studio.

regards,

Lars

Former Member
0 Kudos

Thank you Lars.

Here it is :

select user() from dual

DBADMIN

steffen_schildberg
Active Participant
0 Kudos

Hi BIG136,

if you run a command like

dbmcli -u dbadmin,<pw> -d <db name> -c sql_execute <any command>

the command is executed as user dbm. This is the reason why you do not see the table in SQL Studio as dbadmin. Run instead

dbmcli -u dbadmin,<pw> -d <db name> -uSQL dbadmin,<pw> -c sql_execute <any command>

and the table will be also found in SQL Studio as user dbadmin. To execute an SQL command with dbmcli you normally first open a session, execute the command and then release the session. Because this is hardly possible with a single command line you should use -uSQL option which does all this for you at once.

Regards,

Steffen

Former Member
0 Kudos

yes Steffen. realy thank you. It works.