Archive

Archive for February, 2009

Oracle RMAN – Restore from any Disk Location

February 24th, 2009 sam No comments

Oracle RMAN – Restore from any Disk Location

RMAN looks for the backupfiles to restore within its catalog and therefore there is no RESTORE DATABASE FROM <Disk-Location> command. You can circumvent this constraint using the RMAN command CATALOG START WITH <Disk-Location>. The following example shows how to restore an Oracle database from any disk location.

ora_rman_catalog_start_with.gif

1. Copy the Backup Set Files to any Disk Location

cp <backupset> /tmp/backup

2. Mount the Database

sqlplus / as sysdba
startup mount;

3. Cleanup RMAN Catalog

rman target /

crosscheck backup;
delete noprompt expired backup of database;
delete noprompt expired backup of controlfile;
delete noprompt expired backup of archivelog all;
list backup;

At this point no backup should be available !

4. Make new Backup Location visible to RMAN Catalog

catalog start with ‘/tmp/backup’;

searching for all files that match the pattern
/tmp/backup

List of Files Unknown to the Database
=====================================
File Name: /tmp/backup/PROD_datafile_14_1.bak
File Name: /tmp/backup/PROD_controlfile_17.bak
File Name: /tmp/backup/PROD_archivelog_16_1.bak
File Name: /tmp/backup/PROD_datafile_15_1.bak

Do you really want to catalog the above files
(enter YES or NO)?
yes

List of Cataloged Files
=======================
File Name: /tmp/backup/PROD_datafile_14_1.bak
File Name: /tmp/backup/PROD_controlfile_17.bak
File Name: /tmp/backup/PROD_archivelog_16_1.bak
File Name: /tmp/backup/PROD_datafile_15_1.bak

list backup;

At this point the backup must be available !

5. Restore and Recover the Database

restore database;
recover database;
alter database open;

Categories: Uncategorized Tags:

Logical Standby Creation

February 20th, 2009 sam No comments

Create a Physical Standby
1. Perform a hot backup of the primary database.
This can be done in several ways depending on what your current
configuration is and where the logical standby database will be placed.
2. Turn this backup of the primary database into a physical standby following
a. Restore the backup to the target area if necessary.
b. Create the standby control file and the standby initialization parameter file
c. Define the standby parameters.
i. FAL_SERVER and FAL_CLIENT
ii. STANDBY_ARCHIVE_DEST
d. Enable redo shipping from the primary database to this new physical standby.
e. Start the Managed Recover Process to start bringing this database up to date.
Once the physical standby is up to date you can continue with the next step.
Prepare for the Logical Standby
From this point you begin to incur downtime of the Primary database.
1. Shutdown the Primary database.
a. SHUTDOWN IMMEDIATE
b. Make sure that the physical standby has applied all of the redo sent to it following the shutdown.
c. Defer any further redo shipping to this physical standby.
i. ALTER SYSTEM SET
LOG_ARCHIVE_DEST_STATE_3=DEFER;
1. Or whatever destination number you used.
2. Startup the production database in the restricted mode and build the dictionary.
a. Start the primary database in the mounted mode.
i. STARTUP MOUNT
b. Create a backup control file.
i. ALTER DATABASE BACKUP CONTROLFILE to ‘<file specification>;
c. Restrict access to the primary database
i. ALTER SYSTEM ENABLE RESTRICTED ESSION;
d. Open the database.
i. ALTER DATABASE OPEN;
e. Ensure that Supplemental logging is enabled and switch logs.
Note – If you have other Physical standbys already created you
need to perform this step on those physical standbys as well in
preparation for future switchovers.
i. ALTER DATABASE ADD SUPPLEMENTAL LOG
DATA (PRIMARY KEY, UNIQUE INDEX)
COLUMNS;
ii. ALTER SYSTEM ARCHIVE LOG CURRENT;
Street Proven Techniques for Deploying Data Guard SQL Apply Page 13
f. Record the checkpoint_change# number from v$database.
i. SELECT checkpoint_change# FROM
V$DATABASE;
g. Execute the dictionary build procedure
i. EXECUTE DBMS_LOGSTDBY.BUILD;
h. Switch log files again.
i. ALTER SYSTEM ARCHIVE LOG CURRENT;
i. Obtain archive logs necessary to start the logical standby.
i. SELECT NAME FROM V$ARCHIVED_LOG
WHERE FIRST_CHANGE# <
(SLECT MAX(*NEXT_CHANGE#*)
FROM V$ARCHIVED_LOG
WHERE DICTIONARY_END = ‘YES’ AND
STANDBY_DEST= ‘NO’)
AND NEXT_CHANGE# >
(SELECT MAX(*FIRST_CHANGE#*)
FROM V$ARCHIVED_LOG
WHERE DICTIONARY_BEGIN = ‘YES’ AND
STANDBY_DEST= ‘NO’) ;
3. At this point you can open the database for general use.
a. ALTER SYSTEM DISABLE RESTRICTED SESSION;
Once these steps are complete the Primary is back up and running.
Finish creating the Logical standby
Primary database has been down only for the amount of time it took to
perform the previous 3 steps. From this point on the rest of the steps are
performed on the new logical standby while production is up.
1. Shutdown the physical standby
a. SHUTDOWN IMMEDIATE
2. Copy over all required files from the Primary database to the future
Logical standby.
a. Copy the archive logs identified in the previous section, which
were created on the primary database from the time you restarted
the database to the point the dictionary build command
completed. You should copy the logs containing the dictionary
build as well as the archive log just prior to the dictionary build.
Put them in the directory where the original incoming archive
logs were placed.
i. For example: “/oracle/standby/arch/”
b. Copy the backup control file.
i. If you use a different name for the backup control file
you will have to fix the initialization parameter file to
reflect this change.
3. Finish up the processing on the soon to be logical standby
Street Proven Techniques for Deploying Data Guard SQL Apply Page 14
a. Using the newly created backup control file, mount the database.
i. STARTUP MOUNT;
b. Rename all of the data files and online redo log files to reflect
their current filename. For example, for each data file and log file:
i. ALTER DATABASE RENAME FILE ‘/primary/arch/system.dbf’
TO ‘/standby/arch/system.dbf’;
c. Perform a point in time recovery to the checkpoint change
number obtained in the previous steps.
i. ALTER DATABASE RECOVER AUTOMATIC FROM ‘/oracle/standby/arch/’
UNTIL CHANGE <checkpoint_change#>
USING BACKUP CONTROLFILE;
d. Turn on the Logical standby guard
i. ALTER DATABASE GUARD ALL;
e. Open the standby database the first time.
i. ALTER DATABASE OPEN RESETLOGS;
f. Shut the database down and run the nid utility to change the
database name and id.
i. SHUTDOWN IMMEDIATE;
ii. STARTUP MOUNT;
iii. nid TARGET=sys/password DBNAME=<new name>
iv. SHUTDOWN IMMEDIATE
v. Create the new password file and correct the init.ora file
with the new DBNAME.
vi. Mount the Logical standby and open reset logs.
1. STARTUP MOUNT;
2. ALTER DATABASE OPEN RESETLOGS;
g. Add the temporary files.
i. ALTER TABLESPACE <temp name> ADD TEMPFILE <filespec> SIZE nn;
h. Register the archive logs you copied over in the previous steps.
For each log file do the following:
i. ALTER DATABASE REGISTER LOGICAL
LOGFILE <filespec>;
i. Start Logical standby apply.
i. ALTER DATABASE START LOGICAL STANDBY
APPLY INITIAL <checkpoint_change#>;
4. Re-enable the redo shipping from the primary to this logical standby.
a. ALTER SYSTEM SET
log_archive_dest_state_3=enable;

Categories: Apps DBA, DBA Tags:

APP-FND-01630: Cannot open file D:\oracle\prodcomn\temp\OF4981.tmp

February 15th, 2009 sam No comments

My Friend call me and told me he is getting following errors when he runs the report.

Cause: The program terminated, returning status code 3.
Action: Check your installation manual for the meaning of this code on this operating system.
APP-FND-01630: Cannot open file D:\oracle\prodcomn\temp\OF4981.tmp for reading
Cause: USDINS encountered an error when attempting to open file D:\oracle\prodcomn\temp\OF4981.tmp for reading.
Action: Verify that the filename is correct and that the environment variables controlling that filename are correct.
Action: If the file is opened in read mode, check that the file exists. Check that you have privileges to read the file in the file directory. Contact your system administrator to obtain read privileges.
Action: If the file is opened in write or append mode, check that you have privileges to create and write files in the file directory. Contact your system administrator to obtain create and write privileges.
Concurrent Manager encountered an error while running Oracle*Report for your concurrent request 440550.
Review your concurrent request log and/or report output file for more detailed information.

I had searched the metalink and i got the solution for this

To implement the solution, please execute the following steps:

1. Rename the temp directory.

2. Create new temp directory.

3. Run cmclean.sql

Note 134007.1 CMCLEAN.SQL Non Destructive Script to Clean Concurrent Manager Tables

4. Bounce the applications services.

Categories: Uncategorized Tags:

Sending an e-mail via Telnet

February 12th, 2009 sam No comments

Sending an e-mail via Telnet


In this document, we:

  • shall use Telnet to connect to the SMTP server.
  • shall give commands to the server, then type our e-mail, and finally tell the server, ‘Okay, the e-mail is done. Send it.
  • can then send more mails, or disconnect from the server.

The steps are quite similar to what you do when you send an e-mail from – for instance – Outlook Express. We are going to use the SMTP server of monitortools.com with the ID ‘webmaster’.



Step 1

Connect to the Internet in case you are a dial-up user. Open an MS-DOS prompt, and enter this command:

    C:\WINDOWS>telnet mail.monitortools.com 25

This will open a Telnet window, and within a short time, you will be connected to the SMTP server, and the server says:

    220 PROTAGONISTNT Mailmax version 4. 8. 3. 0 ESMTP Mail Server Ready

This varies, but you should definitely see the ’220′ part. It is an indication that the server is ready to service your request.



Step 2

Now the server expects you to identify yourself. If you are a dial-up user, you can enter the name of your computer (the one Windows asks you when you intall Windows) or anything else you want. If you have a domain-name, then you should enter the domain-name here. My computer’s name is dell01, so I say:

    helo dell01

Note that it is ‘helo’ and not ‘hello’. The commands are not case-sensitive, so you can also say HeLo or HELO or hELo. The server replies:

    250 HELO 217.120.215.201, How can I help you?

This is like a shake-hand. You tell the server your name, and it says its name! Computers are quite friendly, you see!



Step 3

Next give the server your e-mail address. Note that most SMTP servers require that your e-mail address belong to the same domain as the server. For example, if you send mail from Yahoo! SMTP server, you should have a Yahoo! address. You cannot use it if you give it a Hotmail address. Let me give the SMTP server some e-mail address:

    mail from: webmaster@monitortools.com

‘mail from:’ is a SMTP command. Note that there is a space between ‘mail’ and ‘from’, followed by a colon (:). The server says:

    250 Ok


Step 4

Tell the server who you want to send the e-mail to. Let me send a mail to info@activexperts:

    rcpt to: info@activexperts.com

There are no restrictions here. You can enter any e-mail address. If there is some problem with the recipient-address, your mail will bounce, but for now, the server doesn’t complain. It will say:

    250 Ok


Step 5

You have told the server your e-mail address, and the recipient’s e-mail address, so now you can go ahead and type the e-mail. You have to do that with the data command:

    data

The server asks you to go ahead with your e-mail:

    354 End data with .

Don’t worry with the thing. It’ll be explained later.



Step 6

Now type in your e-mail, like this:

    This is a test e-mail.
    Remember to type it all right. Backspace key doesn't work in Windows
    Telnet, though it does in Linux. If you make a mistake, try pressing
    CTRL-h. If it works, well and good.
    .

When you finish your e-mail, press [ENTER], then a ‘.’, and again an [ENTER]. This tells the server that you have finished the e-mail, and it can send it. It will say:

    250 Ok: queued as 6AB5150038

Your mail was sent!



Step 7

Now you can either send another mail, or disconnect from the server. If you want to send another mail, you should repeat the ‘rcpt to:’ and ‘data’ commands. There is no need for ‘helo’ and ‘mail from:’, because the server already knows who you are. If you want to disconnect, just say ‘quit’:

    quit

The server will reply:

    221 Bye
Categories: Uncategorized Tags:

Online Convert Any format to PDF

February 9th, 2009 sam No comments

Convert commonly used files (Microsoft Office, Open Office, graphic images, vector graphic and other formats) to PDF. This interactive PDF converter and document creator is quick and reliable. Try it for yourself.

Example: you need to convert a Power Point (PPT) file into PDF. Use the “Browse” button to locate the source file on your local PC, select it and click the “Convert” button. Done!

http://www.freepdfconvert.com/

Categories: Uncategorized Tags:

Shortcut Bar for Windows sTabLauncher

February 4th, 2009 sam No comments

This tool helps finding and launching your favorite programs,web pages, folders, or any type of files in a fast and easyway. Taking up fewer resources as possible, and allowing you to personalize the appearance in many ways, by changing colors, images, transparency, animations, and many other options to make it blend in with your desktop.

You can download from this site http://stablauncher.com/

Categories: Uncategorized Tags:

Good Tool for copying files

February 4th, 2009 sam No comments

While browsing i had find a good tool to copy the files in windows

The follow are the features of tere copy

TeraCopy is a compact program designed to copy and move files at the maximum possible speed, providing the user a lot of features:

  • Copy files faster. TeraCopy uses dynamically adjusted buffers to reduce seek times. Asynchronous copy speeds up file transfer between two physical hard drives.
  • Pause and resume file transfers. Pause copy process at any time to free up system resources and continue with a single click.
  • Error recovery. In case of copy error, TeraCopy will try several times and in the worse case just skips the file, not terminating the entire transfer.
  • Interactive file list. TeraCopy shows failed file transfers and lets you fix the problem and recopy only problem files.
  • Shell integration. TeraCopy can completely replace Explorer copy and move functions, allowing you work with files as usual.
  • Full Unicode support.

http://www.codesector.com/download.php

Categories: Uncategorized Tags: