SQL data extracts works in Oracle 11g but not Oracle 12c - oracle

When I execute the following SQL using TOAD against an Oracle 11g database, the fully formed XML is returned successfully:
With T As (SELECT dbms_xmlgen.getxml('SELECT m.trans_message FROM xml_nodes_ams_in a, message m WHERE a.id = m.msg_id AND a.UPN IN(''A30971016528VE8K'',''A30971016529VE84'') ORDER BY a.upn ASC'
) As output_xml from dual
) select dbms_xmlgen.Convert(output_xml,1) from T
However, when I execute the exact same SQL against our newly installed Oracle 12c database, some of the XML data appears to be missing (around 5000 characters).
I have discussed this with the DBA who reckons its a client issue rather than a database issue as he says there is no setting against the database that would cause this.
Has anyone got any advise on how I can progress this issue?

I raised a service request with Oracle and they came back to me and advised that there is a bug with the dbms_xmlgen.Convert function within Oracle 12.1 that was fixed in Oracle 12.2. Basically the function fails with XML greater than 120 KB.

Related

ORA-01036: illegal variable name/number with Oracle 18 and Oracle 19 Windows client

After upgrading from Oracle 11/12 to 18/19 I get this error: ORA-01036: illegal variable name/number.
The error occurred in a query like this:
SELECT * FROM (SELECT * FROM TABLE) MY_TABLE WHERE ROWNUM <= :P_ROWNUM
(Subquery + binding parameters)
The identical query works properly with the Oracle 11.2.0.4 or 12.1.0.2 client. It fails with the Oracle Client 18c or 19c.
PS: The Oracle Server is version 18c 64x for Windows.
I use Delphi 10.1.2 with ADO components (dbGO). I also tried with Delphi 13.3.3 but the behavior is the same.
It seems to be a problem in the Oracle OLE DB provider (ORAOLEDB).
If I don't use ADO but DevArt Unidac all worked as expected.
Someone can help me?
Max
Your query is fine. We ran into a similar issue when migrating from 12.1 to 19. In our case, we have a custom OLE DB provider that interfaces with OraOLEDB (and others) using the Microsoft OLE DB Provider Templates (ATL). When attempting to upgrade from 12.1.x to 19c we started seeing the strange and confusing "ORA-01036: illegal variable name/number" error for parameterized SELECT queries. The queries would succeed the first time they were executed but subsequent executions would fail when all we did was change the parameter value (the queries were executed sequentially). I went on a wild goose chase trying to diagnose the issue and finally decided it had to be an Oracle caching bug of some kind. Yesterday, I experimented with the cache-related connection string attributes and found that adding the MetaDataCacheSize attribute and setting its value to 0 (zero) resolved the issue for us. None of the current Oracle patches appear to address this issue, at least none of those that mention the ORA-01036 error.

Some columns are missing in select * from Oracle to SQL Server over dblink

I'm trying to get some data out of a SQL Server instance and into an Oracle 11g database. The Oracle DB communicates wih the SQL Server over dblink.
When I try to select * from a table on the SQL Server side which has nvarchar(max) columns, those columns do not appear. They are simply ignored and not returned by the Oracle query engine.
I've come across this other question but I don't think it answers my problem seeing the DB characterset on the Oracle DB's side is WE8ISO8859P15 (Unicode).
What am i missing?

How to see tables created on SQL developer with SQL PLUS?

I created a tablespace on Oracle SQL Developer and trying to access tables data with SQL PLUS console. But when I insert a row with SQL Developer and want to see if the result is display on the SQL PLUS console, SQL PLUS doesn't show me any results. Seems like there's no connection between SQL PLUS and SQL Developer.
Is anyone has an idea ?
of course you are committing the transactions, then querying them from SQL*Plus; otherwise there is no way to see the data from another session.
commit;
SQLDeveloper and SQL*Plus are just two front end tools that allow to access the database. Let's start by making sure, that:
* You connected with the same database
* You are connected as the same user
* You did commit
You need to commit from JDeveloper and not be in a transaction in sqlplus.

Oracle compile package: table has errors

I have a big problem on my database.
I have a Oracle 9i database and a Oracle 11g database.
I have a package with a stored procedure on my 9i database. Inside a have a very simple select like :
select * from my_table_on_my_11g_database#MYDBLINK;
When I'm trying to compile the package containing this query, I have the following error :
[Error] ORA-04063 (337: 20): PL/SQL: ORA-04063: table "my_table_on_my_11g_database" has errors
When I'm trying to execute the query using Toad in a editor, it works fine.
So, I don't know what is the problem.
It's about roles, rights ?
We just installed this 11G database, before we had a 9i database and it worked fine. I'm guessing I'm missing some grants ?
Thanks for any idea.
C.C.
Finally it works. I've created a new public DBLink and it works.
It was maybe because the DBLInk was created before with the old database, I don't know.
Thanks for the answers.

What is the query to display all database in oracle server 9i?

I like to know the query to get all database in oracle server 9i. Actually my requirement is to select all database in oracle and next to get all table , views , procedures , function in each database. Is their any way to get all these information? I am using oracle spl plus developer.
The database names you can get from server file system or check running Oracle Processes.
Then check select * from DBA_OBJECTS WHERE OBJECT_TYPE IN ('TABLE','VIEW','FUNCTION','PACKAGE','PROCEDURE')

Resources