views:

76

answers:

2

I am trying to import into oracle using imp command and the output of the command is as below.

invincible:/home/invincible# imp

Import: Release 10.2.0.1.0 - Production on Thu Aug 12 22:19:00 2010

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Username: n_data
Password: 

IMP-00058: ORACLE error 1034 encountered
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
Linux Error: 13: Permission denied
IMP-00005: all allowable logon attempts failed
IMP-00000: Import terminated unsuccessfully
invincible:/home/invincible# 

user name and password are correct(I am able to connect using sqldeveloper). I have granted dba access to n_data. All the environment variables are set (I ran oracle_env.sh before running env ). So what might be the problem? I am running oracle on debian.

A: 

The error suggests it is trying to connect to an instance on the same host that isn't there. Generally I'd say the database isn't actually up and running, but if you can connect with SQL Developer, it suggests it is. But check you are on the correct machine.

Also try

echo :${ORACLE_SID}:

There may be some stray character in the SID. If you are using XE, you want to see :XE: (in upper case, not mixed or lower)

Have you tried

imp n_data/password@XE
Gary
+2  A: 

Check this blog post: ORA-27123: unable to attach to shared memory segment.

It describes same error as you have and problem was caused with incorrectly set permissions on oracle executable.

This is excerpt from the above blog post:

Here the oracle file permission has -rwxrwxr-x i.e. 775, but this file must have the permission -rwsr-s- -x i.e. 6751

Change the permissions for oracle file.

$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle
$ ls -l oracle
-rwsr-s--x 1 oracle dba 119582976 Feb 3 2008 oracle

After changing the permissions on oracle executable file, all the users are now able to connect to the database without any errors.

Read blog post for detailed information.

zendar
Another favourite is libclntsh having the wrong permissions. But, in the comments on the original post it says he can't run SQL*Plus as the oracle owner either, which is odd.
Alex Poole