Ramin Hossaini (blog)

14Mar/10

Backing up an Oracle database without RMAN

If you aren’t using RMAN for your backups (and are using something like Netapp’s snapshots, or the simple copy-command) (in Oracle 9i this can only be done when the Database is in mounted-mode, not opened), you can do this:

Note: Archivelog must be enabled for this to work.

ALTER DATABASE BEGIN BACKUP;

At this point, you can begin copying/taking snapshots. When you’re done:

ALTER DATABASE END BACKUP;

In older databases, you’ll have to use (run for every tablespace):

ALTER TABLESPACE tablespace_name BEGIN BACKUP;
ALTER TABLESPACE tablespace_name END BACKUP;
Tagged as: , No Comments
9Mar/10

Enabling Trace

The TRACE_ENABLED parameter allows you to trace the execution history of Oracle. It should be set to TRUE by default.

The information gathered is stored in the following locations:

#User:
/usr/oracle/admin/sid/udump
#Background:
/usr/oracle/admin/sid/bdump
#Core:
/usr/oracle/admin/sid/cdump

These locations could be different depending on what’s set in your PFILE.

Check if trace is enabled:

SHOW parameter trace_enabled;

Sample output:

SQL> show parameter trace_enabled;
 
NAME                      TYPE      VALUE
------------------------- --------  --------------
trace_enabled             BOOLEAN   TRUE

And if it isn’t enabled, enable it using:

ALTER SYSTEM SET trace_enabled = TRUE;

Note: Prior to version Oracle 9i, this parameter was: _trace_enabled

Tagged as: , No Comments
8Mar/10

Starting, stopping, and Status of Oracle Enterprise Manager (EM)

To start the Oracle Enterprise Manager Database Control (from the command-line):

emctl start dbconsole

To get the status:

emctl status dbconsole

To stop the dbconsole

emctl stop dbconsole

To access the EM (with default settings):

http://hostname:5500/em
Tagged as: , , No Comments
9Dec/09

Create bevelled text

I might be superfluous in my method here, but it works well for me :)

Add some text

Capture00_

4Nov/09

Search through files for a string (Linux)

To search a directory recursively for specific text or a string, use:

find . -exec grep "string to find" '{}' \; -print
Tagged as: 1 Comment
24Oct/09

Synchronize Google Calendar on iPhone

Note: This should also work on the iPod Touch

iPhone OS 3.0 introduced support for CalDAV and ICS - that means it's really simple to sync with your Google Calendar:

Start by going into Settings:

IMG_0009

Go into "Mail, Contacts, Calendars", then "Add account..."

IMG_0010

Add a CalDAV account and fill the details:

IMG_0013

If you check your calendar, it should sync

IMG_0016

You can also add all your other calendars by adding a "Subscribed Calendar"

Start by going to the settings for the calendar you want to add:

gcalendar

Click on the "ICAL" link to get your Calendar's private address

gcalendar2

It's usually a really long link, so start by putting it under your drafts or email it to yourself. Add another Calendar account (not a CalDAV this time, but a "subscribed Calendar" Then copy-and-paste into the Server input box specifying URL to the .ics file)

IMG_0014

6Oct/09

Creating a tunnel and SOCKS proxy with Putty

Why?

  • Secure a public WiFi connection
  • Bypass country-specific-content websites (e.g sites that only allow users from the U.S)
  • Connect to a remotely-secured MySQL database via localhost

It's pretty easy to do in Linux (and I think the command is pretty much the same in MacOS or with cygwin installed):

ssh -L localport:hostname:remoteport username@Server

This is how to do it with Putty

Open Putty and enter in the basics: the Server and port (22):

putty1

Next, create the tunnel. Enter the source port (in this example, it's 3306 - a MySQL port) and leave the destination field empty (not always left blank, but it works for most cases)

putty2

The tunnel will be open/active as soon as you've logged in. Obviously, you still have to set up your proxy settings in whatever application you're using (for those who don't know, 127.0.0.1 is 'localhost'):

proxy

Page 3 of 612345Last »
Bear