Archive for Databases

How to obtain a list of running oracle scheduler jobs

This was actually given to me by a workmate (thanks Ramón). The SQL is simple and gives you a list of all the Oracle scheduler jobs that are running in the system. select rj.job_name, s.username, s.sid, s.serial#, p.spid, s.lockwait, s.logon_time…

Posted in Databases | Comments

How to match OS processes to Oracle processes

From time to time I come across the problem of trying to figure out what a particular OS process (PID) is doing in an Oracle database. When monitoring the DB server you can easily discover the processes that are taking…

Posted in Databases, Sysadmin, Unix | Comments

How to find locked objects in an Oracle DB

In my work I have to load data into Oracle databases very frequently. Doing this kind of operations can lead to locking database objects. A table lock can cause a lot of delays because while a table is locked you…

Posted in Databases | Comments

How to update the contents of a table with contents of another table

I guess this one’s straight forward for medium/experts, but for me its not trivial. Every time I need to do it I look it up because the solution doesn’t come to my mind. So, the idea is to update a…

Posted in Databases | Comments

How to get the Oracle version using SQL

I’ve found the following two SQL. I’ve used them both with regular access users (neither sys nor system). select * from v$version and select * from product_component_version  

Posted in Databases | Comments

How to move all objects in a schema to a different tablespace

There are some situations where you need to move all objects in a schema to a tablespace different to where they are stored. I have faced this when restoring a database coming from a development environment into a production environment….

Posted in Databases | Comments

How to install MySQL in Solaris 10

I recently had to install a MySQL server into a Solaris 10 box. This is how I did it: 1.- INSTALL THE PACKAGE (I downloaded the package from bash-3.00# pkgadd –d mysql-5.1.48-solaris10-sparc-64bit.pkg 2.- CHANGE DATA DIRECTORY (THIS IS WHERE…

Posted in Databases | Comments

Swedish Greys - a WordPress theme from Nordic Themepark.