Simulate a where clause on a “long” type column from SQLPlus

As a DBA you sometimes have to take time to look for tricks to accomplish tasks that seem simple at first glance. A few days ago, I was asked to identify tables that had sequences prefixed by the schema name as a default value in the columns. You may think: it’s an easy task, just filter on the “data_default” column of the “dba_tab_columns” view, but unfortunately it’s not that simple using SQLPlus. The “data_default” column is in “longdatatype, so you cannot include it directly in the “where” clause of a query.

Continue reading “Simulate a where clause on a “long” type column from SQLPlus”

Retrieve serial numbers and other useful information from Exadata

It’s been a while since my last post!
Today, I wanted to share with you some useful commands to extract information from Exadata (product name, serial numbers, …).
This can be helpful for the opening of an new SR for example, or for inventorying components in a CMDB.

Here is the list of interesting elements that can be extracted (the list is not exhaustive, but these are the ones I use most often):

Exadata product name
Exadata rack serial number
Compute nodes and cell nodes serial number
Compute nodes and cell nodes internal component’s serial number
Inifiniband switches serial number
Cisco switch serial number
PDU’s serial number

Continue reading “Retrieve serial numbers and other useful information from Exadata”