oracle

How do I make my Java application identify itself to Oracle on connection?

When my application connects to an Oracle database I want to be able to see by looking at the active sessions in the database that it is connected. Currently it identifies itself as "JDBC Thin Client" because that's the driver that I'm using, but other Java based applications that I have are somehow able to set this value to something mo...

Can a program figure out its Oracle resource usage?

My boss would like to find a way for a running executable to ask Oracle, the size of the resources that the program is used. The purpose behind this is so that we can add to the user documentation/capacity planning documentation information on the size of the resources needed for each program. My Google-Fu is weak today, and I really...

Oracle ORDB Hierarchical Data

I am trying to create some hierarchical data using Oracles object relation features. I have defined a "Post" as follows: create type Post as object (title varchar(20), body varchar(2000), author varchar(200), parent REF Post, MEMBER FUNCTION numReplies RETURN NUMBER, PRAGMA RESTRICT_REFERENCES(numReplies, WNDS) ); / create tabl...

Any way to tell if an Oracle export is still running?

I've got an Oracle export that's been running for almost 2 days now. The export file shows a modification time of 5 am this morning and does not appear to be growing. The log file does not show any errors. I think it's stuck and I need to restart it, but I'd hate to cancel it only to find out it was still going and I simply didn't wai...

How can I refer to the row that the update is currently updating?

TABLES: student(name,points) playsin(name->student(name), score) I'm trying to use: UPDATE STUDENT SET points = points + CONSTANT * (SELECT score FROM PLAYSIN WHERE playsin.name = student.name); ...

Java/Oracle: executing a prepared statement fails on a second iteration of a loop (not all variables bound). Why?

I'm debugging a Java App, which connects to Oracle DB via a thin client. The code looks as follows: (i'm trying to simplify the use case here so pardon me if t does not actually comile) Connection conn = myEnv.getDbConnection(); CallableStatement call = conn.prepareCall( "{ ? = call SomePackage.SomeFunction (?)}"); call.regist...

What does Oracle error "ORA-17432: invalid options in all7" mean?

I got the following SQLException: "invalid options in all7" Upon googling the error message, the ONLY hits I saw were Oracle error lists which pinpointed the error at "ORA-17432: invalid options in all7". Sadly, googling for the error # brought up only combined lists with no explanation for the error, aside from this page that said "A T...

Get Started with Oracle Express Edition?

Hi! I'm novice in oracle.I'm using oracle express 10.2.0 but i don't know how to create my own database and where my database is created.(The path of my new database). ...

Noob Oracle Security question

I want to be able to do a code comparison between stored procedures in production and code in QA to visually verify what is about to be implemented. Then, once implemented, I want to be able to compare production code to QA to verify that everything was deployed as expected. To do this, I need read access to db objects in the producti...

Getting Error in query

update tablename set (col1,col2,col3) = (select col1,col2,col3 from tableName2 order by tablenmae2.col4) return error Missing ). The query works fine if I remove the order by clause ...

Oracle problems with DATEs

Hi Folks, iam confused. Iam trying to read an Value from an oracle table, format: timestamp(6). In my PHP Scripts im setting the Dateformat with: $db->query('ALTER SESSION SET NLS_DATE_FORMAT = "DD-MM-RR"'); On 2 Machines im recieving this string as value (wich is correct for me): ["TIME_INSERT"] => string(24) "05.10.07 14:20:05,00...

In Oracle PL/SQL how do I create a directory on the file system?

Hi how do you create a physical directory on the OS from within PL/SQL? I looked at the "CREATE OR REPLACE DIRECTORY" command but that doesn't do it. Neither does UTL_FILE appear to do it. This would be in Oracle 10g and upwards. thanks ...

passing associative array of type Timestamp to oracle stored procedure

We're running into a strange error using Oracle Odp.Net (connecting to Oracle 9). The problem is illustrated by the code snippet below. This is the error we're experiencing: ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [], [], [], [], [] ORA-06544: PL/SQL: internal error, arguments: [...

How can I monitor SQL activity on Oracle?

I'd like to find a tool for Oracle that is similar to the SQL Server Profiler, but a cursory search hasn't yielded any good results. I just want to see, in real time, the queries that my application are making against the database. Any suggestions? ...

How do I figure out if a column size is in bytes or characters from the column metadata?

I am working on some software that has to create dummy entries in various databases (Oracle, DB2, SQLServer) temporarily. Every column in the the row is filled with random data. The code uses java.sql.DataBaseMetaData class in java to get the COLUMN_SIZE attribute to figure out how large of a random string to store in the VARCHAR2 and ...

LINQ to SQL for Oracle.ODP

Does LINQ to SQL support Oracle.ODP? If not, is a similar offering from Oracle available or in the works? ...

copying stored procedures each into its own file using ant

I want to be able to have an ant task which would connect to a remote oracle instance and copy the stored procedures each into its own file. I know I can have an ant sql task which will do SELECT object_type, object_name, dbms_metadata.get_ddl(object_type, object_name) object_ddl FROM user_objects WHERE OBJECT_TYPE in ('INDEX', 'TRI...

Oracle length() function returning incorrect value.

I just found some... I don't know what I'd call it but here goes: SELECT part_num, length(trim(part_num)) FROM part_programs WHERE rownum <= 10; ...results: PART_NUM LENGTH(TRIM(PART_NUM)) --------------- ---------------------- THAB256 8 THA1256674 11 THA1256674GU 13 THA1257141 11 THA1257141FR...

streamlining creating of packages and views

I have few SQL scripts which setups the db of an app. have few scripts creating packages which has few references of views, and similarly have scripts for creating views which has references of packages. Is there a way to separate these two scripts which would then individually create only packages or views respectively. Or any alterna...

DECODE( ) function in SQL Server

SELECT PC_COMP_CODE, 'R', PC_RESUB_REF, DECODE(PC_SL_LDGR_CODE,'02','DR','CR'), PC_DEPT_NO DEPT, '',--PC_DEPT_NO, PC_SL_LDGR_CODE+'/'+PC_SL_ACNO, SUM( DECODE(PC_SL_LDGR_CODE,'02',1,-1) *PC_AMOUNT), PC_CHEQUE_NO CHQNO FROM GLAS_PDC_CHEQUES WHERE PC_RESUB_REF IS NOT NULL AND PC_DISCD NOT IN ('d','D','T') GROUP BY PC_RES...