I have front end designed in VB6.I have database as Sybase server.
I am debugging vb6 application to fix one issue,i want to attach the vb6 application with sybase server so that the debugger gets attached with the stored procedure at the time of debugging itself.
I am not able to debug the back end stored procedure from the front end UI.
Please help me out .
thanks,
Related
We have here a application that uses ODAC components inside COM+ dlls to connect to Oracle Server 11g.
Lately we are facing a problem that we cannot find the solution.
For some reason, when the concurrency of the application server at some of our clients is too high, some dlls starts to hang and they have to kill the process to restore the usability of our product. Trying to reproduce the error here at our office, we created a test environment to stress an application server. We start 30-50 programs that make calls to application and after some time the problem appears.
Debugging our DLL after the server hangs, shows that any subsequent call to OCISessionBegin cannot complete. No error is generated. No other symptoms are visible.
The last line that the we try to execute is: Check(OCISessionBegin(...)); on OraClasses.pas
We checked the database no contention, no lock.
We are using ODAC 6 on our clients, but we upgraded it to the last version and the problem persists. We have to use the Oracle Client 10 to connect to the database 11g because the are using the version 6 of ODAC.
Thanks a lot
AFAIK you need to create your environment with both OCI_EVENTS + OCI_THREADED attributes sets, in such a configuration.
For instance, here is how it is initialized in our Open Source direct Oracle access unit:
fEnvironmentInitializationMode := OCI_EVENTS or OCI_THREADED;
...
with OCI do
try
if fEnv=nil then
// will use UTF-8 encoding by default, in a multi-threaded context
// OCI_EVENTS is needed to support Oracle RAC Connection Load Balancing
EnvNlsCreate(fEnv,Props.EnvironmentInitializationMode,
nil,nil,nil,nil,0,nil,OCI_UTF8,OCI_UTF8);
I suspect you have to check how your OCI environment is created in ODAC.
I am fairly new to PL/SQL and have been assigned to maintain a PL/SQL system that uses WEB pages generated with PL/SQL as a front end (PL/SQL Web Application?). Because of the complexity of the application, I am trying to get the debugger from Oracle Developer Tools for Visual Studio (11.2.0.3.15) or Oracle's SQL Developer working.
I can not kick off the application from the development environment, so I am using the
DBMS_DEBUG_JDWP.CONNECT_TCP('10.15.1.177', '4000') and DBMS_DEBUG_JDWP.DISCONNECT() procedures in the package that I am trying to debug.
When the Oracle debug listener is started in Visual Studio, Tools -> Start Oracle External Application Debugger, this message appears in the output window:
PL/SQL Debugger starts. PL/SQL Debugger is listening on host:
10.15.1.177 and port: 4000.
In Oracle SQL Developer this message is shown
Debug listener (port=4000 Timeout=0 Local address=10.15.1.177)
Using Visual Studio, If the webpage is accessed and there are no breakpoints, the following messages appears the output window.
A database has connected to the PL/SQL Debugger on host: 10.15.1.177
and port: 4000. The thread 0x1 has exited with code 0 (0x0). A
database has disconnected from the PL/SQL Debugger on host:10.15.1.177
and port: 4000.
If there is a break-point anywhere in the package, before, between, or after the DBMS_DEBUG_JDWP statements, both the WEB browser and the development environment hang. Visual Studio sits with "Not Responding" until it is terminated.
In Oracle SQL Developer the WEB page hangs. If the listener is stopped then the web page can not be displayed because there is no listener available.
I do not have control over the Oracle server, but since it established a connection, I assume there is no firewall blocking the port.?
Does someone have an idea what I missed?
I have been told that you can not debug PL/SQL packages that generate web pages, but have not found any documentation indicating that is a problem.
I have been working with mod_plsql for quite some time and in my personal experience the best (if not only) way to debug such an application is to instrument your source code.
The debugger(s) works fine for pl/sql code that can be execute outside the browser but for code the interacts with mod_plsql it is in my experience best to instrument the code with tracing and logging message and use them to follow the program flow.
We use a quite sophisticated logging framework but it all comes down to a simple table where to store the log messages and an (autonomous) procedure that inserts log messages in this table.
Example:
CREATE TABLE logtab (id NUMBER, when DATE, text VARCHAR2(2000));
CREATE SEQUENCE logseq;
CREATE OR REPLACE
PROCEDURE dolog(text IN VARCHAR2)
IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO logtab (id, when, text) VALUES (logseq.NEXTVAL, SYSDATE, SUBSTR(text, 1, 2000));
COMMIT;
END dolog;
/
EXECUTE dolog('test');
I have a WCF service that uses Microsoft Enterprise Library Logging to log some messages to the Event Log. That works just fine.
The problem is that i want to log some messages to a table in an Oracle database. I am using the Entity Framework to communicate with that Oracle database.
The next step is a right click on the 'web.config' and choose the option 'Edit Enterprise Configuration'. I get the 'Enterprise Library Configuration' editor. In there i am trying to set the Logging Settings so that it also logs to the database, but when i add a database trace listener it´s asking me to fill in a procedure name. Do i have to add a procedure name to fill the table in Oracle? The msdn tells me to run the script that create an MSSQL database 'Logging' and some tables. But i don't have an MSSQL server, i have an Oracle server. And i don't want to use a seperate logging database, but save the logs to a single table.
Can anybody help me with this?
Kind regards
The Enterprise Library Database Trace Listener uses 2 stored procedures to write to the database: Add Category Procedure and Write To Log Procedure.
There is a SQL Server script to create the tables and stored procedures. This would have to be ported to Oracle.
Unfortunately, it looks like this does not work as easily as you would hope. See the blog post, Enterprise Library Logging to Oracle Database (this is based on EntLib 3, I believe) and the work item Cannot log to oracle Database using logging blocks for a description of some of the issues as well as some downloads to help.
I have this web application (using Struts 1.x) running on Weblogic 10.3.3 that read files and input the data to a database (Oracle 11g DB). And also through this web application, I can run a stored procedure in the database. The problem is now after a few changes on the stored procedure, it requires a pretty long time to finish executing (25-40 minutes).
The page to run the stored procedure now will load, and even after the stored procedure has finished (checked through session browser), the page will still in loading state and after sometimes it will display timeout error.
Is there any way for a web page to run a stored procedure that takes long time to finish (60 minutes)? Should I make changes to the application code or the Weblogic setting?
Thanks for the responses.
You should never ever ever ever leave the user waiting. When I last dealt with that:
Client(user/browser) tells server "Start procedure"
Server spawns thread which starts the procedure.
Server tells Client(user/browser) "I is done now. come back later. Mabee I emails yoo"
Server completes procedure.
Server emails user that procedure is done.
Secondary thread terminates.
Server eats Sir Robin's minstrels and there is much rejoicing.
i'm trying to build a setup package for a legacy vb6 software. the software itself connects to a sql server via sqlncli (native client). i've packaged all the dependencies and deploy them to a new machine running winxp and office2003.
now, from the target machine i can connect to the database (ms sqlserver 2005) that is running somewhere else using tcp/ip. the legacy software connects to the db just fine and i can manipulate data. but when i try to open a crystal report, things get messy:
i get an error saying "Run-time error '-2147189176(80047e48): Logon failed.
Details: 01000:[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect())"
since the reports where designed on a different system, different db and what not ... there is a loop before calling the report that resets the db-information for every table :
For i= 1 To numTables
Set crTable = crTables.Item(i)
crTable.SetLogOnInfo dbServer, dbName, dbLogin, dbPasswd
Next
the ConnectBufferString reads "Connection String=DRIVER=SQL Server;;User ID=user;;Password=;;Database=MY_DB;;Server=192.168.1.3\SQLEXPRESS;;UseDSNProperties=-1"
there doesn't seem to be a way to explicitly set the provider to SQLNCLI, at least i don't see any.
when running the software on my dev-system everything works like it's supposed to.
i hope you guys can help me out with this.
just so we don't have to argue about this : i also think both these technologies (vb6 and cr9) are outdated, but switching is not an option here.
You need to wipe the tables and change the configuration of access to the database, see the example below.
In the first line of code I put an example if necessary to change the connection driver, in my case the report was pointing to a PostgreSQL database and programativamente needed change to connect to a SQL SERVER.
myReportObject.Database.Tables(1).DllName = "crdb_ado.dll" 'Connect to SQL with OLEDB
For Index = 1 To myReportObject.Database.Tables.Count
With myReportObject.Database.Tables(Index)
.ConnectionProperties.DeleteAll
.ConnectionProperties.Add "Provider", "SQLOLEDB"
.ConnectionProperties.Add "Data Source", mySqlIP
.ConnectionProperties.Add "Initial Catalog", myDB
.ConnectionProperties.Add "User ID", usr_id
.ConnectionProperties.Add "Password", pass
.ConnectionProperties.Add "Integrated Security", 0
End With
Next
I know you said in your comment that you've got around this already, but I figured I'd throw this out there. :)
You may try using
Provider = SQLNCLI
instead of,
DRIVER = SQL Server
to see if that makes a difference.
Take a look at the following link. Scroll down on the page until you see the "SQL Native Client 9.0 OLE DB provider" section. They show examples of connections strings using the SQL Server Native Client.
http://www.connectionstrings.com/sql-server-2005
Hope this helps.