NL Exception Trying To Connect To 10g RAC With JDBC
Jan 11, 2005
I'm trying to connect to multiple Oracle 10g databases (failover) over the JDBC thin client, and when I run the following, I get: java.sql. SQLException: Io exception: NL Exception was generated
I eventually want to put multiple ADDRESSes in that string, but right now I'm trying to get it to work with just one! I've tried multiple variations of this, like changing INSTANCE_NAME to SID or SERVICE_NAME, and using the internal IP address for the HOST dbdev (see below). Here's the tnsnames.ora file used by SQL*Plus on the same client machine:
I have installed 2 node RAC -11gR2 on ORACLE VM Server 2.2.1.now, I want to give tnsentry to my dev team to use this RACDB going forward.I am using scan name in tnsnames.ora file. Also I have make scan name entry in /etc/hosts not in the DNS.
I have below entry in RACDB server... RACDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = RWCORA-cluster-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = racdb) )
now just for testing purpose, I added this tnsentry in my machine to check the connectivity.I have to add scan name with IP address in /etc/hosts --. and try to connect sqlplus sys@rwcdb as sysdba --> not workingI have to add scan name with IP address , and two RAC VIPs (of both nodes) in /etc/hosts -- and try to connect sqlplus sys@rwcdb as sysdba --> then its working...but again SQL*Developer is not able to connect.
I have make below entry in my machine's /etc/hosts file:
The problem is that this connection errors when I try to connect using my SQuirreL client. My developers want to connecting using the SID or the SERVICE_NAME and by using the "New Method" syntax, not the "Old Method" syntax. According to the documentation the "New Method" syntax works with the SERVICE_NAME or the SID. The "Old Method" only works with the SID.
# Host name is vmwwin7634.na.SAS.com # SID is sting2 # SERVICE_NAME is sting2.na.sas.com
PROBLEM using SID errors ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2 THIS WORKS using SERVICE_NAME ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com
I am using SQuirreL Client version 3.4.0
# Here is the tnsnames.ora entry on the server. STING2 = (DESCRIPTION =
[code]...
# In this documentation it says, "On new syntax SERVICE may be a oracle service name or a SID."You can find this on the orafax wiki under JDBC#Thin_driver.
# I was able to connect with the "old method" using the SID only, SERVICE_NAME errors jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2.na.sas.com (SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.") jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2 (this works)
# "New Method" jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com (this works) jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2 (this errors) (SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")
APEX 4.2Oracle 11g Database We are using the standard exception handler that was introduced in APEX 4.1, and we have code in packages & procedures in the database (following proper processes of keeping code in the database where possible). When an exception is found in the procedures/ packages/functions, should the APEX application level exception handler catch any errors that occur or should they be handled in the package/procedure/function they occurred in? Why I ask if, we right now have exception handling code in the pl/code bodies BUT they write their errors to the same table that Apex's Exception handler does, but the errors are NOT presented to the user using the APEX exception handling mechanism.
I have to implement exception handling in the exception block of a trigger, Quote:exception
when ora_java.java_error then message( 'Unable to call out to java, ' || ora_java.last_error ); ORA_JAVA.CLEAR_EXCEPTION;
when ORA_JAVA.EXCEPTION_THROWN then ex := ORA_JAVA.LAST_EXCEPTION; message( Exception_.toString(ex)); -- lv_exception := Exception_.getMessage(ex);
I get an error for the line: 'message( Exception_.toString(ex));'I have imported the java classes FException et IObject with their methods.
I have to create a Web Service Client, so I wonder if the paragraph Quote:when ORA_JAVA.EXCEPTION_THROWN then ex := ORA_ JAVA. LAST_ EXCEPTION; is mandatory.
I am connecting to Oracle 9i using JDBC in my JSP/Servlets web pages. I am closing all my connections in Finally blocks.
Everything works great during the day with JDBC and Oracle.But after a Web crawler runs through our web server at 3 AM the next morning a v$session check shows several lines of JDBC Thin Client inactive status. find exactly what sql statement or program that could be causing the JDBC Thin Client to show up?
The problem i mentioned in my last posting "CRS installation/PRIF-10: failed to initialize the cluster registry" was due to the fact i was using Redhat Linux 9 that seems to have some missing packages. I installed White Box RH 3 and everything worked fine.
if it's possible to connect to a 10g RAC database using the jdbc java thin client. the java thin client requires an ip, and database sid. I am running a two node cluster and i have two ip's and a service name that uses TAF option.
I wonder if this JDBC Connection is a TCP/IP connection on the backend? If this is not a TCP/IP connection, how can I make a connection with TimesTen via TCP/IP protocol?
How to know the version of Oracle and JDBC of remote databases that is accessing my database through DBLInk.
For example I have a database A , B database is using my database Through a dblink.Now I want to know the version of oracle and jdbc which working on B.
Since JDK 6, DatabaseMetaData.getCrossReference contract is :Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table). But the Oracle JDBC Driver executed query is :
SELECT NULL AS pktable_cat, p.owner as pktable_schem, p.table_name as pktable_name, pc.column_name as pkcolumn_name,
Here's the triggers I currently have that doesn't work.
create or replace trigger DropAccount after delete on profile FOR EACH ROW BEGIN delete from groupMembership where (userID = :old.userID); END;
The DropAccount trigger's purpose is to delete all the records from groupMembership that contains the userID of the person deleting his/her own account. It appears to work when I run the following statements in sqlplus:
delete from profile where (userID = '1'); select * from groupMembership where (userID = '1');
But when I try to delete an account through a java interface using JDBC I get the following error:
Machine Error: java.sql.SQLException: ORA-04091: table *****.GROUPMEMBERSHIP is mutating, trigger/function may not see it ORA-06512: at "*****.DROPACCOUNT", line 2 ORA-04088: error during execution of trigger '*****.DROPACCOUNT'
The java function basically just executes a delete statement.
java.sql.SQLException: ORA-04054: database link GMAIL.COM does not exist
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1169) at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1615) at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1580) at com.jdbc.pack.Lab1.main(Lab1.java:31)
Upgrading from 10.1.0.2 to 10.1.0.5. Enterprise Manager requires 'newest' version of Oracle JDBC drive.Downloaded what I believe to the correct file (classes12.jar). I'm unclear what to do with this, my readings have pointed me in the following direction:
1) copy to c:oracleproduct10.1.0db_1jre1.4.1in 2) extract
here is the problem...tried:
1) just clicking on it (nothing)
2) c:program filesjavajre1.6.0_03injavaw -jar classes12.jar Error: Failed to load Main-Class manfest atrribute from c:oracleproduct10.1.0db_1jre1.4.1inclasses12.jar
Is my location correct, I've been hunting everywhere..making no progress.
I am able to connect to DATABASE from SQLAssistant only when I provide string like ABOVE........If I dont mention the SERVICE, m unable to connect to DB.Now the biggest issue is with SQL Developer.....m not at all able to connect to DB using SQL Developer.
Acer laptop, Intel Processor w/ Windows 7 Professional (64-bit) Delphi 2010 Professional Oracle XE (+ the Oracle XE client that comes with it)
I cannot can't to the Oracle database from Delphi. The error I keep getting is:
Alias is not currently opened. [Oracle][ODBC][Ora]ORA-12154:TNS: could not resolve the connet identifier specified.
Here's what I've done:
1. Create an ODBC connection to my Oracle database
- run C:WindowsSysWOW64odbcad32.exe to open the ODBC administrator. - Data source name: bt_user - TNS Server Name: localhost/xe - user bt_user - Clicked "test connection" -- Success.
2. Open Delphi and drop a TDatabase component on my main form.
- Set the Alias Name property to "bt_user" (the alias I set up in ODBC) - Set database name to "bt_user". - Checked "connected".
Alternatively, I tried using the Delphi ADO components (the dbGo components).
- Drop TADOConnection component on my form. - Select "connection string" and open the dialog. - Click "build string". - Select "Microsoft OLE DB Provider for ODBC Drivers" from the selection. - In "use data source", select "bt_user" from the drop-down list (my ODBC connection from #1) - Click "test connection".
Again the same error.
My questions are:
1. Can Delphi work with Oracle XE (Express Edition)?
2. If so, then do I need to install the "Instant Client"?
3. Will the instant client for Oracle 10g work with Oracle 10g XE?
4. Do I need to install any additional ODBC driver(s)?
5. Why was I successful in creating the ODBC connection in Windows, but it failed in Delphi?
6. Will Visual Studio.NET (C#) work with Oracle XE, and what are the steps for setting that up?
The following code is working fine,But the thing is if column already exists in the table,then also the other statements should be executed instead of coming out of procedure.SO how can I handle that exception??
SQL> CREATE OR REPLACE PROCEDURE sp_execparameters(tname IN VARCHAR2, colname IN VARCHAR2,datatype IN VARCHAR2) 2 AS 3 v_sqlstr1 VARCHAR2(1000); 4 BEGIN 5 v_sqlstr1 := 'alter table '||tname||' add '||colname ||' '|| datatype ; [code].........
Am getting the error ORA-03113: end-of-file on communication channel when am trying to run a query and when i checked the trace file the infromation i got is given below.....
CODEksedmp: internal or fatal error ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [0x363376E] [] [] [] [] Current SQL statement for this session: select count(av_sal)
I am using Oracle 10g Rel 2 and currenly working on a project which creates a repository and bulk inserts data into it using FORALL statment. I am using SAVE Exceptions to save the errors in a table and then report to the user about these errors.
My question is ,can i somehow know the column which caused the exception ? Currently ,we can save only SQLCODE and SQLERRM . Is there any possibility that I get to know the column also which raised the exception ? For example ,during a insert ,if column raises exception
ORA-01438: value larger than specified precision allows for this column
Is it possible for me know using some programming technique that which column raised this exception ?
when no data found this query generate error ora-01403 but if i count these transaction and then apply this trigger it works very well i am not interested to count because it takes a time i want that when no data found exception clause took control but i am not understand how to add exception clause in this trigger
select sum(nvl(gl_quantity,0)),sum(nvl(gl_amount,0)) into cr_qty,cr_amt from account.glhis where gl_drcr='CR' and gl_account=:prod_consume_auto.store_code and gl_date<=:prod_master_auto.voc_date and gl_voc_no<>:prod_master_auto.voc_no group by gl_account;
v_error_code := SUBSTR(v_error_code||':'||SQLCODE,1,30); For i in 1 ..sql%bulk_exceptions.count LOOP v_error_desc := SUBSTR( SQLERRM(SQL%BULK_EXCEPTIONS(i).ERROR_CODE),1,400); dbms_output.put_line('The value of Error is '|| v_error_code ||' '||v_error_desc); End loop;
[code]...
By executing the above i am getting Error SQL> @pkg_rwc_migration_bdy.sql 130 /
Package body created.
SQL> Begin 2 pkg_rwc_migration.pro_rwc_mig; 3 End; 4 / The value of Error is :-1843 -1843: non-ORACLE exception