Nov 28 2011

replace comma with new line in editor

How to replace a bulk comman with new line in an Editor?

   We can easily do it in Winword. Use the replace tool to search for “,” and replace with “^l”

 

Nov 09 2011

rman backup at different directory

rman backup at different directory structure .then how can recover and restore datafile and logfile

Nov 09 2011

please reply me .

1. which dbms package we can use in mount mode..
2. how to exculde table during stats gather with dbms package

Nov 09 2011

Informatica Interview Questions and Answers

Q. What type of repositories can be created using Informatica Repository Manager?

A. Informatica PowerCenter includeds following type of repositories :

•Standalone Repository : A repository that functions individually and this is unrelated to any other repositories.
•Global Repository : This is a centralized repository in a domain. This repository can contain shared objects across the repositories in a domain. The objects are shared through global shortcuts.
•Local Repository : Local repository is within a domain and it’s not a global repository. Local repository can connect to a global repository using global shortcuts and can use objects in it’s shared folders.
•Versioned Repository : This can either be local or global repository but it allows version control for the repository. A versioned repository can store multiple copies, or versions of an object. This features allows to efficiently develop, test and deploy metadata in the production environment.
Q. What is a code page?

A. A code page contains encoding to specify characters in a set of one or more languages. The code page is selected based on source of the data. For example if source contains Japanese text then the code page should be selected to support Japanese text.

When a code page is chosen, the program or application for which the code page is set, refers to a specific set of data that describes the characters the application recognizes. This influences the way that application stores, receives, and sends character data.

Q. Which all databases PowerCenter Server on Windows can connect to?

A. PowerCenter Server on Windows can connect to following databases:

•IBM DB2
•Informix
•Microsoft Access
•Microsoft Excel
•Microsoft SQL Server
•Oracle
•Sybase
•Teradata
Q. Which all databases PowerCenter Server on UNIX can connect to?

A. PowerCenter Server on UNIX can connect to following databases:

•IBM DB2
•Informix
•Oracle
•Sybase
•Teradata

Informatica Mapping Designer
Q. How to execute PL/SQL script from Informatica mapping?

A. Stored Procedure (SP) transformation can be used to execute PL/SQL Scripts. In SP Transformation PL/SQL procedure name can be specified. Whenever the session is executed, the session will call the pl/sql procedure.

Q. How can you define a transformation? What are different types of transformations available in Informatica?

A. A transformation is a repository object that generates, modifies, or passes data. The Designer provides a set of transformations that perform specific functions. For example, an Aggregator transformation performs calculations on groups of data. Below are the various transformations available in Informatica:
•Aggregator
•Application Source Qualifier
•Custom
•Expression
•External Procedure
•Filter
•Input
•Joiner
•Lookup
•Normalizer
•Output
•Rank
•Router
•Sequence Generator
•Sorter
•Source Qualifier
•Stored Procedure
•Transaction Control
•Union
•Update Strategy
•XML Generator
•XML Parser
•XML Source Qualifier

Q. What is a source qualifier? What is meant by Query Override?

A. Source Qualifier represents the rows that the PowerCenter Server reads from a relational or flat file source when it runs a session. When a relational or a flat file source definition is added to a mapping, it is connected to a Source Qualifier transformation.

PowerCenter Server generates a query for each Source Qualifier Transformation whenever it runs the session. The default query is SELET statement containing all the source columns. Source Qualifier has capability to override this default query by changing the default settings of the transformation properties. The list of selected ports or the order they appear in the default query should not be changed in overridden query.

Q. What is aggregator transformation?

A. The Aggregator transformation allows performing aggregate calculations, such as averages and sums. Unlike Expression Transformation, the Aggregator transformation can only be used to perform calculations on groups. The Expression transformation permits calculations on a row-by-row basis only.

Aggregator Transformation contains group by ports that indicate how to group the data. While grouping the data, the aggregator transformation outputs the last row of each group unless otherwise specified in the transformation properties.

Various group by functions available in Informatica are : AVG, COUNT, FIRST, LAST, MAX, MEDIAN, MIN, PERCENTILE, STDDEV, SUM, VARIANCE.

Q. What is Incremental Aggregation?

A. Whenever a session is created for a mapping Aggregate Transformation, the session option for Incremental Aggregation can be enabled. When PowerCenter performs incremental aggregation, it passes new source data through the mapping and uses historical cache data to perform new aggregation calculations incrementally.

Q. How Union Transformation is used?

A. The union transformation is a multiple input group transformation that can be used to merge data from various sources (or pipelines). This transformation works just like UNION ALL statement in SQL, that is used to combine result set of two SELECT statements.

Q. Can two flat files be joined with Joiner Transformation?

A. Yes, joiner transformation can be used to join data from two flat file sources.

Q. What is a look up transformation?

A. This transformation is used to lookup data in a flat file or a relational table, view or synonym. It compares lookup transformation ports (input ports) to the source column values based on the lookup condition. Later returned values can be passed to other transformations.

Q. Can a lookup be done on Flat Files?

A. Yes.

Q. What is the difference between a connected look up and unconnected look up?

A. Connected lookup takes input values directly from other transformations in the pipleline.

Unconnected lookup doesn’t take inputs directly from any other transformation, but it can be used in any transformation (like expression) and can be invoked as a function using :LKP expression. So, an unconnected lookup can be called multiple times in a mapping.

Q. What is a mapplet?

A. A mapplet is a reusable object that is created using mapplet designer. The mapplet contains set of transformations and it allows us to reuse that transformation logic in multiple mappings.

Q. What does reusable transformation mean?

A. Reusable transformations can be used multiple times in a mapping. The reusable transformation is stored as a metadata separate from any other mapping that uses the transformation. Whenever any changes to a reusable transformation are made, all the mappings where the transformation is used will be invalidated.

Q. What is update strategy and what are the options for update strategy?

A. Informatica processes the source data row-by-row. By default every row is marked to be inserted in the target table. If the row has to be updated/inserted based on some logic Update Strategy transformation is used. The condition can be specified in Update Strategy to mark the processed row for update or insert.

Following options are available for update strategy :
•DD_INSERT : If this is used the Update Strategy flags the row for insertion. Equivalent numeric value of DD_INSERT is 0.
•DD_UPDATE : If this is used the Update Strategy flags the row for update. Equivalent numeric value of DD_UPDATE is 1.
•DD_DELETE : If this is used the Update Strategy flags the row for deletion. Equivalent numeric value of DD_DELETE is 2.
•DD_REJECT : If this is used the Update Strategy flags the row for rejection. Equivalent numeric value of DD_REJECT is 3.

Oct 29 2011

sample tnsnames.ora

Simple example/sample tnsnames.ora

TEST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = UNIX01)(PORT = 1521)) ) (CONNECT_DATA = (SID = TEST)) )

Oct 25 2011

Dos batch to send email with Attachment

Command syntax:

  • febootimail -ATTACH image.jpg
  • febootimail -ATTACH *.doc -ATTACH 20??-file.gif
  • febootimail -FILE document.doc -ATTACH "C:\my music\music.mp3"
  • febootimail -FILE "image.jpg | C:\my music\music.mp3 | data.txt"

-ATTACH or -FILE switch specifies which files will be added to message when sending email from command line. If attachment file path is not specified, attachments are taken from the folder in which Febootimail is executed.

Since Febooti Command line email version 3.0 it is possible to use file masks (e.g. “*.*” or “files*.jp?”) with -ATTACH (or -FILE) parameter thus cancelling the need for batch files.

Pay attention that if spaces are used either in file name or folder name, expression has to be put in quotes. If many files are sent, -ATTACH switch must be repeated before each file or separate filenames by using | (pipe).

 
C:\>febootimail -SERVER smtp.server.com -FROM jack@sender.com -TO john@recipients.com -ATTACH "c:\My Presentations\presentation.ppt | c:\terms\terms.txt" -TEXT DOS mailing out presentation and term files as attachments

Text files can be sent out either as plain message or as attachment. In the latter case text file formatting will not be interpreted arbitrary by email clients, so that it is useful to send text files as attachments if every byte has to be preserved as is.

 
C:\>febootimail *other mail parameters* -ATTACH plaintextfile.txt -TEXT "send e-mail from DOS with text file attachment"

If many files are to be sent as attachments with command line mail utility, it is most convenient to create batch file.

 
@echo off
rem send all files as attachments. one attach per email...

for %%i in (*.*) do Febootimail *other params* -ATTACH %%i

Note that (*.*) stands for file mask where (*.*) means that all files will be sent as attachments. If (*.doc) is used, all files with extension .doc will be sent. If (??-dec*.d?c) is specified, only files that have “-dec” in their names as 3rd to 6th characted and extension that starts with “d” and ends with “c” (with 2nd character being any) are to be sent.

Also, note that in example above every file is sent as separate email. If all files have to be attached to single email message, use the batch files from example given below.

 
@echo off
rem this is batch file - do.bat
rem will call batch file - send.bat

cmd /v /c send.bat

rem /v - delayed environment variable expansion
rem /c carries out the command specified by string
rem Call this file from Windows 2000 / XP / 2003 / Vista

 
@echo off
rem batch file - send.bat must be called from file do.bat

rem Gathering all files in current folder with mask specified...
dir *.doc /A-D /B > tmp

rem Expand environment variable attach as long as needed...
for /F "tokens=*" %%i in (tmp) do set attach=!attach! -ATTACH %%i

rem Send all files / attachments in single email...
febootimail <standard params excluding -ATTACH> %ATTACH%

rem Cleaning temporary file...
del tmp

 
Download febootimail from following Link.

http://www.febooti.com/products/command-line-email/online-help/commands/dos-e-mail-automate-attachment-sending.html

Oct 25 2011

OUI-10150:Error: A runtime exception occurred while setting s_dlgCfgNamingLabelSIDnull in component Oracle Database 11g 11.2.0.1.0


Problem : Add a Component to an Oracle 11g rel2 Home get the following error
INFO: *** Error Dialog: OUI-10150:Error: A runtime exception occurred while setting s_dlgCfgNamingLabelSIDnull in component Oracle Database 11g 11.2.0.1.0 

Solution:
With 11gR2, you are no longer allowed to run OUI from $ORACLE_HOME/oui/bin. If you do, you will receive this error:
INFO: *** Error Dialog: OUI-10150:Error: A runtime exception occurred while setting s_dlgCfgNamingLabelSIDnull in component Oracle Database 11g 11.2.0.1.0 .
Clearly, the error message is not descriptive at all. Oracle has created unpublished Bug 8330280 to give a warning message instead of this error. 

To avoid this error, always run OUI from the installation media and not from $ORACLE_HOME/oui/bin.

					
				
Sep 28 2011

RMAN Show Commands

The SHOW command is used to display the values of current RMAN configuration settings.

RMAN> show all;

Shows all parameters.

RMAN> show archivelog backup copies;

 Shows the number of archivelog backup copies.

RMAN> show archivelog deletion policy;

Shows the archivelog deletion policy.

RMAN> show auxname;

Shows the auxiliary database information.

RMAN> show backup optimization;

Shows whether optimization is on or off.

RMAN> show  auxiliary channel;

Shows how the normal channel and auxiliary hannel are configured.

RMAN> show controlfile autobackup;

Shows whether autobackup is on or off.

RMAN> show controlfile autobackup format;

Shows the format of the autobackup control file.

RMAN> show datafile backup copies;

Shows the number of datafile backup copies being ept.

RMAN> show default device type;

Shows the default type disk or tape.

RMAN> show encryption algorithm;

Shows the encryption algorithm currently in use.

RMAN> show encryption for database;

 Shows the encryption for the database.

RMAN> show encryption for tablespace;

 Shows the encryption for the tablespace.

RMAN> show exclude;

 Shows the tablespaces excluded from the backup.

RMAN> show maxsetsize;

 Shows the maximum size for backup sets. The default value is unlimited.

RMAN> show retention policy;

 Shows the policy for datafile and control file backups and copies that RMAN marks as obsolete.

RMAN> show snapshot controlfile name;

 Shows the snapshot control filename.

Note: You can see any nondefault RMAN configured settings in the V$RMAN_CONFIGURATION database view.

Aug 30 2011

AWR Report Missing Statistic Data – WARNING: Since the DB Time is less than one second

Problem description:

     In AWR report in 11g have found the following warning message in the Top and All Statistics Informations are missing
"WARNING: Since the DB Time is less than one second, there was minimal foreground activity in the snapshot period. Some of the percentage values will be invalid."
Root Cause:
	Historical Data and Statistics are not colleted and available in Statistical Tables.
Proposed Solution:
[oracle@ORA01 ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/db_1
[oracle@ORA01 ~]$ echo $ORACLE_SID
ORCL
[oracle@ORA01 ~]$ cd $ORACLE_HOME
[oracle@ORA01 db_1]$ cd rdbms
[oracle@ORA01 rdbms]$ cd admin
[oracle@ORA01 admin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/rdbms/admin
[oracle@ORA01 admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 29 20:51:52 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.1.0 - Production

SQL> show parameter control_management_pack_access

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_management_pack_access       string      NONE

SQL> alter system set control_management_pack_access="DIAGNOSTIC+TUNING" scope=both;

System altered.

SQL> show parameter control_management_pack_access

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_management_pack_access       string      DIAGNOSTIC+TUNING
SQL>
      Once the above propsed solution is applied wait for an hour because default time to generate next Data Collection is after 1 hour. If you have any specific data collection interval please check after next data collection. It will be fine.

Proposed Another Solution:
	I think this is a known problem, several mentions on metalink. You could try to drop your AWR with the catnoawr.sql script, then re-create it with catawr.sql but of course you would lose all the histotical data. Or possibly, following the hints in the metalink articles
Jul 20 2011

How to run multiple SQL files from a Dos batch

To run multiple SQLPlus queries as part of a DOS batch file place all the queries in a separate SQL file.

For Example

@C:\Queries\Query_1.sql

@C:\Queries\Query_2.sql

@C:\Queries\Query_3.sql

@C:\Queries\Query_4.sql

Save the file as runall.sql.

Then use this file in your batch file

@Echo Off

sqlplus [login details] @C:\queries\runall.sql

EXIT

Alibi3col theme by Themocracy