26 November 2010

Step by Step Oracle Data Import Export

Oracle Data Import Export imp / exp on oracle is equivalent to restore and backup data. exp command to put the data from a remote database server to the local exported dmp file, imp command dmp files can be put into the distance from the local database server. This function can be build using the same two databases, one for testing, one for official use.

Execution Environment: SQLPLUS.EXE or in DOS (command line) in the implementation of
DOS can be implemented in oracle 8i because of the installation directory is set to ora81BIN global path,
EXP.EXE the directory has been used with the implementation of IMP.EXE document import and export.
oracle using java prepared, SQLPLUS.EXE, EXP.EXE, IMP.EXE have the two documents may have been the type of paper packaging.
SQLPLUS.EXE call EXP.EXE, IMP.EXE wrapped by the class to complete import and export functions.

Here is an example of import and export.
Data Export:
1 will be derived entirely TEST database, user name, system password manager Export to D: daochu.dmp Medium
exp system / manager @ TEST file = d: daochu.dmp full = y
2 will be system users database table and export sys user
exp system / manager @ TEST file = d: daochu.dmp owner = (system, sys)
3 will be in the database table inner_notify, notify_staff_relat Export
exp aichannel / aichannel @ TESTDB2 file = d: datanewsmgnt.dmp tables = (inner_notify, notify_staff_relat)

4 will be in the database field in the table1 table filed1 to "00" Export data from the beginning
exp system / manager @ TEST file = d: daochu.dmp tables = (table1) query = "where filed1 like'00% '"

Derived above are commonly used for compression, not only put dmp file with winzip compression can be very good.
In the above command can also be followed by compress = y to achieve.

Data import
1 will be D: daochu.dmp in the TEST data into the database.
imp system / manager @ TEST file = d: daochu.dmp
imp aichannel / aichannel @ HUST full = y file = d: datanewsmgnt.dmp ignore = y
Above problem may be a bit, because some form already exists, then it is error, not to import the table.
Behind with ignore = y on it.
2 d: daochu.dmp import table table1
imp system / manager @ TEST file = d: daochu.dmp tables = (table1)

Basically, the above import and export good enough for us. A number of cases is to first delete the complete table, and then import.

Note:
The operator must have enough permissions, it will prompt not enough permissions.
Can be connected to the database of. Tnsping TEST can be used to access the database can connect to the TEST.

Appendix 1:
Import data to the user to increase the operation of the first authority to start the sql * puls
Second, system / manager landed third, create user username IDENTIFIED BY password (if the user has been created, this step can be omitted)
Fourth, GRANT CREATE USER, DROP USER, ALTER USER, CREATE ANY VIEW,
DROP ANY VIEW, EXP_FULL_DATABASE, IMP_FULL_DATABASE,
DBA, CONNECT, RESOURCE, CREATE SESSION TO user name of the fifth, run-cmd-enter the dmp file directory,
imp userid = system / manager full = y file =*. dmp
Or imp userid = system / manager full = y file = filename.dmp

Implementation of examples:
F: WorkOracle_Databackup> imp userid = test / test full = y file = inner_notify.dmp

Screen display
Import: Release 8.1.7.0.0 - Production on Thursday, February 16 16:50:05 2006
(c) Copyright 2000 Oracle Corporation. All rights reserved.

Connect to: Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production

Derived from the conventional path by EXPORT: V08.01.07 documents have been created ZHS16GBK achieve ZHS16GBK NCHAR character set and character set import server uses UTF8 NCHAR Export Character Set (ncharset the possible conversion)
. AICHANNEL the object being imported into AICHANNEL
.. Is to import table "INNER_NOTIFY" 4 lines are ready to import the opening of constraints ...
Successful termination of import, but a warning.

Appendix Two:
Oracle does not allow direct changes in the owner table, using Export / Import can achieve this purpose.
First set up import9.par,
Then, use the following command: imp parfile = / filepath/import9.par
Example import9.par reads as follows:
FROMUSER = TGPMS
TOUSER = TGPMS2 (Note: the owner of the table FROMUSER replaced by TOUSER, FROMUSER and different users can TOUSER)
ROWS = Y
INDEXES = Y
GRANTS = Y
CONSTRAINTS = Y
BUFFER = 409600
file == / backup/ctgpc_20030623.dmp
log == / backup/import_20030623.log

25 November 2010

How to maintain my laptop battery Life

Laptops tend to lose their charm quickly when you’re constantly looking for the nearest power outlet to charge up.  How do you keep your battery going for as long as possible?  Here are 15 easy ways to do so.
1. Defrag regularly -  The faster your hard drive does its work – less demand you are going to put on the hard drive and your battery.  Make your hard drive as efficient as possible by defragging it regularly. (but not while it’s on battery of course!) Mac OSX is better built to handle fragmentation so it may not be very applicable for Apple systems.
2. Dim your screen – Most laptops come with the ability to dim your laptop screen.  Some even come with ways to modify CPU and cooling performance.  Cut them down to the lowest level you can tolerate to squeeze out some extra battery juice.
3. Cut down on programs running in the background.  Itunes, Desktop Search, etc.  All these add to the CPU load and cut down battery life.  Shut down everything that isn’t crucial when you’re on battery.
4. Cut down external devices – USB devices (including your mouse) & WiFi drain down your laptop battery.  Remove or shut them down when not in use.  It goes without saying that charging other devices (like your iPod) with your laptop when on battery is a surefire way of quickly wiping out the charge on your laptop battery.
5. Add more RAM - This will allow you to process more with the memory your laptop has, rather than relying on virtual memory.  Virtual memory results in hard drive use, and is much less power efficient. Note that adding more RAM will consume more energy, so this is most applicable if you do need to run memory intensive programs which actually require heavy usage of virtual memory.
6. Run off a hard drive rather than CD/DVD - As power consuming as hard drives are, CD and DVD drives are worse.  Even having one in the drive can be power consuming.  They spin, taking power, even when they?re not actively being used.  Wherever possible, try to run on virtual drives using programs like Alcohol 120% rather than optical ones.
7.  Keep the battery contacts clean:  Clean your battery’s metal contacts every couple of months with a cloth moistened with rubbing alcohol.  This keeps the transfer of power from your battery more efficient.
8. Take care of your battery – Exercise the Battery.  Do not leave a charged battery dormant for long periods of time.  Once charged, you should at least use the battery at least once every two to three weeks. Also, do not let a Li-On battery completely discharge. (Discharing is only for older batteries with memory effects)
9. Hibernate not standby – Although placing a laptop in standby mode saves some power and you can instantly resume where you left off, it doesn’t save anywhere as much power as the hibernate function does.  Hibernating a PC will actually save your PC’s state as it is, and completely shut itself down.
10. Keep operating temperature down - Your laptop operates more efficiently when it’s cooler.  Clean out your air vents with a cloth or keyboard cleaner, or refer to some extra tips by
11. Set up and optimize your power options – Go to ‘Power Options’ in your windows control panel and set it up so that power usage is optimized (Select the ‘max battery’ for maximum effect).
12. Don’t multitask – Do one thing at a time when you’re on battery.  Rather than working on a spreadsheet, letting your email client run in the background and listening to your latest set of MP3′s, set your mind to one thing only.  If you don’t you’ll only drain out your batteries before anything gets completed!
13. Go easy on the PC demands – The more you demand from your PC.  Passive activities like email and word processing consume much less power than gaming or playing a DVD.  If you’ve got a single battery charge – pick your priorities wisely.
14. Get yourself a more efficient laptop -  Laptops are getting more and more efficient in nature to the point where some manufacturers are talking about all day long batteries.  Picking up a newer more efficient laptop to replace an aging one is usually a quick fix.
15. Prevent the Memory Effect - If you’re using a very old laptop, you’ll want to prevent the ‘memory effect’ – Keep the battery healthy by fully charging and then fully discharging it at least once every two to three weeks. Exceptions to the rule are Li-Ion batteries (which most laptops have) which do not suffer from the memory effect.

Bonus Tip #1: Turn off the autosave function.  MS-Word’s and Excel’s autosave functions are great but because they keep saving regular intervals, they work your hard driver harder than it may have to. If you plan to do this, you may want to turn it back on as the battery runs low. While it saves battery life in the beginning, you will want to make sure your work is saved when your battery dies.
Bonus Tip #2: Lower the graphics use. You can do this by changing the screen resolution and shutting off fancy graphic drivers. Graphics cards (video cards) use as much or more power today as hard disks – Thanks Andrew
Update 7/7/07: Bonus Tip #1 to give caution about turning off autosave, tip #8 to change information about discharging batteries – thanks to all who pointed it out. Added Bonus tip #2, Tip #1 to add in clause in regards to Mac OSX, Tip #1 about the spinning of hard drives – thanks to all who pointed it out

18 November 2010

APP-FND-01542: This Applications Server is not authorized to access this database

APP-FND-01542

Error Message
APP-FND-01542 : This Application Server is not authorized to access this system. Please contact your System Administrator.




Solution:
1. Backup context file .
2. Update the context variable:
s_appserverid_authentication

By default in 11.5.10, this is set to SECURE.
In previous 11i versions, this was set to OFF.
For debug purposes, you can use ON or OFF.

Modes:
- ON : Partial
- SECURE : activates full server security (SECURE mode)
- OFF : deactivates server security

3. Run Autoconfig to instantiate the change.

Gkn.OnDemand.Library.LibraryException: Import job failed Import job failed while opening UPK tool

Import job failed while opening UPK tool [ID 734329.1]

In this Document
  Symptoms
  Cause
  Solution



Applies to:

Oracle User Productivity Kit - Version: 3.0 to 3.5
This problem can occur on any platform.

Symptoms

After an single or multi user UPK Installation, while trying to open the UPK tool the following error occurs.

Import Job failed
Gkn.OnDemand.Library.LibraryException: Import job failed at
Gkn.OnDemand.Library.LibraryLoader.importJob_JobProgress(Object
sender, JobProgressEventArgs e) in
E:\BUILDROOT\Builds\Branches\Exton\tfs\Core_DotNet\LibraryComponent\LibraryLoader\LibraryLoader.cs:line 606

Cause

The error happens if there is a previous version of UPK already existing and installation of another version of UPK is done without clearing all required files from client.

Solution

Refer following steps to ensure proper uninstallation of previous version of UPK
 1. Uninstall the previous version of UPK from window client machine using Add/Remove Programs. 
 2. Navigate to the folder where the developer was installed and delete any remaining file/folders
    (C:\Program Files\User Productivity Kit\UPK Developer 31Single User)
 3. Delete this folder: C:\Documents and Settings\{your name}\Local Settings\Application Data\UPDev2   (multiuser installation client ) /SUPDev2 (single user installation).
 4. Now reinstall the new version of UPK which you have downloaded from http://edelivery.oracle.com.

ORA-20100: Error: FND_FILE FAILURE unable to create file in the directory,/usr/tmp.

ORA-20100: Error: FND_FILE FAILURE unable to create file in the directory,/usr/tmp.

Concurrent requests are failed with the below error:

ORA-20100: Error: FND_FILE failure. Unable to create file, o0040178.tmp in thedirectory, /usr/tmp.
You will find more information in the request log.
ORA-06512: at "APPS.FND_FILE", line 417
ORA-06512: at "APPS.FND_FILE", line 456
ORA-06512: at line 1

Upon checking below settings there is no issue :

1. The $APPLTMP, $APPLPTMP variables and UTL_FILE_DIR database parameter are valid and pointing to directory where there is enough space and users have written permission.
2. FND_FILE.PUT_LINE is able to create new files in the temporary directory.

FND_FILE.PUT_LINE Checking method:

SQL> exec FND_FILE.PUT_LINE(FND_FILE.LOG, 'THIS IS A TEST');

This should dump a file on APPLPTMP. If this test works, it would indicate that FND_FILE is ok and the problem is possibly with the Application.

You may want to leave only one entry on utl_file_dir for this test.

finally I checked the utl_file_dir, but there is no entry like /usr/tmp path in that list
SQL> connect / as sysdbaSQL> show parameter UTL_FILE_DIR

just I added /usr/tmp for the UTL_FILE_DIR & restarted the applications & database.

now the issue is resolved & concurrent requests are working fine

13 November 2010

What is FNDLOAD and how to use it?


What is FNDLOAD and how to use it?
FNDLOAD
when we are working in oracle application development/implementation project? The equally important AOL data Migration takes place necessary to synchronize the data across databases instance during installation and upgarde.
Using FNDLOAD can download data from an application entity into an editable text file, which can be uploaded to another database.The Conversion between database format and text file format is specified by a configuration file.
What can be Done?
·It can be done following list
· Concurrent Programs, Executables
· Request Groups, Request Sets
· Profile Options
· Key and Descriptive Flexfields
· Menus and Responsibilities
· Forms and Form Functions
· Attachments
· Messages
· Value Sets and Values
· Lookup Types
· User Responsibilities
· Printer Definitions
· FND Dictionary
· Help Configuration
· Document Sequences
· Concurrent Manager Schedules
Advantages when using FNDLOAD
1. Because downloaded data is stored in a text file, version administration is possible
2. No learning curve. this is relief for developer/dbas
3. Fully supported and recommended by Oracle
4. Capture the migrations in a file and use it during installations(log file).
5. Pin-point when something happened and where (database) easily
6. AOL data migration process is now simplified
!
Disadvantages
1. Applications patching mechanisms use FNDLOAD heavily possibility of negative impact is not zero
2. No validation against migrating database/instance sensitive data
The Syntax
To use FNDLOAD, the following syntax is needed.

FNDLOAD apps/appspwd 0 Y mode configfile datafile entity [parameter1.....]
· The mode is either DOWNLOAD or UPLOAD.
· The configfile is the file that Fndload needs to download on upload data.
· T he data file is the output file, in which the downloaded data is written
· The entity is the entity you want to download,
·
Example of download:
FNDLOADapps/pwd 0 Y DOWNLOAD ${FND_TOP}/patch/115/import/afcpprog.lct myfile.ldt \ PROGRAM CONCURRENT_PROGRAM_NAME= concurrent_program_short_name> APPLICATION_SHORT_NAME=
application_short_name
Example of Upload
FNDLOAD apps/pwd 0 Y UPLOAD ${FND_TOP}/patch/115/import/afcpprog.lct myfile.ldt – CUSTOM_MODE=FORCE undocumented parameter
Where is Config File Located

· Configuration files with extension .lct
o On Unix – all the configuration files are in $FND_TOP/patch/115/import directory
o On Unix Oracle also places the original configuration files in $FND_TOP/admin/import directory
·Data files with extension .ldt
· The configfiles (.lct) are delivered and maintained by Oracle
· It has entity definitions, parent-child relationships and user input parameters identified by :NAME
oDownloading a parent automatically downloads all children – (Example) Concurrent Program download
Sample Script Code for these Objects :
1 – Printer Styles
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afcppstl.lct file_name.ldt STYLE PRINTER_STYLE_NAME=printer style name
2 – Lookups
FNDLOAD apps/apps@seed115 O Y DOWN
LOAD $FND_TOP/patch/115/import/aflvmlu.lct file_name.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME=prod LOOKUP_TYPE=lookup name
3 – Descriptive Flexfield with all of specific Contexts
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt DESC_FLEX P_LEVEL=?COL_ALL:REF_ALL:CTX_ONE:SEG_ALL? APPLICATION_SHORT_NAME=prod DESCRIPTIVE_FLEXFIELD_NAME=desc flex name P_CONTEXT_CODE=context name
4 – Key Flexfield Structures
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/pa
tch/115/import/afffload.lct file_name.ldt KEY_FLEX P_LEVEL=?COL_ALL:FQL_ALL:SQL_ALL:STR_ONE:WFP_ALL:SHA_ALL:CVR_ALL:SEG_ALL? APPLICATION_SHORT_NAME=prod ID_FLEX_CODE=key flex code P_STRUCTURE_CODE=structure name
5 – Concurrent Programs
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt PROGRAM APPLICATION_SHORT_NAME=prod CONCURRENT_PROGRAM_NAME=concurrent name
6 – Value Sets
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_
name.ldt VALUE_SET FLEX_VALUE_SET_NAME=value set name
7 – Value Sets with values
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET_VALUE FLEX_VALUE_SET_NAME=value set name

08 November 2010

error while loading shared libraries: libmodapi.so: cannot open shared object file: No such file or directory

I have stated the APEX i am getting below error
Error:-
[oracle@samtest bin]$ ./opmn startall
./opmn: error while loading shared libraries: libmodapi.so: cannot open shared object file: No such file or directory
[oracle@samtest bin]$

Solution:-
please export below env

[oracle@samtest bin]$ export ORACLE_HOME=/backup/SOABPEL/product/10.1.3.1/OracleAS_1/
[oracle@samtest bin]$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/opmn/lib
[oracle@samtest bin]$ export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin


[oracle@samtest bin]$ ./opmnctl startall
opmnctl: starting opmn and all managed processes...
[oracle@samtest bin]$./opmnctl status

Processes in Instance: SOABPEL.samtest.acecranes.com
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group          | OC4J:oc4j_soa      |    9697 | Alive
OC4JGroup:default_group          | OC4J:home          |    9698 | Alive
ASG                                           | ASG                |     N/A | Down
HTTP_Server                             | HTTP_Server        |    9696 | Alive
[oracle@samtest bin]