I am facing an unusual problem in Oracle SQL Developer. When I try to compile a store procedure it hangs up the Oracle SQL DEveloper Screen and I can't do any activity, except to kill the SQL developer instance and start again.
But the same issue. Anybody faced such problem? I am new to oracle.
Here some additions to the problem I waited for 5 to 10 mins and got this error
ORA-04021 timeout occurred while waiting to lock object
But I am the only person working on this instance of Oracle
One of your previous attempts to create the procedure, which you killed, is still stuck and active. You need to kill that Oracle session using http://www.oracle-base.com/articles/misc/KillingOracleSessions.php
The other source of this error is another process in your database is running the procedure while you are trying to compile it. Use this query to figure out which process is running it:
select sess.sid, sess.username, sql_text
from v$sqlarea sqlarea, v$session sess
where sess.sql_hash_value = sqlarea.hash_value
and sess.sql_address = sqlarea.address
and sess.username is not null;
Query v$locked_object to see if any objects that are currently locked are in use by your Stored Procedure. If so, track down the query/module which has it locked & end the query.
The link given by Thomas gives the details of how to kill a session, once the sessions are killed & v$locked_object shows no records, you should be able to compile fine.
Related
I develop and application on Delphi 5 with BDE and never got any reclaim till I update to Delphi XE 10 I change my data Engine From BDE to Firedac. program is simple POS app make invoices , Invoice Table with Items table master-details. from time to time miss some invoices not specific but around 11 each 1000.
I start looking, checking and changing , i add Transaction component.. test same result later adding SchemaAdapter same result Till i figure out what is the problem
if the data Server running an statement in the same time what to run a different statement from another client on the same table here you can found the big bug on FireDac that the 2th client will appear that the data saved but in fact nothing saved
otherwise same scenario on BDE the result completely different the 2th client raise an error with message "Dead ... SQL " at least know that the data not saved
Hope some test that too , heavy SQL statement run it on the Server and try to insert on the table in CachUpdate -> and applyUpdate and will see the result
All Above use Interbase Database
This issue resolved in Delphi 10.3 , the Firedac engine work fine now
I have an windows desktop application which uses Mssql2005 express database.
But sometimes, my application cannot connect with the database.
When I run "exec sp_helpdb", my database name is not included in the result list. And when I try to attach my database, server says "database name already exist".
What happened with my database, please help me on this issue!
My application built on .NetFrameWork3.5
Kind Regards
Are you open a connection to the database in your application and you are not closing it?
Try to check the number of your connection with this script, before you are running your app, in the middle and after it got stuck-
SELECT
DB_NAME(dbid) as DBName,
COUNT(dbid) as NumberOfConnections,
loginame as LoginName
FROM
sys.sysprocesses
WHERE
dbid > 0
GROUP BY
dbid, loginame
source
I have been battling with a SSIS task (2012), which has a series of Data flow tasks run in series.
In particular, there is one data flow task that is failing at the Data Source stage. I am Calling a Sybase ASE (15) stored procedure, using the OLE DB driver. This stored procedure is called via a "Command Via Variable" call.
What is happening is the stored procedure is failing at the end of the Pre-Execution phase, with an "Unable To Retrieve Column Information From The Data Source" error message.
The failure only occurs when I run this from the SQL server (2014) that I have deployed the process to. It appears to run OK in my dev environment (Visual Studio 2012).
The only clue I have at the moment points to the ASE Stored Proc. I have commented out a whole bunch of updates and other proc internal Temp Table populates and it all works fine. I start randomly adding them back and the process fails - there appears to be no rhyme or reason.....
Has anyone come across this issue before? Is there any setting on either SSIS, SQL Server or ASE that I could set that might assist?
Thanks
As per my comment above, the issue came down to driver incompatibility between my dev environment and the SQL server that I deployed the SSIS project to.
In short, My dev environment is using the ASE 15.7.0.1260 suite of drivers. The SQL server that I was deploying to had the ASE 15.7.0.501 suite of drivers installed.
Once the SQL server had its drivers updated, all has started working faultlessly.
I am having a strange problem. One of my stored procedure is getting dropped automatically.
Its not that I am creating it in a wrong place. Every time I create the SP and execute my web page, it shows. After few min, if I execute the page again, it displays a error message which is due to missing SP.
I have tried recreating again and again, and everytime it repeats. I even did restart the machine (Windows Server 2008 R2), but no use. The same procedure is fine on my SQL Server instance on Windows 8 machine.
I tried the SQL Server Profiler, but of no use. Don't see any drop procedure.
Also for some strange reason, I am getting a lot of requests every second to my SQL Server which is hosting a dotnetnuke based website. Can someone help me with this.
Thanks
Just had this issue presented by another developer. It turned out that there was a "DROP procedure" included at the end of another SP.
To look for such hidden statement in another database SP, run a statement like
select OBJECT_NAME(sc.id), sc.* from syscomments sc where text like '%<name_of_SP>%'
where <name_of_SP> is the SP being dropped.
I had this same problem, and the issue was a missing GO in the DB script between a stored procedure create script and a drop of another stored procedure.
The solution was to add a GO between stored procedure 1 create and stored procedure 2 drop.
I referred to Stored Procedure gets dropped randomly.
I have a program that is filling a DB in a single thread.
I Use one connection for all queries. Thats so i will be able to run them all in transactions.
Every second I get a new set of files that has to be entered into a SQL Server 2005 Express.
The Application can run for 24 to 36 hours and than suddenly get a "EAccessViolation" in a query.
This query is by then been executed for atleast 24 * 60 * 60 times.
I'm not shure if it also happens with querys without parameres because most of the queries (90%) has parameres. they are inserts/updates or select with a parameter(s).
when this occures all queries afterwards get the same EAccessViolation and after a while I get a StackOverflow.
While the code is constructed in sutch a manner that an exception will be handled and the next time the code should run without problems.
the fact that this is happening in varios queries (that did't change from the former version) with the only change that in stead of using dbGo from BCB Builder 2007 we did ADO with Cpp Builder 6.0.
I asume that it is someware in the Windows version MDAC(2.8) or in de dbGo from CodeGear. The fact that in the previous version (ADO BCB6.0)we did't run into it and now with (dbGO and BCB2007) we have is it making that part very suspicius.
I hope that some has some nice Ideas what could be the reason for all this.
At the moment I Can't reproduce it here on a desktop. I'm still trying to get it reproduced that will defibnitly give more info.
I'm open for suggestions.
regards
jvdn.
I would suspect the driver - try using a different one to see if the problem can be isolated. Also try to rewrite the query to use a different syntax, maybe you could recyle the connections every so often?