Unix permission problem for external table in oracle 10g, sun solaris

Hello All,
I'm facing a problem in accessing external table which has stumped me a bit.
What I'm looking for is to use a external table with restricted permission to Others(770) on unix.
Would appreciate if someone helps me out here.
Here are the steps:
1.create directory ext_tab_dir1 as '/home/ravi/test'
2.grant read,write on directory ext_tab_dir1 to scott
3.CREATE TABLE scott.emp_load1(employee_number CHAR(5))
ORGANIZATION EXTERNAL (
type oracle_loader
default directory ext_tab_dir1
access parameters (
records delimited by newline
fields terminated by ' '
optionally enclosed by '"'
missing field values are null
location ('info.dat')
Now I have added unix user oracle to unix group myDbGroup and provided myDbGroup read/write/exec permission on directory /home/ravi/test.
info.dat has been placed in /home/ravi/test.
#pwd
/home/ravi
#ls -l
drwxrwx--- 2 ravi myDbGroup 512 Mar 7 17:35 test
I have manually logged in as user oracle and successfully created a sample file in /home/ravi/test.
-rwxrwx--- 1 ravi myDbGroup 13 Mar 7 17:33 info.dat
-rw-r--r-- 1 oracle oinstall 0 Mar 7 18:05 sampleFile
I then connect to the db using sqlplus as ravi and do a
#select * from scott.emp_load1
I get the following error
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file emp_load1_18567.log
OS error Permission denied
ORA-06512: at "SYS.ORACLE_LOADER", line 19
After this, I gave full permission to /home/ravi/test
drwxrwxrwx 2 ravi myDbGroup 512 Mar 7 17:35 test
#select * from scott.emp_load1
And this was successful.
It created a log file in /home/ravi/test
-rwxrwx--- 1 ravi myDbGroup 13 Mar 7 17:33 info.dat
-rw-r--r-- 1 oracle oinstall 0 Mar 7 18:05 sampleFile
-rw-r--r-- 1 oracle oinstall 0 Mar 7 18:05 emp_load1_18567.log
Now what stumped me is the owner and group owner of the file emp_load1_18567.log.
It is same as the sampleFile which I created manually!!
From this it can be deducted oracle is not using user id oracle while reading/writing to the unix directory but somehow assigning user id oracle as owner to the log file at the end.
If someone has encountered this problem earlier or has some info about this...pls share.
Regards,
Ravinandan

Thanks for the reply.
I have earlier checked this with NOLOGFILE option.
But no luck.
I would like to add one more detail(which I missed earlier) about the problem.
If I give 750 access to /home/ravi(That is read/exec to Group and none perm to Others),
I will get the same error(KUP-04063: unable to open log file emp_load1_18567.log).
This obviously means oracle is not even able to access the directory(Although unix user oracle has access via the group perms).

Similar Messages

  • How to overwrite a log and bad file in external table in oracle 10g

    Hi,
    I have used external table in oracle 10g.whenever use select query in external table orace internally create one log file in specified directory,
    but this log file is growing.How can i overwrite the log file(old to replace with new).I need overwrite a log and bad file in external table.
    kindly give the solutions.
    By
    Siva

    I don't believe that is possible with the LOGFILE clause, but it may be with the BADFILE clause. Here is an excerpt from the documentation :
    The LOGFILE clause names the file that contains messages generated by the external tables utility while it was accessing data in the datafile. If a log file already exists by the same name, the access driver reopens that log file and appends new log information to the end. This is different from bad files and discard files, which overwrite any existing file. NOLOGFILE is used to prevent creation of a log file.
    If you specify LOGFILE, you must specify a filename or you will receive an error.
    If neither LOGFILE nor NOLOGFILE is specified, the default is to create a log file. The name of the file will be the table name followed by _%p and it will have an extension of .log.

  • External table in Oracle 10g and Windows server 2003 problem

    I'm having a problem accessing an external table in an Oracle 10g and Windows 2003 server environment. The disk is remote (mapped) to the server. It's the usual access errors, kup-04001 or kup-04063.
    I have the [seemingly] exact same setup in an Oracle 9i and Windows 2000 server environment which works perfectly. Services run as local SYSTEM and SYSTEM has full permissions on the disk. Directories exist and so do the permissions to the directories.
    In the Oracle 10g and Windows 2003 environment, services run as local SYSTEM and SYSTEM has full permissions on the mapped disk. Directories exist and so do the permissions to the directories.
    This obviously effects mappings, deployments, etc.
    Does anyone know if something changed in either the db or the os?
    Thank you,
    Michael

    Thank you for your reply.
    Your proposal is the standard solution. As a matter of fact, that's how it is on my "old" system. Server "A" Oracle services are started by SYSTEM. Server "B" Oracle services are started by SYSTEM and is where the flat files reside. SYSTEM has full permissions on a disk local to Server "B". Database directoriies defined on Server "A" point to Server "B" remote disk. External Tables on Server "A" are defined with directories that point to Server "B" remote (mapped) disk. I have no problems with this configuration.
    I'm having a problem acheiving the same configuration with Oracle 10g and Windows 2003. I guess I'm baffled over the fact it isn't working the same way as my "old" environment. Why shouldn't it? Oracle (and you) want me to start services as a specific user. It shouldn't have to be that way unless something changed in the way the database makes calls to the os or if Microsoft slipped something in with one of it's numerous security patches.

  • Create a External Table in Oracle 10g:== ERROR: KUP-01005

    Hello.
    I have a problem working with external tables, hope someone can help me with this problem. Thanks.
    This is the code of the external table
    ========================
    CREATE TABLE SIAFI.RNP_IDS
    NUMERO_ID VARCHAR2(30 BYTE),
    PRIMER_NOMBRE VARCHAR2(300 BYTE),
    SEGUNDO_NOMBRE VARCHAR2(300 BYTE),
    APELLIDO_PATERNO VARCHAR2(300 BYTE),
    APELLIDO_MATERNO VARCHAR2(300 BYTE),
    DEPARTAMENTO VARCHAR2(300 BYTE),
    CORRELATIVO VARCHAR2(300 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY SEG_DIRECTORIO
    ACCESS PARAMETERS
    ( records delimited by NEWLINE
    badfile SEG_DIRECTORIO:'censo.bad'
    logfile SEG_DIRECTORIO:'censo.log'
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM
    REJECT ROWS WITH ALL NULL FIELDS
    (NUMERO_ID VARCHAR(30) NULLIF NUMERO_ID=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    PRIMER_NOMBRE VARCHAR(300) NULLIF PRIMER_NOMBRE=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    SEGUNDO_NOMBRE VARCHAR(300) NULLIF SEGUNDO_NOMBRE=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    APELLIDO_PATERNO VARCHAR(300) NULLIF APELLIDO_PATERNO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    APELLIDO_MATERNO VARCHAR(300) NULLIF APELLIDO_MATERNO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    DEPARTAMENTO VARCHAR(300) NULLIF DEPARTAMENTO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    CORRELATIVO VARCHAR(300) NULLIF CORRELATIVO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    LOCATION (SEG_DIRECTORIO:'censo.txt')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    When executing the stament select from RNP_IDS* it returns the following error message:
    ===========================================================
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "terminated": expecting one of: "and, comma, defaultif, not, nullif, or, )"
    KUP-01007: at line 6 column 56
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    ORA-06512: at line 1
    This is the example of the file I'm using:
    ==========================
    "0","DOUGLAS","AUGUSTO","ABBOTT","","1","3672097"
    "0101190600010","MARIA","URBANA","GOMEZ","URBINA","2","1949122"
    "0101190600076","ENRIQUETA","","GARCIA","","2","1162025"
    "0101190800106","LUCILA","","FLORES","","2","1658013"

    Hi
    Here we go...
    I reduced the 300 length of varcahr t o30 for testing purpose...
    SQL> CREATE TABLE RNP_IDS
    2 (
    3 NUMERO_ID VARCHAR2(30),
    4 PRIMER_NOMBRE VARCHAR2(30),
    5 SEGUNDO_NOMBRE VARCHAR2(30),
    6 APELLIDO_PATERNO VARCHAR2(30),
    7 APELLIDO_MATERNO VARCHAR2(30),
    8 DEPARTAMENTO VARCHAR2(30),
    9 CORRELATIVO VARCHAR2(30)
    10 )
    11 ORGANIZATION EXTERNAL
    12 ( TYPE ORACLE_LOADER
    13 DEFAULT DIRECTORY LOG
    14 ACCESS PARAMETERS
    15 ( records delimited by NEWLINE
    16 badfile LOG:'censo.bad'
    17 logfile LOg:'censo.log'
    18 FIELDS TERMINATED BY ','
    19 OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM
    20 REJECT ROWS WITH ALL NULL FIELDS
    21 (
    22 NUMERO_ID ,
    23 PRIMER_NOMBRE ,
    24 SEGUNDO_NOMBRE ,
    25 APELLIDO_PATERNO,
    26 APELLIDO_MATERNO ,
    27 DEPARTAMENTO,
    28 CORRELATIVO
    29 )
    30 )
    31 LOCATION ('sample1.txt')
    32 )
    33 REJECT LIMIT UNLIMITED
    34 NOPARALLEL
    35 NOMONITORING;
    Table created.
    SQL> desc rnp_ids
    Name Null? Type
    NUMERO_ID VARCHAR2(30)
    PRIMER_NOMBRE VARCHAR2(30)
    SEGUNDO_NOMBRE VARCHAR2(30)
    APELLIDO_PATERNO VARCHAR2(30)
    APELLIDO_MATERNO VARCHAR2(30)
    DEPARTAMENTO VARCHAR2(30)
    CORRELATIVO VARCHAR2(30)
    SQL> select numero_id from rnp_ids;
    NUMERO_ID
    0
    0101190600010
    0101190600076
    0101190800106
    - Pavan Kumar N

  • External table in Oracle 10g and Windows server 2003

    I'm having a problem accessing an external table in an Oracle 10g and Windows 2003 server environment. The disk is remote (mapped) to the server. It's the usual access errors, kup-04001 or kup-04063.
    I have the [seemingly] exact same setup in an Oracle 9i and Windows 2000 server environment which works perfectly. Services run as local SYSTEM and SYSTEM has full permissions on the disk. Directories exist and so do the permissions to the directories.
    In the Oracle 10g and Windows 2003 environment, services run as local SYSTEM and SYSTEM has full permissions on the mapped disk. Directories exist and so do the permissions to the directories.
    Does anyone know if something changed in either the db or the os?
    Thank you,
    Michael

    Version 9.2.04.
    Server "A" Oracle services are started by SYSTEM. Server "B" Oracle services are started by SYSTEM and is where the flat files reside. SYSTEM has full permissions on a disk local to Server "B". Database directoriies defined on Server "A" point to Server "B" remote disk. External Tables on Server "A" are defined with directories that point to Server "B" remote (mapped) disk. I have no problems with this configuration.
    I'm having a problem acheiving the same configuration with Oracle 10g and Windows 2003. I guess I'm baffled over the fact it isn't working the same way as my "old" environment. Why shouldn't it? Oracle (and you) want me to start services as a specific user. It shouldn't have to be that way unless something changed in the way the database makes calls to the os or if Microsoft slipped something in with one of it's numerous security patches.

  • Transform columns in row for a table in Oracle 10g

    Hi,
    I am using Oracle 10g.
    There is a table (example) EMPLOYEE, with following structure
    IDUSER YEAR1 YEAR2 YEAR3
    12345 value1 value2 value3
    99999 value7 value6 value5
    and I need display :
    IDUSER YEAR
    12345 value1
    12345 value2
    12345 value3
    99999 value7
    99999 value6
    99999 value5
    How can I do this with without unpivot?
    Thanks

    Hi,
    Welcome to the forum!
    One way to unpivot in any version of Orace is to cross-join your table with another table (or resut set, in ths case) that has as many rows as you need toroduce from each row of your original table.
    Here's an example:
    WITH     cntr     AS
         SELECT     LEVEL     AS n
         FROM     dual
         CONNECT BY     LEVEL <= 3
    SELECT     e.iduser
    ,     CASE  c.n
             WHEN  1  THEN  year1
             WHEN  2  THEN  year2
             WHEN  3  THEN  year3
         END     AS uear
    FROM         cntr      c
    CROSS JOIN  employee  e
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}
    Edited by: Frank Kulash on Apr 11, 2013 6:47 AM

  • Urgently require a Programmer for TOP Dubai Co. (Oracle on Sun Solaris)

    Need a good integration programer, experienced on Oracle Database, and Sun Solaris operating system. Budget is Dhs 8,000 per month Negotiable, depending on the experience. ( For a leading Dubai Company) - Revert back with detailed CV NOW........
    Appointment in a week.
    Location - Dubai UAE
    Sadsack
    00 91 98 60 225 225
    [email protected]

    Maybe there should be a category like "job offers" in this forum?
    As a side note: maybe add some more details next time, such as: which version of Oracle products, which kind of operating system skills (I read programmer as developer, not as administrator), etc.
    C.

  • Problem with External Table using ORACLE_INTERNAL TYPE in 9i release 2

    Hi,
    I have tried to create an external table in oracle 9i release 2 using the following qurey:
    CREATE TABLE emp_ext
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_INTERNAL
    DEFAULT DIRECTORY admin_dat_dir
    LOCATION(admin_dat_dir:'emp1.dmp')
    PARALLEL
    AS
    SELECT * from employees;
    and getting the following error message
    ORA-30657: operation not supported on external organized table
    Please help me.
    Thanks in Advance

    As a matter of fact oracle 9i has two types of api for external tables one is oracle_loader and the other is oracle_internal which in 10g become oracle_datapump.
    What my question is how can I use the other type in case of external table as we are doing in 10g? Do I need to run any script to enable this feature or is there any privillege issue?
    I've given the read, write privillege to the user and the oracle user has read/write permission in os level on the location of the directory.

  • How to use remote directory for external table

    Hi Folks,
    I have 2 Oracle 11GR2 64 bit database installed on Win 2008 server as prod1 and prod2.
    I have one directory created on prod1 server as EXT_TAB_DIR using the path as D:\OrsDWtest_dir .
    I want to use this directory in Prod2 server and use external table using this remote directory.
    I am able to access the Prod1 directory from Prod2 machine and also i have created Network map drive as Z drive pointing to that prod1 D:\OrsDWtest_dir directory. Also i checked read and Write permissions are there . I am able to create the external table but when i try to fetch the data i m getting below error ..
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file IOMM_20121213_060736.csv in EXT_TAB_DIR not found
    now my doubt is this possible ? Can we use remote directory for External table ? or is there is there any alternative way to achieve same ?
    Thanks & Regards,
    Vikash Jain(DBA)

    could you confirm the name and the existence of this file "IOMM_20121213_060736.csv" ?
    same error like:
    http://www.oracle-base.com/articles/9i/external-tables-9i.php
    if the load files have not been saved in the appropriate directory the following result will be displayed.
    SQL> SELECT *
      2  FROM   countries_ext
      3  ORDER BY country_name;
    SELECT *
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1Edited by: Fran on 10-ene-2013 23:32

  • Why do we really use External tables in Oracle?

    I looking why do we exactly use external tables in oracle and if you can help me please give me a scenario also.

    Before External tables (long ago in a galaxy far, far away) we would have had to load the text file into the database, most likely using SQL Loader before we could 'read it'.
    External tables allow us to define the text file in the Create table syntax and read that file over and over via SQL from the databse - In summary, I can access that text file (in parallel = fast) without loading it into my database, I just saved a step in my integration. I can also swap the file for a new file (same definition) and auto-magically access by new content.
    Here is a good link with a scenario for you :
    External Tables: An Introduction – All Things Oracle
    Of course with ODI - the complexity of SQL Loader control files is hidden, we just define the text file, use the LKM File to SQL and load it in, but where is the fun in that?
    Best check with your Solution Architect about what the best practises are for this in your organization.
    Rgrds
    Alastair

  • How to register External table into Oracle APPS?

    hi
    can we register the External table in Oracle apps like SQL Loader?
    So if yes, please share the steps.
    Thx

    781261 wrote:
    okk..
    But i mean , we create Executable with Method type SQL Loader, to register in Oracle APPS.
    SO like what would be Executable Method for External Table?
    or can we call the External table in Procedure?
    ThanxI don't know oracle APPS (and this isn't the APPS forum), but an external table is just like another table. It's created once and then used by queries to fetch data. You would reference it in your applications just the same as you would any other table.

  • How to create view for xmltype table in oracle

    hi:
    Can some one help me how to create view for xmltype table in oracle?
    XMLType do not have column
    Sem

    Thank you !!
    I read it and become very hard to implement what I want to do.
    Can you give me example please?
    My main goal to create view for xmltype table is to XQuery the XML data?
    Do you have any other suggestion?
    Please help
    Ali_2

  • SSMA for migrating table from oracle to Sql server

    Hi All,
    I wanted to replicate oracle huge table to sql server and i am using SSMA.its helpful and fast but can we replicate the table to different name using SSMA.for example i have a table TEST and i wanted to replicate it to SQL_TEST.Can it be possible
    using SSMA.
    Kindly help me out 

    Hi All,
    I wanted to replicate oracle huge table to sql server and i am using SSMA.its helpful and fast but can we replicate the table to different name using SSMA.for example i have a table TEST and i wanted to replicate it to SQL_TEST.Can it be possible
    using SSMA.
    Kindly help me out 
    Hello,
    Same question has  already been asked by you in below thead. Why you created duplicate thread ?  please avoid this practice or your thread will be marked ass Spam
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/abcdfb1b-c617-453f-828d-c8e4ec266c78/ssma-for-migrating-table-from-oracle-to-sql-server?forum=sqlintegrationservices
    Moderators plz merge this thread.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • OWB Mapping involving Oracle External Table to  Oracle Target Table.

    Hi All,
    I created a mapping which involves External Table as source & oracle table as target.
    Following were steps followed.
    1> Created Directory & External Table on oracle server
    2> Attached Text file with ',' delimiter to the External Table.
    3> Imported the External Table in source module.
    4> Created mapping which involves External Table as Source & Oracle Table as Target.
    5> Validated & Generated Mapping in OWB.
    6> Deployed the mapping in Deployment Manager.
    7> Executed the mapping in Deployment Manager.
    Execution Results: Completed with errors.
    No error message is displayed, I am wondering where can I get more information about the error message?
    Thanks in Advance.
    Regards,
    Vidyanand

    Hi,
    Look in the logfile <your runtime owner>.log.* under the directory <owb home>/owb/log
    thanks

  • Retrieve data from a large table from ORACLE 10g

    I am working with a Microsoft Visual Studio Project that requires to retrieve data from a large table from Oracle 10g database and export the data into the hard drive.
    The problem here is that I am not able to connect to the database directly because of license issue but I can use a third party API to retrieve data from the database. This API has sufficient previllege/license permission on to the database to perform retrieval of data. So, I am not able to use DTS/SSIS or other tool to import data from the database directly connecting to it.
    Here my approach is...first retrieve the data using the API into a .net DataTable and then dump the records from it into the hard drive in a specific format (might be in Excel file/ another SQL server database).
    When I try to retrieve the data from a large table having over 13 lacs records (3-4 GB) in a data table using the visual studio project, I get an Out of memory exception.
    But is there any better way to retrieve the records chunk by chunk and do the export without loosing the state of the data in the table?
    Any help on this problem will be highly appriciated.
    Thanks in advance...
    -Jahedur Rahman
    Edited by: Jahedur on May 16, 2010 11:42 PM

    Girish...Thanks for your reply...But I am sorry for the confusions. Let me explain that...
    1."export the data into another media into the hard drive."
    What does it mean by this line i.e. another media into hard drive???
    ANS: Sorry...I just want to write the data in a file or in a table in SQL server database.
    2."I am not able to connect to the database directly because of license issue"
    huh?? I never heard this question that a user is not able to connect the db because of license. What error / message you are getting?
    ANS: My company uses a 3rd party application that uses ORACLE 10g. And my compnay is licensed to use the 3rd party application (APP+Database is a package) and did not purchased ORACLE license to use directly. So I will not connect to the database directly.
    3.I am not sure which API is you are talking about, but i am running an application of the visual studio data grid or similar kind of controls; in which i can select (select query) as many rows as i needed; no issue.
    ANS: This API is provided by the 3rd party application vendor. I can pass a query to it and it returns a datatable.
    4."better way to retrieve the records chunk by chunk and do the export without loosing the state of the data in the table?"
    ANS: As I get a system error (out of memory) when I select all rows in a datatable at a time, I wanted to retrieve the data in multiple phases.
    E.g: 1 to 20,000 records in 1st phase
    20,001 to 40,000 records in 2nd phase
    40,001 to ...... records in 3nd phase
    and so on...
    Please let me know if this does not clarify your confusions... :)
    Thanks...
    -Jahedur Rahman
    Edited by: user13114507 on May 12, 2010 11:28 PM

Maybe you are looking for

  • Help with AP_Invoice Tables in SQL

    Hi Gurus, I am working on a report where i created a view. This query pulls data from SO,PO,ITEMS,AP and AR tables. The problem I am having is when I add a AP tables or a field from that table some of the Order Numbers are disappearing. Could someone

  • Why won't iTunes for PC allow me to sync with my iPod touch?

    I have songs on iTunes on my old PC and on my newer Macbook Pro.  I synced the songs form the Mac onto my new iPod Touch, but iTunes will not let me sync the songs from the PC, saying only one computer at a time can have an iTunes account.  It will o

  • 80GB IPOD to TV

    I am using the 5 wire conector and getting audio only. I have tried setting tv out in all positions, on, off and ask, no video. I use my friends IPOD Touch and I get it all, great video and audio. What should I do?

  • Tried to download Pages, said it was installed but it didn't..

    It was installing the latest Pages from the App store, I came back sometime later and it said "installed" but when i opened it it was still Pages 08. plus it didnt ask for my credit card info. i am afraid to hit install again in case it bills my cred

  • Studio 11: cc -fast hangs on acomp when invoked via gmake and hogs memory

    Hi, i am seeing a weird issue here on Solaris 8 Sparc with Studio 11. Running ./configure with optimization CFLAGS (-fast -xnolibmopt) for libiconv 1.13 hangs on "checking for stdbool.h that conforms to C99..." with acomp being the last spawned proce