Blogs
Killing my Oracle sessions
Submitted by jp_vijaykumar on Sat, 2009-11-14 20:23Many a time, developers ask for procedures to kill there own sessions in the oracle db.
Many of our developers are scattered around the globe in different time zones.
During on-call rotation, developers will be calling me, round the clock, to kill their sessions.
To resolve this issue, I came up with this package, consisting of a pipelined function
and a procedure. The pipelined function, displays the users' sessions in the db.
The procedure kills the developer's session only.
- jp_vijaykumar's blog
- Login to post comments
- Read more
11g Dataguard Password file copying
Submitted by nojmathew on Fri, 2009-10-23 23:36By using rdist command, one can copy Oracle's password file from primary site to physical standby site. Even if the SYS password is same on both the servers, you must copy the password file from primary to standby.
Step 1
install rsh-server package on both the servers.
Step 2
#vi /etc/xinetd.d/rlogin
disable=no
Step 3
#service xinetd restart
Step 4
$cd $ORACLE_HOME/dbs
$rdist -c orapwcoretest oracle@
---Succeffull message----
Moving multiple tables and indexes between tablespaces at once
Submitted by David Lozano Lucas on Fri, 2009-10-23 05:30
Here I present a simple query to use when we want to move the tables and indexes of several users at once.
To make it one by one:
ALTER TABLE xxxxxx MOVE TABLESPACE TEST; ALTER INDEX xxxxxx REBUILD TABLESPACE TEST;
To move data from multiple owners.
Oracle10g Regular Expression
Submitted by Sarvindu on Tue, 2009-10-20 04:55Oracle10g Regular Expression
Oracle database 10g added a new feature "Regular Expression" enhancement that can be used with SQL and PL/SQL statements.
There are four regular expression functions :-
REGEXP_LIKE
REGEXP_SUBSTR
REGEXP_INSTR
REGEXP_REPLACE
The functions REGEXP_SUBSTR, REGEXP_INSTR and REGEXP_REPLACE basically extend the functionality of other well known string functions SUBSTR, INSTR and REPLACE.
REGEXP_LIKE is basically an operator that is similar to existing LIKE operator.
The above regular expression functions are very efficient and powerful.
A regular ex
Blog site testing.
Submitted by mjshank on Mon, 2009-10-19 19:05Just testing things a bit. Sorry if you got spammed with this bog entry. I am posting at both OraFAQ and Oracle forums to try out the two interfaces for blog entries. Also trying blogspot.com and Google Sites.
If you have tried out the blogging and have a preference for one vs another, please let me know.
- mjshank's blog
- Login to post comments
Saluting. Start - Stop script
Submitted by David Lozano Lucas on Tue, 2009-10-13 08:06
It is an English word that sounds very funny in Spanish, almost unreal.
Well, just wanted to brand the blog with a first entry to introduce myself.
I work as an Oracle and SQL Server DBA (mixed profile, they call it -
concerns twice for the same pay, on me).
Here I will write "how to" articles as they emerge in my day to day.
If you can read Spanish, check out the blog I maintain for a little more time http://blog.davidlozanolucas.com/.
Here is a script to start/stop Oracle databases running in Unix:
[code]
# =======================================================================
- David Lozano Lucas's blog
- Login to post comments
- Read more
Foreordain my Transaction to Fail
Submitted by Kevin Meade on Fri, 2009-10-02 10:59
I saw one of those really interesting pieces of code recently. A guy wanted to run his transaction and make it fail when it was all done. Normally one would put ROLLBACK at the end of the transaction in order to undo a transaction's work. But this guy did not want to do that. He wanted to keep his transaction code unchanged, commit at the end and everything. He had several reasons for this, among them being that he did not have access to all the code he was working with and thus could not put the ROLLBACK where it was needed, and indeed suspected (as we eventually found to be true), that somewhere in the code stream there was a commit being done without his permission thus splitting his transaction in ways he did not intend. So he wanted a way to FOREORDAIN (determine ahead of time) that his transaction would fail no matter even if it went to conclusion without error. For this he came up with a I think a clever hack. Seems to me this might have some use, if I can figure out what that use might be. So here is the cool solution.
import done in US7ASCII character set and AL16UTF16 NCHAR character setSegmentation Fault (coredump)
Submitted by rajabaskar on Wed, 2009-09-30 19:25
Last week I migrated some schemas from 11g database (11.1.0.6) to 9i database (9.2.0.8).
I used to export the 11g schemas using oracle 9i binary & exported successfully.
While importing 11g schema’s into 9i database I faced below issues.
Error: import done in US7ASCII character set and AL16UTF16 NCHAR character setSegmentation Fault (coredump)
Operating system: Sun Solaris 10 / 64 bit processor
Note:
I exported the 11g schema’s using 10g binary and imported into 10g database
successfully.
- rajabaskar's blog
- Login to post comments
- Read more
Creating and Unpacking Delimited Strings in SQL
Submitted by Kevin Meade on Wed, 2009-09-30 11:38
Recently a friend asked me for this. I see it a lot on OraFaq as a question in the forums so here are the basics of working with delimited strings. I will show the various common methods for creating them and for unpacking them. Its not like I invented this stuff so I will also post some links for additional reading.
- Kevin Meade's blog
- Login to post comments
- Read more
A Layman's Understanding of Star Schemas.
Submitted by Kevin Meade on Sat, 2009-09-26 22:34
Star Schemas are proliferating with warehouses these days. Many practitioners I have met in this space are a bit new to the concept of star schemas and as such keep falling back to old habits. But this is only hurting them. So I'll try to give my simplistic view of how it works in the hopes of granting some clarity on the practice of Star Modeling and overcoming our previous training to resist its concepts.

