Doug's Oracle Blog

Entries tagged as Unix/Shell

  • Home
  • Papers
  • Books
  • C.V.
  • Fun
  • Oracle Blog
  • Personal Blog

Entries tagged as Unix/Shell

Related tags

Mar 18: Paste

[As part of the occasional series on small but useful Unix commands ...]

I've always loved Unix and vi and despair at those who prefer to faff around on Windows trying to edit files with an operating system and editors that, yes, are much more friendly but are hopelessly limited. The advent of Google (and yes, I'm more than aware of previous search engines) has added to the Unix/vi combination when I desperately need to solve a text processing problem in a hurry. I'm no awk expert!

Last Friday was one of those desperate moments. I was in the midst of an environment refresh and was rolling the test database forward using the Production control file. Each time I got a new copy of the control file to roll forward a bit more (because we use the control file as the RMAN repository), I wanted to rename the 170+ datafiles that make up the database. I had an ordered list of test and production files and their respective paths, but in two seperate files. All I wanted was to mingle the lines from each file into one file, with the two filenames on a single line.

I won't go into the details and I definitely won't get into extended dialogues about alternative solutions and why they didn't apply here*. This is a simple blog about the Unix paste command, which came to my rescue. (That link is to the very first Google result - no research or careful review.)

* No doubt those conversations will crop up, but I'm in course slide hell at the moment so don't expect much response from me.
Posted by Doug Burns Comments: (8) Trackbacks: (0)
Defined tags for this entry: Unix/Shell

Oct 28: Script

Well, as the which blog was deemed useful (although most commentors did already know about it), how about the script Unix command?

It's very useful for keeping a record of an extended series of actions, like those a DBA will often encounter when implementing a complex change. It's also useful for attaching a complex working example to a Service Request to illustrate a problem. (That was the example that cropped up the other day that prompted this blog.)
Posted by Doug Burns Comments: (5) Trackbacks: (0)
Defined tags for this entry: Unix/Shell

Oct 25: Which?

No, I don't mean the UK consumer organisation, but a simple *nix command. It's so simple that I've hesitated about blogging about it, but when I keep sharing a small snippet of information and people don't know it and find it useful, it's probably worth mentioning here.

If you work on Unix servers, you'll be familiar with long $PATH settings. Sometimes it's difficult to tell which particular version of a command you're using when there are versions scattered around in various locations, some in the PATH and some not. If you want to check which copy of a command you're running, just use the which command. For example, in this PATH (which is pretty short compared to the PATHs on the servers at work)

[oracle@ISP4400 ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:
/u01/app/oracle/product/11.1.0/db_1/bin


if I type in

[oracle@ISP4400 ~]$ java


where is the executable running from? Well, I can check with the which command

[oracle@ISP4400 ~]$ which java
/usr/bin/java

I apologise to those for whom this is completely obvious, but there are clearly people out there who don't know this command and I find it useful regularly.
Posted by Doug Burns Comments: (19) Trackbacks: (0)
Defined tags for this entry: Unix/Shell
« previous page   (Page 1 of 1, totaling 3 entries)   next page »

Statistics on Partitioned Tables

Contents

Part 1 - Default options - GLOBAL AND PARTITION
Part 2 - Estimated Global Stats
Part 3 - Stats Aggregation Problems I
Part 4 - Stats Aggregation Problems II
Part 5 - Minimal Stats Aggregation
Part 6a - COPY_TABLE_STATS - Intro
Part 6b - COPY_TABLE_STATS - Mistakes
Part 6c - COPY_TABLE_STATS - Bugs and Patches
Part 6d - COPY_TABLE_STATS - A Light-bulb Moment
Part 6e - COPY_TABLE_STATS - Bug 10268597

Comments

Doug Burns about 10053 Trace Files - Different Plan in Different Environments
Tue, 02.04.2013 08:57
You're welcome. Now I just nee d to pull my finger out and ac tually come up [...]
Howard Rogers about 10053 Trace Files - Different Plan in Different Environments
Mon, 01.04.2013 23:08
Makes a big difference, so tha nks for that! With two brow ser windows, o [...]
stelioscharalambides.com about 10053 Trace Files
Sat, 30.03.2013 16:28

Upcoming Presentations

Bookmark

Open All | Close All

Syndicate This Blog

  • XML RSS 2.0 feed
  • ATOM/XML ATOM 1.0 feed
  • XML RSS 2.0 Comments
  • Feedburner Feed

Powered by

Serendipity PHP Weblog

Show tagged entries

xml 11g
xml ACE
xml adaptive thresholds
xml ASH
xml Audit Vault
xml AWR
xml Blogging
xml conferences
xml Cuddly Toys
xml Database Refresh
xml DBMS_STATS
xml Direct Path Reads
xml Fun
xml grid control
xml hotsos 2010
xml listener
xml Locking
xml oow
xml oow2009
xml optimiser
xml OTN
xml Parallel
xml Partitions
xml Patching
xml swingbench
xml The Reality Gap
xml time matters
xml ukoug
xml ukoug2009
xml Unix/Shell
xml Useful Links

Disclaimer

For the avoidance of any doubt, all views expressed here are my own and not those of past or current employers, clients, friends, Oracle Corporation, my Mum or, indeed, Flatcat. If you want to sue someone, I suggest you pick on Tigger, but I hope you have a good lawyer. Frankly, I doubt any of the former agree with my views or would want to be associated with them in any way.

Design by Andreas Viklund | Conversion to s9y by Carl