Teradata SQL multiple statements (not multistmt) in Knowledge Module Step??
In a Knowledge Module Step using Teradata Technology, I have the following statements
statement 1 ;
statement 2 ;
statement 3 ;
Since the semicolons are at the end of each statement, I expect that these statements will be executed in sequential order
and not in parallel as in a multistatement. Can someone confirm this ?
I ask this question, because I observe that if statement 2 fails (say for e.g because it is an insert statement and there is no space on the database) then statement 1
is not commited either (or perhaps it is rolled back ). This behaviour is expected in multistatements (i.e. where statements run in parallel).
Thanking you all in great anticipation
Amer (Newbie!)
Hi Amer,
This is obvious that in one step you have included
statement 1 ;
statement 2 ;
statement 3 ;
So any of the statement fails means this step is not going to work unless until you use AUTOCOMMIT STATMENT (drop or truncate).
If your 1st statement will be " drop table xyz"
2nd statement will be " truncate table abc""
3rd statement will be " delete from def"
if 3rd statement fails , then 1st two are auto committed and will be reflected in your database. But if 1st statement fails means its the end for this step.
If your requirement is like to do this in step of a KM better use one procedure.
Hope its helps.
Thanks
Similar Messages
-
SQL Update statement not executing in Filter
Hi,
I am trying to update Documents table using the query resource in a custom component. The document table is requred to upate for vault file(1 row) and for weblayout file(1 row). The java code is executing in PostConversionFilter, the sql is defined in query resource.
Query Resource is defined in componet like..
MyQResource=UPDATE Documents SET dOriginalName = ?, dFormat = ?, dFileSize = ?, dExtension = ? WHERE (dID = ? AND dIsPrimary = ? AND dIsWebFormat = ?)
This SQL executes for vault file means dIsPrimary = 1 AND dIsWebFormat = 0 however the same is not executing when for weblayout file dIsPrimary = 0 AND dIsWebFormat = 1
I putting here final satement formed, got by systematabase trace as following
For vault file:
UPDATE Documents SET dOriginalName = 'XYZ009174~1.spdf', dFormat = 'application/vnd.sealedmedia.softseal.pdf', dFileSize = 0, dExtension = 'spdf' WHERE (dID = '9559' AND dIsPrimary = 1 AND dIsWebFormat = 0)
For weblayuot file:
UPDATE Documents SET dOriginalName = 'XYZ009174~1.spdf', dFormat = 'application/vnd.sealedmedia.softseal.pdf', dFileSize = 0, dExtension = 'spdf' WHERE (dID = '9559' AND dIsPrimary = 0 AND dIsWebFormat = 1)
There is no error in logs, traces. I am using UCM 11g. in Documents table 1 row is updated for vault file only I am expecting for weblyaout updation also.
Please help what could be the possible cause?
Thanks,
Manoj
Edited by: Manoj Kumar on 15-May-2012 13:03If I got your question, you state that you see a SQL statement in systemdatabase tracing, but it is not executed in the database? Btw. you should see further details (such as how much time the query took) if you turn on full verbose tracing.
I'd just go and try to execute the same queries directly in the database (e.g. in sqlplus console). My guess is that there will be no record according to the second WHERE clause... -
How to refresh ODI variable as part of a Knowledge Module?
Hi,
I want to know how can i refresh a ODI varaible in a knowledge module using oracle Technology. EX: i have created a variable called VAR_TEST in ODI.
In one of the knowledge module steps, i want to refresh as mentioned below:
begin
select colname into #VAR_TEST from tablename;
end;
Many thanks ....Hi Martin,
Put the query in the refresh tab into the variable, generate a scenario from the variable and call the scenario thru "OdiStartScen" (Sunopsis API technology) from KM.
In this case the variable needs to be "Last Value"
An alternative is to use a Java variable instead.... Works better to KM's.
Does it help you?
Cezar Santos
http://odiexperts.com -
MS SQL Server Statement could not be prepared. (WIS 10901)
Here is my situation. We are running Edge 3.0 using SQL Server 2005. I have a Webi report that I created with an existing Universe and the report is able to run fine. I didn't create the Universe, but I had to add new tables to the Universe.
For some reason when I went to create a System DSN to connect to the Universe, it didn't save the System DSN, but I was able to save it as a User DSN using the same name as the System DSN created on the BOXI Server. I was able to add the new tables and objects.
I then went to add the new objects to the existing web report and ran the query, I then received the error "A database error occured. The database error text is: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.. (WIS 10901)". If I removed the new objects, I am able to run the Query fine.
When I add the new objects, I can look at the SQL, copy it and run it in MS SQL Server. Once I try to run the query with the new objects, I get the previously stated database error. Then I try to generate the SQL and get the message that Webi can't generate the SQL even though I was able to see the SQL if I hadn't run it.
I am not sure why I am getting this error, because the report is able to run before adding any new objects. Any suggestions would be helpful. ThanksThe issue was that I needed to get permission on my computer to create a system DSN and not use a local DSN. My local policy was changed on my computer.
But I am now writing a different report and getting the same error. Let me explain the situation.
The report was created and running fine, but the database was created by someone and it only contained partial data. The database is created in a star schema. I had to add more dimension tables. The fact table already had all the columns for the new dimension tables but had a default value of -1. Once I added the missing dimension tables, I reran the DI job that re-populated the fact table with data from all dimension tables. When I go now and run the report if I only run a query with the old dimensions, then the report runs fine and returns data. If I add a object from the newly created dimension fields then I get the error 'A database error occured. The database text is: ... Statement(s) could not be prepared. (WIS 10901)'.
I am not sure where the problem is. The report is using the same System DSN and the SQL created from the new dimensions works just fine in SQL Server Management Studio. We use Windows AD authentication and use an Windows users as our system account to access the database and it has read permissions.
Any help would be great. Thanks -
SQL CASE statement in XML template- End tag does not match start tag 'group
Hi All,
I am developing a report that has the SQL CASE statement in the query. I am trying to load this into RTF with report wizard and it gives me below error
oracle.xml.parser.v2.XMLParseException: End tag does not match start tag 'group'
Does XML publisher support CASE statement?
My query is something like this
SELECT customercode,
SUM(CASE WHEN invoicedate >= current date - 30 days
THEN balanceforward ELSE 0 END) AS "0-30",
SUM(CASE WHEN invoicedate BETWEEN current date - 60 days
AND current date - 31 days
THEN balanceforward ELSE 0 END) AS "31-60",
SUM(CASE WHEN invoicedate < current date - 60 days
THEN balanceforward ELSE 0 END) AS "61>",
SUM(balanceforward) AS total_outstanding
FROM MyTable
GROUP BY customercode
ORDER BY total_outstanding DESC
Please advice if the CASE statement or the double quotes are causing this error
Thanks,
PPI got this to work in the XML but the data is returning zeros for all the case statements. When I run this in toad I get results for all the case conditions but when ran in XML the data displayed is all zeros. I am not sure what I am missing. Can someone shed some light on this please
Thanks!
PP -
Java.sql.SQLException: statement handle not executed
hello,
i am calling a stored procedure and its returns a REF CURSOR and i am getting intermittent exceptions below,
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
xxxx_pkg(?,?)}]; SQL state [99999]; error code [17144]; statement handle not executed; nested exception is java.sql.SQLException: statement handle not executed
and
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
xxxx_pkg(?,?,?)}]; SQL state [99999]; error code [17009]; Closed Statement; nested exception is java.sql.SQLException: Closed Statement
any clue what could be the issue,
Regards
GGits pretty simple have a java class calling hibernateTemplate's findByNamedQueryAndNamedParam method by passing the procedure name and binding parameters/values, and here is the stack
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
xxx_pkg(?,?)}]; SQL state [99999]; error code [17144]; statement handle not executed; nested exception is java.sql.SQLException: statement handle not executed
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQueryAndNamedParam(HibernateTemplate.java:1006)
Caused by: java.sql.SQLException: statement handle not executed
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:403)
at oracle.jdbc.driver.T4CStatement.doDescribe(T4CStatement.java:701)
at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3355)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:2009)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:494)
at org.hibernate.type.StringType.get(StringType.java:18)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:163)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:154)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2091)
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
at org.hibernate.loader.Loader.getRow(Loader.java:1206)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
at org.hibernate.loader.Loader.doQuery(Loader.java:701)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2217)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2108)
at org.hibernate.loader.Loader.list(Loader.java:2103)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1696)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
at org.springframework.orm.hibernate3.HibernateTemplate$34.doInHibernate(HibernateTemplate.java:1015)
at org.springframework.orm.hibernate3.HibernateTemplate$34.doInHibernate(HibernateTemplate.java:1)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) -
Java.sql.SQLException: Statement cache size has not been set
All,
I am trying to create a light weight SQL Layer.It uses JDBC to connect to the database via weblogic. When my application tries to connect to the database using JDBC alone (outside of weblogic) everything works fine. But when the application tries to go via weblogic I am able to run the Statement objects successfully but when I try to run PreparedStatements I get the following error:
java.sql.SQLException: Statement cache size has not been set
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:138)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_812_WLStub.prepareStatement(Unknown Source)
i have checked the StatementCacheSize and it is 10. Is there any other setting that needs to be implemented for this to work? Has anybody seen this error before? Any help will be greatly appreciated.
Thanks.Pooja Bamba wrote:
I just noticed that I did not copy the jdbc log fully earlier. Here is the log:
JDBC log stream started at Thu Jun 02 14:57:56 EDT 2005
DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
DriverManager.getDriver("jdbc:oracle:oci:@devatl")
trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
Oracle Jdbc tracing is not avaliable in a non-debug zip/jar file
DriverManager.getDriver("jdbc:oracle:oci:@devatl")
trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
DriverManager.getDriver("jdbc:oracle:oci:@devatl")
trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
DriverManager.getDriver("jdbc:oracle:oci:@devatl")
trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
DriverManager.getDriver("jdbc:oracle:oci:@devatl")
trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
registerDriver: driver[className=weblogic.jdbc.jts.Driver,weblogic.jdbc.jts.Driver@c0a150]
registerDriver: driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@17dff15]
SQLException: SQLState(null) vendor code(17095)
java.sql.SQLException: Statement cache size has not been set
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)Hi. Ok. This is an Oracle driver bug/problem. Please show me the pool's definition
in the config.xml file. I'll bet you're defining the pool in an unusual way. Typically
we don't want any driver-level pooling to be involved. It is superfluous to the functionality
we provide, and can also conflict.
Joe
at oracle.jdbc.driver.OracleConnection.prepareCallWithKey(OracleConnection.java:1037)
at weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection.prepareCallWithKey(Unknown Source)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection.prepareCallWithKey(Unknown Source)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
SQLException: SQLState(null) vendor code(17095) -
Hello all,
We have configured JDBC Sender Adapter which fetches around 10K records with poll interval 1hr from DB2 System .
It was working fine,suddenly it started throwing an exception in Adapter Monitoring :
Error during conversion of query result to XML: java.sql.SQLException: Cursor state not valid.
It is not fetching any records.
Without changing any configurations when we tried to fetch to around 1000 records it's working fine.
For 10K records same exception persists
What could be the reason ?How to resolve this issue?
regards
GangaPrasadHello Christophe ,
Trace in VA :::
Date : 05/09/2008
Time : 11:45:57:750
Message : Unexpected error converting database resultset to XML, reason: java.sql.SQLException: Cursor state not valid.
at java.lang.Throwable.<init>(Throwable.java:194)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:366)
at com.ibm.as400.access.AS400JDBCResultSet.getValue(AS400JDBCResultSet.java:3580)
at com.ibm.as400.access.AS400JDBCResultSet.getString(AS400JDBCResultSet.java:3223)
at sun.reflect.GeneratedMethodAccessor459222074.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:309)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.TraceInvocationHandler.invoke(TraceInvocationHandler.java:45)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.$Proxy254.getString(Unknown Source)
at com.sap.aii.adapter.jdbc.JDBC2XI.convert2XML(JDBC2XI.java:954)
at com.sap.aii.adapter.jdbc.JDBC2XI.invoke(JDBC2XI.java:492)
at com.sap.aii.af.service.scheduler.JobBroker$Worker.run(JobBroker.java:475)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:99)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:119)
Severity : Error
Category : /Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC
Location : com.sap.aii.adapter.jdbc.JDBC2XI.convert2XML(ResultSet, ResultSetMetaData)
Application :
Thread : XI JDBC2XI[JDBC_SND_DB2_VehicleReceiving/DB2PRD00/]_170
Datasource : 12428950:/usr/sap/PXI/DVEBMGS01/j2ee/cluster/server0/log/applications/com.sap.xi/xi.log
Message ID : 00145E742794005E0014980B000000BE00044CC763766C4F
Source Name : /Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC
Argument Objs : java.sql.SQLException: Cursor state not valid.
at java.lang.Throwable.<init>(Throwable.java:194)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:366)
at com.ibm.as400.access.AS400JDBCResultSet.getValue(AS400JDBCResultSet.java:3580)
at com.ibm.as400.access.AS400JDBCResultSet.getString(AS400JDBCResultSet.java:3223)
at sun.reflect.GeneratedMethodAccessor459222074.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:309)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.TraceInvocationHandler.invoke(TraceInvocationHandler.java:45)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.$Proxy254.getString(Unknown Source)
at com.sap.aii.adapter.jdbc.JDBC2XI.convert2XML(JDBC2XI.java:954)
at com.sap.aii.adapter.jdbc.JDBC2XI.invoke(JDBC2XI.java:492)
at com.sap.aii.af.service.scheduler.JobBroker$Worker.run(JobBroker.java:475)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:99)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:119)
Arguments : java.sql.SQLException: Cursor state not valid.
at java.lang.Throwable.<init>(Throwable.java:194)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:366)
at com.ibm.as400.access.AS400JDBCResultSet.getValue(AS400JDBCResultSet.java:3580)
at com.ibm.as400.access.AS400JDBCResultSet.getString(AS400JDBCResultSet.java:3223)
at sun.reflect.GeneratedMethodAccessor459222074.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:309)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.TraceInvocationHandler.invoke(TraceInvocationHandler.java:45)
at com.sap.aii.adapter.jdbc.sql.jdbctrace.$Proxy254.getString(Unknown Source)
at com.sap.aii.adapter.jdbc.JDBC2XI.convert2XML(JDBC2XI.java:954)
at com.sap.aii.adapter.jdbc.JDBC2XI.invoke(JDBC2XI.java:492)
at com.sap.aii.af.service.scheduler.JobBroker$Worker.run(JobBroker.java:475)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:99)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:119)
Dsr Component :
Dsr Transaction : d1f629d01d9b11dd984200145e742794
Dsr User :
Indent : 0
Level : 0
Message Code :
Message Type : 1
Relatives : com.sap.aii.adapter.jdbc.JDBC2XI
Resource Bundlename :
Session : 0
Source : /Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC
ThreadObject : XI JDBC2XI[JDBC_SND_DB2_VehicleReceiving/DB2PRD00/]_170
Transaction : SAP J2EE Engine JTA Transaction : [0ffffffbdffffffa6ffffff960086]
User : J2EE_GUEST
Regards
Ganga Prasad -
BO XI 3.1 in Webi Rich Client, i get this when I use the default Audit Universe to run the Sample Auditing Report.
A database error occured. The database error text is: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) Could not prepared..(WIS 10901)
In infoview webi i get this,
A Database error occured. The database error text is: [Microsoft][ODBC driver Manager] Data source name not found and no default driver specified. (WIS 10901)
We tried checking all the rights and we are trying this using the Administrator user. Also tried logon to Desinger, Import Auditing Universe and Verify the Parameters and then re exported. Still not workingHi Prasanth,
Thanks for your suggestions and I tried all that what I can do along with your suggestion, and still getting the same error, all the connection are working fine, but when I checked for Integrity, Parse Object and Cardinality I was getting some Object error and cardinality error, which am trying to resolve, so I think am having a wrong version of the Activity Universe.
Thanks for your suggestion.
Thanks and Regards
Senthil -
I am using the sender jdbc sender adapter.
I had given the SQL Query:
EXECUTE xyz;
i am getting SQL Exception.
SQL Statement not allowed in adapter monitoring.
GauravHi,
Which database you are using ?
Are you executing the Stored Procedure ?
check out this for the syntax etc-
http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
Regards,
Moorthy -
ODI Error: java.sql.SQLException: statement is not in batch mode
Greetings Gurus!
Would anybody know why changing a SQL view from
AND hapf.attribute1 LIKE '%Active%'
To
AND (hapf.attribute1 LIKE '%Active%' or hapf.attribute1 = ‘Frozen’)
cause ODI to fail?
This is the error message from ODI:
ODI-1228: Task SrcSet0 (Loading) fails on the target SUNOPSIS_ENGINE connection SUNOPSIS_MEMORY_ENGINE.
Caused By: java.sql.SQLException: statement is not in batch mode
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.Util.sqlExceptionSQL(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.executeBatch(Unknown Source)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.end(SQLCommand.java:267)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.endExecution(SQLExecutor.java:156)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.endExecution(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:113)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.hsqldb.HsqlException: statement is not in batch mode
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.error.Error.error(Unknown Source)
... 19 more
Thank you!
RayLooks like the single quotes around Frozen are not ascii single quotes. They seem to be a copy paste job from MSWord.
It should be 'Frozen' and then you shouldnt have that issue
>
AND hapf.attribute1 LIKE '%Active%'
To
AND (hapf.attribute1 LIKE '%Active%' or hapf.attribute1 = ‘Frozen’)
>
Devil is in the details ;) -
SQL STATEMENT NOT PROPERLY ENDED - HELP NEEDED
Can anyone tell me the error in this code, I get an error message sql statement not properly ended when I run it.
update MODT set rootobj=(SELECT REF(A) FROM
OR_COMP_T A
WHERE A.ID=O.ID)
AS OR_COMP_T_REF)
FROM OLD_MODT O where id = 1;Hi, here is the schema and the expected results.
=======================================================================================
CREATE TYPE OR_MODT_OBJ;
CREATE TYPE OR_MODT_OBJ_REF AS TABLE OF REF OR_MODT_OBJ;
=================================================
CREATE OR REPLACE TYPE OR_COMP_T_OBJ
(id number (6),
typ char (4),
SUPERID REF OR_COMP_T_OBJ,
MOD REF OR_MODT_OBJ);
=================================================
CREATE OR REPLACE TYPE OR_COMP_T_REF AS TABLE OF REF OR_COMP_T_OBJ;
=================================================
CREATE TABLE OR_COMP_T OF OR_COMP_T_OBJ
=================================================
CREATE TYPE OR_MODT_OBJ
(id number (6),
typ char (4),
rootobj REF OR_COMP_T_OBJ,
comp_tb OR_COMP_T_REF);
=================================================
CREATE TABLE MODT OF OR_MODT_OBJ
NESTED COMP_TB STORE AS COMP_TB_NESTED;
=================================================
INSERT INTO OR_MODT (ID,TYP,ROOTOBJ,COMP_TB)
SELECT ID,TYP,NULL,NULL FROM OLD_MODT;
INSERT INTO OR_COMP_T(ID,TYP,SUPERID,MOD)
SELECT ID,TYP,NULL,NULL FROM OLD_OR_COMP_T;
==================================================
There are two rows in OLD_MODT, and these two rows are to be inserted into OR_MODT.
They are:
Sample data in OLD_MODT are:
id, typ, rootobj
1 type1 1
2 type3 365
=================================================
Data from OLD_OR_COMP_T is to be inserted into OR_COMP_T as well, and likewise, it has a ref to OR_MODT, so the ref data was not inserted at the same time.
Now OLD_OR_COMP_T has a number of rows but attribute MOD for two of these rows os the rootobj for OR_MODT,
such that:
id typ superID mod
1 type4 NULL 1
2 type2 10101 1
3 type 20202 1
365 type2 NULL 2
366 type2 20202 2
I want to get the ID of OR_COMP_T where ID is 1 and where ID is 365. These values are to be in rootobj.
I also want to get the value of ID in OR_MODT to be placed in MOD of OR_COMP_T.
PLEASE HELP ME. -
Exporting SQL Select statement to spreadsheet
Hi all, basic question that I couldn't find the answer to while googling and searching the Oracle documentation.
What is the code for exporting the result of a SQL Select statement to a spreadsheet such as Excel or Calc? In Oracle SQL Developer I tried saving the output as an XML file but it did not come out properly and I tried using EXPORT at the end of the statement but it gave an error message and I am not sure if this is the right command or what the syntax is. Thanks.Here's an example of one way to create CSV files that most spreadsheet type applications are able to read...
As sys user:
CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
/As myuser:
CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
,p_dir IN VARCHAR2
,p_header_file IN VARCHAR2
,p_data_file IN VARCHAR2 := NULL) IS
v_finaltxt VARCHAR2(4000);
v_v_val VARCHAR2(4000);
v_n_val NUMBER;
v_d_val DATE;
v_ret NUMBER;
c NUMBER;
d NUMBER;
col_cnt INTEGER;
f BOOLEAN;
rec_tab DBMS_SQL.DESC_TAB;
col_num NUMBER;
v_fh UTL_FILE.FILE_TYPE;
v_samefile BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
BEGIN
c := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
d := DBMS_SQL.EXECUTE(c);
DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
FOR j in 1..col_cnt
LOOP
CASE rec_tab(j).col_type
WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
ELSE
DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
END CASE;
END LOOP;
-- This part outputs the HEADER
v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
FOR j in 1..col_cnt
LOOP
v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
END LOOP;
-- DBMS_OUTPUT.PUT_LINE(v_finaltxt);
UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
IF NOT v_samefile THEN
UTL_FILE.FCLOSE(v_fh);
END IF;
-- This part outputs the DATA
IF NOT v_samefile THEN
v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
END IF;
LOOP
v_ret := DBMS_SQL.FETCH_ROWS(c);
EXIT WHEN v_ret = 0;
v_finaltxt := NULL;
FOR j in 1..col_cnt
LOOP
CASE rec_tab(j).col_type
WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
ELSE
v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
END CASE;
END LOOP;
-- DBMS_OUTPUT.PUT_LINE(v_finaltxt);
UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
END LOOP;
UTL_FILE.FCLOSE(v_fh);
DBMS_SQL.CLOSE_CURSOR(c);
END;This allows for the header row and the data to be written to seperate files if required.
e.g.
SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
PL/SQL procedure successfully completed.Output.txt file contains:
empno,ename,job,mgr,hiredate,sal,comm,deptno
7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10The procedure allows for the header and data to go to seperate files if required. Just specifying the "header" filename will put the header and data in the one file.
Adapt to output different datatypes and styles are required.
There are other methods for specifically creating Excel workbooks with multiple sheets etc. and details can be found in the SQL and PL/SQL FAQ at the top of the forum:
{message:id=9360007} -
Queries in SQL developper do not return anything?
Hello there,
First of I am completely new to Oracle and IT in general. Apart from having used computers since the heyday my knowledge of programming is very little. I have been reading Oracle documentation and bought the CBT nuggets tutorials to prepare for examination.
I have followed the instructions to install the HR schema which worked in SQL*Plus but whenever i go into SQL developper and create a connection using the same username/password as I did in SQL*plus, then type in the select table_name from user_tables; query, nothing happens.
What am I doing wrong? Am i simply not connecting to the same DB?
Thanks in advanceSo when i set up the HR schema using SQL plus and was prompted to give a password for HR, i did that. Now when i open up the SQL plus (as administrator) and log in using username HR and the password i set for it, I can access the Schema's default tables such as employees.
However on SQL developper, I open up a new connection called HR and put the same password that HR uses on SQL plus but whenever I attempt a select statement there are no returns. It just seems like SQL developper is not connected to the database.
I am currently using the CBT nuggers tutorial for the fundamentals exam 1z0-051 and the tutorial uses both SQL developer and SQL plus.
I appreciate all the responses but unfortunately I am stuck :(
I get this message when i go to Query builder:
Text is not a valid, single SELECT statement.
Syntax Error at line 4, column 9
select * employees;
^^^
Expected: ',','BULK','FROM','INTO',BULK_COLLECT_opt,from_clause,into_list,
Query Builder disabled.
Edited by: Vlakarmis on Jan 2, 2013 7:04 AM -
Multiple statements in a preparestatement function of Connection object?
hi,
is it possible to have multiple statements prepared and executed at one go?
such as;
PreparedStatement stmt = conn.prepareStatement("SET ISOLATION TO DIRTY READ SELECT * FROM " + srcTable);
im trying to set the isolation to dirty read, currently on informix. I also tried using semicolon in between the two statements, but it just doesn't work. Or do i have to seperate them out, and execute twice?In future JDBC questions should be posted in the JDBC forum.
yes well,
but i didn't want the whole connection to be set to
dirty read, can't i just set one sql query to dirty
read?
anyways, i think setting the isolation level at sql
for java to execute will still not overwrite the
.setTransactionIsolation levels, true?I don't know why you would think that. How do you think the driver is implementing this?
Maybe you are looking for
-
Office 2013 for Mcbook !!!!
Hi all, i need to know the best way to install office 2013 for mc book??? i just purchased office 2013 personal online, and don't know how to install it? and should i recieve a tangible CD pack or i can istall it online? trying to reach the lousy sup
-
Still using the @mac.com mail address and up to date on everything, but have not gone to Maverick. All of a sudden Mail wouldn't let me delete. Said that title of email was already in trash. And sure enough it was. Clicking on the help butt
-
Bpm process is not shown on bpm workspace but i see exception on the server
Hi Gurus, When i try to deploy a simple BPM composite i am getting below exception. deployment goes fine but when you open BPM workspace to initiate a instance , bpm process is not shown on bpm workspace instead i see below below error can anybody he
-
ASA 5520 Version 8.2(1) Split tunnel enable Process
Hi, We have configured a cisco ASA 5520 firewall as a remote VPN. Remote VPN user connected properly but VPN user disconnected form internet. So we need to configure split tunnel. Please help us how to configure split tunnel and require parameters/fi
-
Hello, I try to use the example: Example report HTML.vi, there is an exemple with this command: <tab>, <newline> but it seems that it's not work very well, how can I perfom to write correctly a texte with tabulation, newline etc... Do you know the co