on 10-26-2011 12:30 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.