Stored Procedure in Sybase, debugging and error logging - stored-procedures

my procedure needs to process 1466 data but it stops after 1398 data, how to debug it or create a log file so that i could see the error . I am using ASE isql tool, please guide!
"The ASE isql hangs and it stopped working, pop up comes"

Related

ORA-04068: PLSQL stored procedure some calls are failed and some calls are passed

I am trying to execute oracle stored procedure from my application and connecting ORACLE database. I noticed, same connections call get passed and some connection throwing exception as below:
ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package body "USER.PKG_MY_PACKAGE" has been invalidated
ORA-04065: not executed, altered or dropped package body "USER.PKG_MY_PACKAGE"
ORA-06508: PL/SQL: could not find program being called: "USER.PKG_MY_PACKAGE"
ORA-06512: at line 34
I referred some stack overflow post and we can fix in DB side. But DB side I don't have access to fix this issue(i.e. production) is there any way to fix from application side. I am using JDBI-Datasource-connection pooling in my java code. If I restart my lower environments and works fine. But, I can't restart the production environment each and every time. Please let me know, how to fix this issue from my application side.

SSIS Data flow failing - calling a Sybase ASE stored procedure using temp tables

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.

Indy 10 Delphi FTP Client Demo Error

I am new to Delphi and wanted to try breaking down a demo to understand the it's structure.
I am trying to get the Indy 10 Delphi FTP Client demo to run on Delphi XE2.
Whenever I run the downloaded code, I enter the FTP URL, Username, Password etc and when the FTP connects this error appears:
raised exception class $C00000005 with message 'access violation at
0x0018f90e: write of address 0x0000000'
Which I assume it means it's pointing at a null?
The debugging tool simple points at this line..
ChangeFTPDir(Sites[cbFTPAddress.ItemIndex].RootDir);
What would be the best way of removing this error (try/catch) or is there a working sample of a Delphi FTP procedure that I could have a look at?
Thanks for your time in advance,
Sophie
The procedure is as below:
procedure TfrmMain.ChangeFTPDir(NewDir: String);
begin
FLastDirStack.Add(FTP.RetrieveCurrentDir);
FTP.ChangeDir(NewDir);
DisplayFTP;
end;
I assume that the site array does contain details as the ftp does connect to the name of the stored ftp site before the error appears...
Did you use IdAllFTPListParsers ? Try it.

Trouble getting windows service to start

I'm having trouble getting a windows service to start. Each time it runs, in the IDE, as a service, or otherwise, an error shows up in the windows event log stating:
"The service process could not connect to the service controller."
When debugging, I can step through the ServiceCreate procedure, and I successful print to a log file there. However, I have identical code (save the message string) in the ServiceStart or ServiceExecute procedures and it never appears to run.
The debugger lets me step into Application.CreateForm, which jumps straight to the ServiceCreate procedure but I cannot step into Application.Run.
Any ideas?
Edit: To clarify, I am debugging by starting the windows service, then attaching to the process in Delphi during a wait that I added to start up.
Edit 2: Okay, it's now letting me step into Application.Run and more details where ever I want. I had turned off debug dcus. Thought stepping through the VCL code did nothing to help me see what the problem was. I still have no idea how ServiceStart or ServiceExecute are supposed to get called.
this is the only error message you receive? what code do you have in the initialization section of your pas files? this error is generally raised when an error is raised and your application doesn't catch it. try to log all the events from app. also, take a look into the Windows event viewer for more details related to this.

Compiling Stored Procedure hangs Oracle SQL Developer

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.

Resources