Nothing big, just a placeholder for an example of what is in the subject line. //C:\Users\showard>C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe /r:”C:\oracle\product\11.2.0\client_1\ODP.NET\bin\2.x\Oracle.DataAccess.dll” checkConn.cs using System; using Oracle.DataAccess.Client; public class checkConn { public static void Main(String []args){ OracleConnection conn = new OracleConnection(“User Id=biztalk;Password=********;Data Source=fn9dev”); OracleDataReader rdr;…
Category: Development
Print thread dump for a single thread
We had an issue where a single thread was using all the CPU. We wanted to check it at the command line while troubleshooting. We used what is below… [atg@CMHLDECOMAP01 ~]$ jstack 3000 | awk ‘{if ($1 == “\”Thread-9\””) {i…
Java date difference in milliseconds
Every time I need to do math on a date in java, I end up googling it. While that isn’t the worst way to do things (hey, it’s probably how you found this :)), I wanted something I *knew* would…
Query SQL Server stored procedure text with JDBC
I needed to quickly print the text associated with several stored procedures across multiple database servers to individual files. I used what is below. import java.sql.*; import com.microsoft.sqlserver.jdbc.*; import java.io.*; public class sqlProcedures { public static void main(String[] args) {…
Additional cursor trace information in 11.2.0
Oracle has added a lot of additional trace output in the 10046 optimizer trace files. As I have posted previously, I find the output in these files to be useful not only for troubleshooting performance issues, but also understanding the…
Querying load balancing information from the Load Balancing Advisory
I use what is below to periodically gather what the load balancing advisory posts. The data reflects the percentage of connections to distribute to each instance for a given service in a RAC. #!/home/oracle/local/bin/python import cx_Oracle, string conn = cx_Oracle.connect(mode…
Which SQL statement is responsible for a wait event?
We generate a daily health check report for each database that contains high level summaries of the previous days activities. One element of this report is a list of the top ten non idle wait events (disclaimer: I know that…
Constructing a thread when you don’t know the class ahead of time
While building a generic load testing toolkit, I found it useful to be able to use a standard invocation framework for running a thread class that contains the actual application code to be stress tested. However, I had some problems…
Simple usage of a user profile to limit concurrent logins
We had an issue in a development database where a group of developers were not using a connection manager, but trying to manage their own connections. This did not end well. To limit our exposure and the impact on other…
Multiple threads using same physical connection
This just doesn’t sound good. Having multiple threads use the same physical connection sounds like an exercise in frustration. Although the OracleDataSource connection object is thread safe, there is really no need to create a smaller number of connections than…