| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |
|

12-17-03, 14:51
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 14
|
|
Transactions not supported
|
|
I must make an insertion in informix 9.3 with java code, via jdbc. When attempt to do connection.setAutoCommit(false)
he gives me an exception that is: Transactions not supported.
whyyyyy????
please somebody help me...
|
|

12-18-03, 01:44
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Mumbai, India
Posts: 92
|
|
Hi,
First make sure that the backend database you are accessing supports transactions with this simple SQL statement.
echo "begin; rollback" | dbaccess your_database_name
Regards,
Shriyan
|
|

12-18-03, 07:38
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 14
|
|
|
|
I try to execute
echo "begin; rollback" | dbaccess your_database_name
and the db return this message:
Database selected.
201: A syntax error has occurred.
Error in line 1
Near character position 1
Database closed.
what's that means??
Quote:
Originally posted by vpshriyan
Hi,
First make sure that the backend database you are accessing supports transactions with this simple SQL statement.
echo "begin; rollback" | dbaccess your_database_name
Regards,
Shriyan
|
|
|

12-18-03, 08:58
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Mumbai, India
Posts: 92
|
|
Hi,
echo "begin; rollback" | dbaccess testdb
This command line statement would work fine under Unix. I guess you are using informix under Windows. Sorry, if it confused you. Under Windows you may execute:
echo begin;rollback | dbaccess testdb
OR
In any Operating System command line you may issue:
dbaccess testdb -
begin;
At this stage if your database does not support transactions, it will flash appropriate error message. If not issue:
rollback;
Interrupt <control-c> will terminate the dbaccess session.
Alternatively, you may test the logging with the following SQL:
select is_logging from sysmaster:sysdatabases where name='testdb' ;
result: 1 = logged, 0 = non logging.
Regards,
Shriyan
|
Last edited by vpshriyan; 12-18-03 at 09:01.
|

12-18-03, 09:07
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 14
|
|
Quote:
Originally posted by vpshriyan
Hi,
echo "begin; rollback" | dbaccess testdb
This command line statement would work fine under Unix. I guess you are using informix under Windows. Sorry, if it confused you. Under Windows you may execute:
echo begin;rollback | dbaccess testdb
OR
In any Operating System command line you may issue:
dbaccess testdb -
begin;
At this stage if your database does not support transactions, it will flash appropriate error message. If not issue:
rollback;
Interrupt <control-c> will terminate the dbaccess session.
Alternatively, you may test the logging with the following SQL:
select is_logging from sysmaster:sysdatabases where name='testdb' ;
result: 1 = logged, 0 = non logging.
Regards,
Shriyan
|
---------------------------------------------------------------------------------
ok, the database is not logging.
how can i create the logging file without to create again the database?
thank's !
|
Last edited by afortu2002; 12-18-03 at 09:30.
|

12-18-03, 09:18
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Mumbai, India
Posts: 92
|
|
Hi,
You can do it with two different way:
1.
ondblog <new mode> <database name>
<new mode> can be:
buf - Change database to buffered mode.
unbuf - Change database to unbuffered mode.
Example:
ondblog buf testdb
2.
ontape -s -B testdb # for buffered mode
ontape -s -U testdb # unbuffered mode
Regards,
Shriyan
|
|

12-18-03, 09:37
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 14
|
|
I execute both sentences (whit unbuffered mode) and when i try to connect me to the DB throws an exception:
Database not found or no system permission.
why?
|
|

12-18-03, 10:02
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Mumbai, India
Posts: 92
|
|
Hi,
ondblog & ontape both are administrative job related system utilities. When these commands are invoked they are checked for authentication of the user who issues this command. You need to have proper proper privileges to do this job. That means the owner of the database or login informix can do this job without any authentication related problem.
Regards,
Shriyan
|
|

12-18-03, 10:10
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 14
|
|
but i have superuser permissions!!
i'm using Informix Server Administrator whit the permisions of superuser.
i don't understand you?
|
|

12-18-03, 10:21
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Mumbai, India
Posts: 92
|
|
Hi,
ondblog & ontape both write event errors to the message file. You may see the last 10 such lines using:
onstat -m
Check for any obvious mistakes or please post the contenets.
Regards,
Shriyan
|
|

12-18-03, 10:39
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 14
|
|
this is the contents of the message file. when i execute the sentences ondblog or ontape, don't throws new errors:
Informix Dynamic Server Version 9.40.TC1 -- On-Line -- Up 01:02:20 -- 25728 Kbytes
Message Log File: C:\PROGRA~1\Informix\ol_tauros.log
12:07:25 (21) connection rejected - no calls allowed for sqlexec
12:07:25 listener-thread: err = -27002: oserr = 0: errstr = : No connections are allowed in Dynamic Server quiescent mode.
12:07:36 On-Line Mode
12:08:16 Fuzzy Checkpoint Completed: duration was 0 seconds, 1 buffers not flushed,
timestamp: 542803.
12:08:16 Checkpoint loguniq 10, logpos 0x6204c, timestamp: 542803
12:08:16 Maximum server connections 1
12:09:10 'iciarnet' - New logging mode: NO LOGGING
12:13:16 Fuzzy Checkpoint Completed: duration was 0 seconds, 1 buffers not flushed,
timestamp: 542830.
12:13:16 Checkpoint loguniq 10, logpos 0x6504c, timestamp: 542830
12:13:16 Maximum server connections 1
12:43:19 Fuzzy Checkpoint Completed: duration was 0 seconds, 1 buffers not flushed,
timestamp: 542860.
12:43:19 Checkpoint loguniq 10, logpos 0x6704c, timestamp: 542860
12:43:19 Maximum server connections 1
any idea?
|
|

12-19-03, 00:32
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Mumbai, India
Posts: 92
|
|
Hi,
As the message log shows the logging mode has been changed to NO LOG:
12:09:10 'iciarnet' - New logging mode: NO LOGGING
To change log mode again, you may execute:
ondblog buf 'iciarnet'
If this does not workout, try:
ontape -s -B 'iciarnet'
While command in progress; study message log by:
onstat -m
Regards,
Shriyan
|
|

12-19-03, 08:04
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 14
|
|
i've already executed this command, but nothings happens.
if i execute ondblog, no show error in the log file.
if i execute ontape never finish, the process remains running in memory, but nothing happens and no show error in the log file either.
at this point, if i try to connect me to the db, throws the exception: Database not found or no system permission.
that's why i have to run the command ontape -n iciarnet, and the message in the log is
12:09:10 'iciarnet' - New logging mode: NO LOGGING
because if i don't run this, i never can connect me again to the database.
it's posible that the logging file don't exists?
how could i see if exists?
|
|

12-19-03, 08:49
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Mumbai, India
Posts: 92
|
|
Hi,
Follow the steps below:
1. Edit %INFORMIXDIR%\etc\%ONCONFIG%
2. Locate TAPEDEV and LTAPEDEV parameter this file
3. Note the current parameters
4. set it to NUL
Like:
TAPEDEV NUL # Tape device path
LTAPEDEV NUL # Tape device path
5. ontape -s -B 'iciarnet'
6. Look for server message using onstat -m
After successful operation, if those parameters were set to real tape devices earlier, then reset the values back to tape devices.
Regards,
Shriyan
|
|

12-22-03, 15:26
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 14
|
|
fine!! finaly works!! i can insert data in the database!! thank's a lot!!!
but...
i have a new problem. when i try to insert some repeted register, and i'm try to read the key value from a table in particular, it throws the exception:
Could not do a physical-order read to fetch next row
what's that means?
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|