TOAD Scheme browser error when executing a package - oracle

I am getting an error
ORA-01086: Savepoint 'somesavepoint' never established
ORA-06512: at MyPackage, line 500
ORA-01002: fetch out of sequence
ORA-06512: at MyPackage, line 650
ORA-06512: at line2
Only happening when I execute the package from the schema browser of TOAD.
Doesn't happen when I execute it from editor
EXEC MyPackage.Procedure
Is anyone aware of any problems related to this? How can this be solved?

ORA-01086 occurs when you commit and then ask to rollback to your savepoint. So when you use TOAD schema browser, there must have been an open bug at that moment to apply a commit or perform a DDL within the session. If you would have had two different TOAD sessions then this should not happen.
Try to have two different sessions
One with Schema Browser
Another with normal Editor
This should be resolving the issue. Else check for quest website for open bugs on your TOAD version.

Related

Debug option invalid in sql developer tool

I having a procedure, which output doesn't show in output variable tab in sql developer.
Actually i have to validate the data in the table used inside the procedure. So i used inbulit debugging option in sql developer tool. But i shows below error message
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '192.168.7.129', '56229' )
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
This session requires DEBUG CONNECT SESSION and DEBUG ANY PROCEDURE user privileges.
Process exited.
I know we can debug using
dbms_output.put_line();
Dbms_utility.format_error_backtrace;
But above two takes a lot time and irritation while debug.
If anyone know an effevtive way of debugging using sql developer, Please let me know.
I have tried to cover everything you need to know here.
Privs Required
ACL for JDWP
DBMS_DEBUG Alternative
How to start the debugger
Watches, Breakpoints, Stepping Into other units
I even have slides and a YouTube tutorial.
This is of course in ADDITION to our docs on the debugger feature in SQL Developer.

How do I work around the Oracle DBLinks limit in Entity Framework?

I am creating an MVC application using Oracle's Entity Framework, and am writing a bit of code to iterate through all relevant DBLinks and testing them out, returning a grid of results (success/fail). My problem is that after using the fourth DBLink, I get an error "ORA-02020: too many database links in use".
I have tried to explicitly close each DBLink after using it ("alter session close database link LinkName"), but I then receive an error "ORA-02080: database link is in use".
I have tried issuing "COMMIT" statement before attempting to close the DBLink, but that doesn't change the error ("database link is in use").
I have tried to closing the database connection, but I still receive the "database link is in use" error when I create a new connection and try to close the DBLink.
Unfortunately, increasing the number of DBLinks available (open_links, open_links_per_instance) is not an option.
Has anyone seen this with Entity Framework and discovered a solution? Does anyone have any ideas of what else to try?
VICTORY! I found that if I set "Pooling=false" in my connection string, then this error goes away in all of the offending scenarios. This is viable for me since this is just used to test the DBLinks on demand, so I can safely turn off pooling in this scenario. Thanks so much for your responses. I was ready to turn in the towel and admit defeat
To see how many db links are open i syour session use the GV$DBLINK view
select DB_LINK from GV$DBLINK;
DB_LI
-----
LEDRP
YDO
To close a db link you must do two things.
First commit or rollback the transaction. Note that even if you do not change anything a transaction is open due to the use of the DB LINK.
Second you must CLOSE DATABASE LINK using the ALTER SESSION statement.
rollback;
ALTER SESSION CLOSE DATABASE LINK LEDRP;
You see, that link is closed and appears not in the view:
select DB_LINK from GV$DBLINK;
DB_LI
-----
YDOV

Oracle Database Copy Failed Using SQL Developer

Few days ago while i tried perform database copy from remote server to local server i got some warnings and one of them was like this
"Error occured executing DDL for TABLE:MASTER_DATA".
And then i clicked yes, but the result of database copy was unexpected, there were only few tables has been copied.
When i tried to see DDL from SQL section/tab on one of table, i got this kind of information
-- Unable to render TABLE DDL for object COMPANY_DB_PROD.MASTER_DATA with DBMS_METADATA attempting internal generator.
I also got this message and i believe this message showed up because there's something wrong with DDL on my database so tables won't be created.
ORA-00942: table or view does not exist
I've never encountered this problem before and i always perform database copy every day since two years ago.
For the record before this problem occurred, i have removed old .arch files manually not by RMAN and i never using any RMAN commands. I also have removed old .xml log files, because these two type of files have made my remote server storage full.
How to trace and fix this kind of problem? Is there any corruption on my Oracle?
Thanks in advance.
The problem was caused by datafile has reached its max size though. I have resolved the problem by following the answer of this discussion ORA-01652: unable to extend temp segment by 128 in tablespace SYSTEM: How to extend?
Anyway, thank you everyone for the help.

ORA-00942: table or view does not exist (ColdFusion application)

I have a ColdFusion 10 application with an Oracle 11g backend.
The Production version works fine. Recently, I had the Oracle DBAs refresh the Test database from Production. Now, I receive the ORA-00942: table or view does not exist error.
All the tables are there when I use SQLPlus and the queries run fine. I am at a loss as to what to check now. The trace sends me to the query that is running fine in SQLPlus. What have I missed?
Update - 17 October 2014
I don't know if it makes any difference, but the line throwing the code is the 1st one here:
`<cfquery name="getWebMaster" datasource="xxxxtest">
select * from users where secureuserid in (select secureuserid from hd_role where webmaster='Yes')
and userstatus='Active' and UserLevel='XXX/XXIT'
</cfquery>`
That means that the entire cfquery section is the error, or just the 1st line? BTW, I think I've figured out how to imbed code. Thanx!
There is only one thing I can think of. The user that you used to run the application/script in your testing environment, and the permission that particular user has - it missed some privileges, so it can not see certain things even though they are there.

Invalid privilege error?

Two related applications use a function in a package in several queries to return some data as CSV. The column being selected and concatenated is a CLOB field and can contain HTML, special characters, etc. The applications have few users and so are not heavily used. One is a Flex application that consumes Oracle HTTP services, and the other is an ASP.NET application that uses ODP.NET. The applications are really one integrated application with hyperlinks to each other.
Yesterday, I received several notifications of a strange error:
ORA-01031: insufficient privileges ORA-06512
The line number in the package in the error details indicates that the error was caused by the function being used in the select clause. It would occur when called by either application about 75% of the time.
Am I correct that an ORA-06512 occurred in the function that then caused an ORA-01031 insufficient privilege error? Unfortunately, ORA-06512 is a very generic error and doesn't tell me anything. And why would it cause an invalid privilege error? The Oracle user accounts being used by both applications have the execute privilege on the package that contains the function.
Regarding the function... it has been used for about 2 years in production without any issue. Also, when I imported the data to QA yesterday and tested it, no error would occur, no matter how many times I hammered the server with requests. But in production, the error would occur about 75% of the time with exactly the same parameters.
The DBA tried to help me with a trace, but we could not find the error message in the trace files.
Today, everything is back to normal in production. Even if I hammer the server with requests the error will stubbornly refuse to occur.
What caused this very strange behaviour yesterday? Do any of the gurus here have any ideas?
EDIT: I just realized one important detail. The column in the table that is being selected and concatenated into CSV by the function is a CLOB.
If the client applications were running "SELECT clob_to_csv(clob_col) FROM ..." and it returned an invalid privilege SOMETIMES, then it is probably something the function is trying to do, rather than the select statement not having sufficient privilege to execute the function.
Not quite clear on what it might do that may require a privilege. Does it use a file (UTL_FILE) or network connection / web service ?
Could be some sort of odd data (a very large clob perhaps).

Resources