Posts Tagged ‘Oracle’

FRM-92102 : A Network Error Has Occured

September 19th, 2017, posted in Oracle
Share

FRM-92102 is Gerneric Error maybe occur for more than one reasons :

1-Network 
2-Proxy
3-http
4-Session Time 


But today i will discuss the problem On oracle Application server 10g .
Description for the problem like the following when you try to connect on your deploy application On OAS 10g it’s gives the above error from 1-5 minutes.

I will give you more than one solution maybe it will be related to the above problem and you try them separately to see which one will be valid for you : 

1-Netowrk Parameters :

You will find it $ORACLE_HOME/forms/server/default.env
Just increase the value .

2-do the following change in opmn.xml (under $ORACLE_HOME/opmn/conf/):

 

 

3-SET Inbound_connection_timeout In sqlnet.ora to ZERO .

Sqlnet.Inbound_connection_timeout = 0

Note : if your can’t find this parameter in the SQLNET.ORA you cant add it .

5- Change the following $ORACLE_HOME/opmn/conf/opmn.xml

 


Hope this will work 

Share

To find the ROW Counts of tables that belongs to a Particular Schema

September 12th, 2017, posted in Oracle
Share
select table_name,num_rows counter from dba_tables where owner=’Schema_name’ order by table_name;
Share

Find A String In Database

July 1st, 2017, posted in Oracle
Share

I’ve tried using this statement below to find an appropriate column based on what I think it should be named but it returned no results :

SELECT * from dba_objects WHERE
object_name like '%DTN%'

A column isn't an object. If you mean that you expect the column name to be like '%DTN%', the query you want is:

SELECT owner, table_name, column_name FROM all_tab_columns WHERE column_name LIKE '%DTN%';
Share

Unix for DBA

May 24th, 2017, posted in Solaris
Share

Below are some of the basic unix commands which will be useful for Oracle DBA.

How to kill all similar processes with single command (in this case opmn)

ps -ef | grep opmn |grep -v grep | awk ‘{print $2}’ |xargs -i kill -9 {}

Locating Files under a particular directory

find . -print |grep -i test.sql

Using AWK in UNIX

To remove a specific column of output from a UNIX command – for example to determine the UNIX process Ids for all Oracle processes on server (second column)

ps -ef |grep -i oracle |awk ‘{ print $2 }’

Changing the standard prompt for Oracle Users

Edit the .profile for the oracle user

PS1=”`hostname`*$ORACLE_SID:$PWD>”

Display top 10 CPU consumers using the ps command

/usr/ucb/ps auxgw | head -11

Show number of active Oracle dedicated connection users for a particular ORACLE_SID

ps -ef | grep $ORACLE_SID|grep -v grep|grep -v ora_|wc -l

Display the number of CPU’s in Solaris

psrinfo -v | grep “Status of processor”|wc -l

Display the number of CPU’s in AIX

lsdev -C | grep Process|wc -l

Display RAM Memory size on Solaris

prtconf |grep -i mem

Display RAM memory size on AIX

First determine name of memory device

lsdev -C |grep mem

then assuming the name of the memory device is ‘mem0’

lsattr -El mem0

Swap space allocation and usage

Solaris : swap -s or swap -l

Aix : lsps -a

Total number of semaphores held by all instances on server

ipcs -as | awk ‘{sum += $9} END {print sum}’

View allocated RAM memory segments

ipcs -pmb

Manually deallocate shared memeory segments

ipcrm -m ‘<ID>’

Show mount points for a disk in AIX

lspv -l hdisk13

Display amount of occupied space (in KB) for a file or collection of files in a directory or sub-directory

du -ks * | sort -n| tail

Display total file space in a directory

du -ks .

Cleanup any unwanted trace files more than seven days old

find . *.trc -mtime +7 -exec rm {} \;

Locate Oracle files that contain certain strings

find . -print | xargs grep rollback

Locate recently created UNIX files (in the past one day)

find . -mtime -1 -print

Finding large files on the server (more than 100MB in size)

find . -size +102400 -print

Crontab :

To submit a task every Tuesday (day 2) at 2:45PM

45 14 2 * * /opt/oracle/scripts/tr_listener.sh > /dev/null 2>&1

To submit a task to run every 15 minutes on weekdays (days 1-5)

15,30,45 * 1-5 * * /opt/oracle/scripts/tr_listener.sh > /dev/null 2>&1

To submit a task to run every hour at 15 minutes past the hour on weekends (days 6 and 0)

15 * 0,6 * * opt/oracle/scripts/tr_listener.sh > /dev/null 2>&1

Share

How To Upload Excel/Text File Data Into Oracle Table Using TOAD

February 27th, 2017, posted in Oracle
Share

n this we will explain how to put Excel or text file data into an Oracle table. You can do this easily in SQL Server with a Copy (Ctrl+C) of the data from Excel then open the target table into edit mode and Paste (Ctrl+V). Done.

But this will not work in Oracle.

In an Oracle database you can do it using the import command. I will show you each and every step with snapshots.

Step 1 : Open TOAD.

Step 2 : Write the following query to create a test table:

  1. Create table TESTTABLE
  2. (
  3. NAME varchar2(20),
  4. Address varchar2(100),
  5. RollNo integer
  6. )

Step 3 : Now my table is ready. It’s time to create the data in an Excel file.

Step 4 : Go to Database -> Import -> Table Data.

Step 5 : Select the table you want to import the Excel data to.

Step 6 : Click on show data. Now execute the data button to enable the use. Click on that.

Step 7 : After clicking on Execute Wizard the following screen will open:

Next ->

Step 8 : Now, browse to your Excel file – > Next ->

Next ->

Step 9 : Choose the sheet and click on AutoMap. The AutoMap button will automatically bind your Excel sheet column data with the Oracle table column.

Next ->

Next ->

Here your Excel data has been bound with the table columns. Next ->

Step 10 : Click on Execute to finish the process. It may ask for sheet selection. Click on Okay with the desired sheet.

Here is your uploaded data:

Step 11 : Commit the Task by clicking on the commit button.

Using the preceding procedure you can easily import Excel data. You can also import text flat files data. All steps are nearly the same. The only change is the following step. In this import I need to choose the separator for the flat file. Apart from any separators you can use fixed width. In the attached example I used a comma separator.

I think the procedure is very clear with snapshots. If you have found any mistake in concept, please do comment.

Your comments will make me perfect in the future.

Thanks for reading.

 

Share