Archive for the ‘oracle’ Category.
February 13, 2008, 9:52 PM

I dint write for two weeks. I could not sit in these weekends. so, there are much more error messages left behind my desk. here is the situation. I am doing multiple reads from database. I am opening a connection, creating a statement, and executing a query to get resultset. it was working fine, but when loop goes beyond 100, I got the following error.
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
The Connection descriptor used by the client was:
152.200.100.5:1521:PANDIAN
I think, the problem is with connection leak. connection or resultset somethign is not closed properly. I removed the connection opening part and replaced with connection pool. Now it is working fine!
January 26, 2008, 12:13 PM

This month I am logging only the errors
I am setting up a backup of a working application, where I came across the previous errors. Here is another one.
java.lang.UnsatisfiedLinkError: no ojdbc14 in java.library.path
Let me tell you the environment,
I have the application, whose lib folder contains class12.jar and ojdbc14.jar. Both the jars are in classpath, then I replaced this ojdbc14.jar of the application with the ojdbc14.jar from the local oracle installation folder. That doesnt solve the issue, later i need to replace classes12.jar also. That application lib folder files are working fine for Oracle 9i. but not for 10g. So, this is basically a version incompatibility.
January 20, 2008, 2:53 AM

Previously When I used blogger, I have written something on loading raw files into MySQL Database. This is a similar post, but with Oracle. I am trying to upload a CSV to Oracle Database. Here are the various steps involved in it.1. prepare a .CTL (control) file
Control file is one which tells the SQL Loader how to upload the file. A sample CTL file contains the following lines
load data
infile 'c:\StatCounter-Log-3329852-modified.csv'
into table statcounter
fields terminated by "," optionally enclosed by '"'
(Date_and_Time,IP_Address,IP_Address_Label,Browser,Version,OS,Resolution,Returning_Count,Page_URL,Page_Title,Came_From,SE_Host,SE_Name,SE_Term)
It tells from which file, to which table, to which fields i am uploading the data.
2. execute sqlloader with the specified CTL file
sqlldr system/manager control=statcounter.ctl
C:\>sqlldr system/manager control=statcounter.ctl
SQL*Loader: Release 9.0.1.1.1 - Production on Sun Jan 20 03:19:55 2008
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Commit point reached - logical record count 63
Thats all!
But I have a problem with this, Though it says 63 records have been uploaded. I am seeing only 10+ records. I dint get any errors also. I am thinking why
Category:
oracle |
Comments Off
January 19, 2008, 11:55 PM

This is another real-time mistake I faced today. I was parsing a log file and uploading into DB. One of the dates in the log file doesnt follow the date format. So I got this error. I cant give that code in this post, I am giving an example below.
SQL> select to_date('20051101 00:00:01', 'YYYYMMDD') from dual ;
select to_date('20051101 00:00:01', 'YYYYMMDD') from dual
*
ERROR at line 1:
ORA-01830: date format picture ends before converting entire input string
I hope you have noticed the error. The query should be like this.
SQL> select to_date('20051101 00:00:01', 'YYYYMMDD hh24:mi:ss') from dual ;
TO_DATE('
---------
01-NOV-05
You can have a detailed view on the Oracle date formats here
http://www.ss64.com/orasyntax/fmt.html
January 19, 2008, 12:19 AM

I cant explain this problem better than the following URL.
http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/x/Bulk_Binding_Enhancements/Handling_And_Reporting_Exceptions.htm
I am using a PL/SQL array object to populate a table. The exceptions are being saved, so that the row wise problems can be logged and the process cannot be stopped because of that problem or exception. While updating the columns, there was an exception while parsing a string as date, – I hit with this issue. (I disable exception save and find out this
), When I rectfied that date parsing issue, I came out of this problem!
Are you asking about that date problem, I will be writing a separate post tomorrow! feeling sleepy now!