Showing posts with label database. Show all posts
Showing posts with label database. Show all posts

Oracle Table and Database Size

Here's how to get Oracle Table and Database Size.

./M6

Using the SQL Server Default Trace to Audit Events

While looking for information about a recovering a JOB in SQL Server without performing a full restore, I fiound this interesting link about Using the SQL Server Default Trace to Audit Events.

./M6

Embracing SQL in Postgres

On the flame ware between SQL vs. ORM, I prefer SQL, and here's some hits why: Embracing SQL in Postgres

./M6

PostgreSQL on Kubuntu

As I needed to install PostgreSQL on Kubuntu, I find these three tutorials particularly helpful:
I recommend reading them all before actually installing it. They overlap in some parts but do complement each other.

./M6

MySQL Partitioning

I was researching about MySQL performance for a new web project when I came across whit partitioning.

After reading Improving Database Performance with Partitioning and MySQL Partitioning, I thought "this is great, I'll use it", but after reading MySQL partitions tutorial, and since I'm using InnoDB, I though "maybe this is not such a good idea since storage may be a problem and the performance boost may not be that significant for this project".

In short, one has to perform some tests in order to decide.
./M6

Database Models Library

I've just found this library of database models. It is a big collection of database models useful for faster kick-offs.
It is hosted by Database Answers and there are far more useful information there. It's a great resource.

./M6

Execute Commands Inside DB2 Procedures

I was looking for a way to call DB2 runstats, a non-SQL command, from inside a store procedure.
It turns out that it is actually quite easy. All one has to do is to use the ADMIN_CMD procedure from the SYSPROC schema.

ADMIN_CMD is used by applications to run DB2 command line processor administrative commands using the SQL CALL statement.

Here's how to do it: ADMIN_CMD

./M6

Layer Intromission

I'm using JTOpen JDBC driver to access AS/400 via DB2.
It works pretty well, but unfortunately it tries to be more than it should be, a JDBC driver that allows a Java application to access a DB2 database.

It interacts with the AS/400 system in a way it should not. For instance, when it's time to change the password, the driver pops-up a notification window stating that it's time to change the password and asks the user if he wishes to do it now.
If this feature seems nice, let me tell you that it is totally wrong!
First, it is a JDBC driver, not an AS/400 system administration application.
Second, this kind of promiscuity among layers has disastrous results.

When one uses a JDBC driver one expects that it operates with the database and nothing else.
When JTOpen starts getting "smart" by interacting with the system, awkward things happen.
For instance, an entire critical system can fail because the driver hang on a "password will expire soon, do you wish to change it now" message and waits for user action instead of doing what it is suppose to do: database work.
Please not that this is not a "password expired" message but a "you must change your password within x days, do you wish to do it now" question.

Here is a real example of such problem: I executed a command line batch which was hold by the JTOpen driver "would you like to change your password now" question.

JTOpen "Would you like to change your password now" User Dialog Box Question.

I got lucky because the command was issued by me, but what if it was issued by a scheduler on a Saturday morning? It would only be noticed Monday morning and a critical job would not have been performed because the JDBC driver messed up.

./M6

Java by API examples

I was seeking information for the FilteredTree Jface object and I've found a great knowledge repository for Java, SWT, JFace EJB, and other technologies, like C#, C++, Python, SQL Server, and many more.

In the Java By API examples, everything is by example and it's hierarchically organized, which helps a lot when one's exploring Java packages, for instance.

You can take a look at it in http://www.java2s.com/.

./M6