SQL*Loader privileges

For security purposes, what privileges should be assigned to a developer who needs to use the SQL*Loader utility to load database tables?

Just to load data he just need connect and resource privallages that is enough for him to load data in his own schema if he is loading data in other users schema then he definately need DML Privallages on those tables.
Suresh

Similar Messages

  • Privilege revoked on a table  - SQL*Loader-926: OCI error

    During recent maintainence activity , a table was exported & imported , deleted , truncated & dropped.After the activity an user lost its privilege on the table and a job related to this table has been failing with the below error
    SQL*Loader-926: OCI error while executing delete/truncate (due to REPLACE/TRUNCATE keyword) for table xyz.abc_def
    ORA-01031: insufficient privileges
    The privileges were granted on the table once again and since then the job has been successful , however we are unable to find the root cause which was responsible for the revoking of these privileges.
    Any suggestions and insight into this would be very helpful and much apprciated.

    Please read http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9003.htm#SQLRF01806
    >
    Dropping a table invalidates dependent objects and removes object privileges on the table. If you want to re-create the table, then you must regrant object privileges on the table, re-create the indexes, integrity constraints, and triggers for the table, and respecify its storage parameters
    >
    Edited by: P. Forstmann on 1 févr. 2011 13:44

  • SQL*Loader-925: Error while parsing a cursor (via ocisq)

    Receiving the following error message when trying to use SQLLoader (on NT) >>>
    SQL*Loader-925: Error while parsing a cursor
    (via ocisq)
    ORA-00942: table or view does not exist
    Trying to use the application for the first time, logon using userid for which sqlplus operates, and the table does exist under the user schema, as owner.
    ctl and dat file are correct. Log file gives me no further detail of the errors.
    Are there any configuration settings or something required for this app?
    Thanks

    Thanks Warren. I was concentrating more on the first line of the error.
    You are right. The issue was of insufficient privileges. The table did not have all the necessary grants provided.

  • Sql loader and bulk data

    hi,
    I want to insert 100,000 records daily in a table for the first month and then in next month these records are going to be replaced by new updated records.
    there might be few addition and deletion in the previous records also.
    actually its consumer data so there might be few consumer who have withdrawn the utility and there will be some more consumer added in the database.
    but almost 99% of the previous month data have to be updated/replaced with the fresh month data.
    For instance, what i have in my mind is that i will use sql loader to load data for the first month and then i will delete the previous data using sqlPlus and load the fresh month data using sql loader again.
    1. Is this ok ? or there is some better solution to this.
    2. I have heard of external files, are they feasible in my scenario?
    3. I have planned that i will make scripts for sqlPlus and Loader and use them in batch files. (OS windows 2003 server, Oracle 9i database). is there some better choice to make all the procedure automatic?
    looking for your suggestions
    nadeem ameer

    I would suggest u use External tables since its more flexible then
    sqlloader & is a better option.
    For using external tables
    1)u will have to create a directory first
    2)Generally creation od directory is done by sys,hence after creating the directory
    privileges read & write to be provided to user .
    3)Creation of external tables.
    4) Now use the table as a normal table to insert ,update delete in
    ur table.
    U can get more information from
    http://www.oracle-base.com/articles/9i/SQLNewFeatures9i.php#ExternalTables
    Create Directory <directory_name> as <Directory path where file be present>
    Grant read,write on directory <directory_name> to <username>
    CREATE TABLE <table_name>
    (<column names>)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY ,directory_name>
    ACCESS PARAMETERS
    RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY ','
    LOCATION (<filename>)
    PARALLEL 5
    REJECT LIMIT 200;
    Hope this helps.

  • SQL Loader XML Missing Data

    I am trying to load a XML file via SQL Loader. My loader file is as follows:
    LOAD DATA
    INFILE 'C:\Infile.xml' "str'</Record>'"
    BADFILE 'C:\Infile.bad'
    Replace
    INTO TABLE Cust_Table
    TRAILING NULLCOLS
    dummy filler terminated by ">",
    Month enclosed by "<Mo>" and "</M0>"
    LOC_ID enclosed by "<LOC_ID>" and "</LOC_ID>",
    LOC_DESC enclosed by "<LOC_DESC>"and "</LOC_DESC>",
    Cust_ID enclosed by "<Cust_ID>" and "</Cust_ID>",
    Cust_Name enclosed by "<Cust_Name>" and "</Cust_Name>" )
    The problem I'm having is for some records the Cust_Id and Cust_Name is missing in the file. The error I'm getting when trying to load the file for those records is:
    Rejected - Error on table Cust_Table, column Cust_Id.
    Initial enclosure character not found
    Not sure what I need to add to the loader file to resolve this error.
    TIA,
    Todd

    I would suggest u use External tables since its more flexible then
    sqlloader & is a better option.
    For using external tables
    1)u will have to create a directory first
    2)Generally creation od directory is done by sys,hence after creating the directory
    privileges read & write to be provided to user .
    3)Creation of external tables.
    4) Now use the table as a normal table to insert ,update delete in
    ur table.
    U can get more information from
    http://www.oracle-base.com/articles/9i/SQLNewFeatures9i.php#ExternalTables
    Create Directory <directory_name> as <Directory path where file be present>
    Grant read,write on directory <directory_name> to <username>
    CREATE TABLE <table_name>
    (<column names>)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY ,directory_name>
    ACCESS PARAMETERS
    RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY ','
    LOCATION (<filename>)
    PARALLEL 5
    REJECT LIMIT 200;
    Hope this helps.

  • SQL*Loader-929: Error parsing insert statement for table

    Hi,
    I get the following error with SQL*Loader:
    Table MYTABLE loaded from every logical record.
    Insert option in effect for this table: INSERT
    Column Name Position Len Term Encl Datatype
    IDE FIRST * ; CHARACTER
    SQL string for column : "mysequence.NEXTVAL"
    CSI_NBR 1:10 10 ; CHARACTER
    POLICY_NBR 11:22 12 ; CHARACTER
    CURRENCY_COD 23:25 3 ; CHARACTER
    POLICY_STAT 26:27 2 ; CHARACTER
    PRODUCT_COD 28:35 8 ; CHARACTER
    END_DAT 44:53 10 ; CHARACTER
    FISCAL_COD 83:83 1 ; CHARACTER
    TOT_VAL 92:112 21 ; CHARACTER
    SQL*Loader-929: Error parsing insert statement for table MYTABLE.
    ORA-01031: insufficient privileges
    I am positive that I can SELECT the sequence and INSERT into the table with the user invoking sql*loader.
    Where does that "ORA-01031" come from?
    Regards
    ...

    Options:
    1) you are wrong about privileges OR
    2) you have the privilege only when you connect via SQL*Plus (or whichever other tool you used to test the insert).
    Is it possible that during your test you enabled the role which granted you the INSERT privilege - and that SQL*Loader doesn't do this?
    Can you see the table in this list?
    select *
    from user_tab_privs_recd
    where table_name='MY_TABLE'
    and owner='table owner whoever';
    select *
    from user_role_privs;Any roles where DEFAULT_ROLE is not YES?
    HTH
    Regards Nigel

  • SQL Loader - not working

    I have Oracle 11g R2 running on Windows Server 2008 R2
    In trying to load data (csv file) with SQL Loader in Enterprise Manager it tells me the job completed successfully, but there is no data in the table. The bat file is created as is the ctl and sh file. I have checked that sqldr is in my $ORACLE_HOME$\bin directory and I have checked that this "path" is also in my path environment variable. When I try to run from command line I get not recognized as an internal or external command, operable program or batch file. I try to run it in SQL Developer and after it runs it says task cancelled. Can you help. I am expecting a 70-90 million record file next week and I want to use SQL Loader.
    Message in Enterprise Manager
    Status          Succeeded
         Exit Code          0
         Step ID          31327
         Targets          leads.global
         Started          May 10, 2013 3:55:14 PM (UTC-07:00)
         Ended          May 10, 2013 3:55:22 PM (UTC-07:00)
         Step Elapsed Time          8 seconds
         Management Service          WIN-D1CINRVM11K:1158_Management_Service
         TIP      Management Service from which the job step was dispatched.
    Output Log
    Username:
    SQL*Loader: Release 11.2.0.1.0 - Production on Fri May 10 15:55:15 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Load completed - logical record count 51.

    I usually run SQL*Loader from SQL*Plus, so that it avoids some of the privilege issues. I also use a log file, so that I can check that afterwards to see what happened and why. For example:
    host sqlldr scott/tiger control=test.ctl log=test.log
    A frequent issue is lack of privileges to the data file to be loaded. You can edit a blank file in SQL*Plus and copy and paste the data into it, to eliminate such problems or identify them, so that you can check privileges on the original file.
    To provide much else, we would need more complete information, such as a few rows of sample data, your SQL*Loader control file, and your table structure.

  • SQL*Loader-128: unable to begin a session ORA-28000: the account is locked

    Hi everyone,
    I am migrating from a SQL Server 2000 DB to Oracle 10g. I followed the migration tutorial and got all the way till the data migration process. The DB data capture scripts capture the data from the SQL Server successfully but i encounter the following error while i run the oracle_ctl.bat file on the Oracle side:
    SQL*Loader: Release 10.2.0.1.0 - Production on Tue Jun 9 14:08:27 2009
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL*Loader-128: unable to begin a session
    ORA-28000: the account is locked
    I checked the account and its unlocked and the user name/password combination is the correct one. All the log files have the same error messages. The user has all the required privileges.
    Any ideas why this might be happening ?
    Thanks,
    Amo.

    Hello,
    there may be several causes for this:
    1) account in grace period, it can login to sqlplus but could not logn with sqlldr
    2) kind of user being specified (sys as sysdba for example)
    Could you please paste first lines of modified batch file and
    output from select user and status in dba_users ?
    Try anyway to run the unlock command
    ALTER USER username ACCOUNT UNLOCK;
    Thanks
    Regards,
    Marcello
    Edited by: MGILIBER on Jun 12, 2009 3:02 AM

  • SQL Load from Oracle into 64 bit Essbase 9.3.1 - issue

    I have a sql load that works fine in 32 bit Essbase 7.1.5
    Now I have setup the same sql load in a new 64 bit Essbase 9.3.1 environment. SQL runs. However when it retrieves it is not retrieving some fields "correctly". For example I have some extract functions in the SQL to extract the month or year from a date field. These are returning "0" now for the month or year. (the function syntax is correct as it works in the 7.1.5 environment. Plus for all my fields that are returning numeric dollar values, they are returning a value of "0" instead of the correct value (which it returns in the 7.1.5 environment).
    The sql works correctly if run in SQLPlus. So Essbase is having the issue.
    Any ideas?
    Edited by: Sean V on Jun 5, 2009 7:48 AM

    Hi Sean,
    If you can do it yourself or someone else who can do it for you,
    create a view in your db schema you are connected to and use a tool like Oracles SQLDeveloper (it's for free) or something similar to check your query result by select from your view.
    This way you can hide your internal logic behind this view and no one has to worry about it.
    From my POV this approach has no drawback but only advantage for you.
    If it works as expected put the view into your rules file (I do assume you are using rules files)
    Example (you need the CREATE VIEW privilege for you account(schema)):
    CREATE v_dataload as
    SELECT DIM_COL1 as year , DIM_COL2 as month, DIM_COL3 as market , DATA_COL1 as profit, DATA_COL2 as costs .... etc.,
    In you rules file you then just put in the SELECT box: year,month, profit, costs ...
    and in the table box: v_dataload
    If you name you columns like the Dimension (Gen1) you have the comfort that essbase automatically maps the columns tho the appropriate dimension. (But remember a colum in Oracle can have only up to 30 Characters)
    Back to you question:
    If you get a correct result from you view when using SQLDeveloper but not in you rules file I would say it's very likely a ODBC driver problem.
    If so, please check if you have installed the correct driver for your system. MERANT driver is the best choice as fare as I know.
    In normal cases you never should have to cast anything into a VARCHAR, since exactly this is the job of the ODBC driver.
    However, if everything fails and a cast (like Glen said) is the only way you can make it work put this cast into your view too.
    CREATE v_dataload as
    SELECT TO_CHAR(DIM_COL1) as year , TO_CHAR(DIM_COL2) as month, TO_CHAR(DIM_COL3) as market ,TO_CHAR( DATA_COL1) as profit, TO_CHAR(DATA_COL2) as costs .... etc.,
    Regards
    Andre
    Edited by: andreml on Dec 16, 2009 12:52 PM

  • How to load a default value in to a column when using sql loader

    Im trying to load from a flat file using sql loader.
    for 1 column i need to update using a default value
    how to go about this?

    Hi!
    try this code --
    LOAD DATA
       INFILE 'sample.dat'
       REPLACE
       INTO TABLE emp
       empno   POSITION(01:04) INTEGER EXTERNAL NULLIF empno=BLANKS,
       ename   POSITION(06:15)  CHAR,
       job         POSITION(17:25)  CHAR,
       mgr       POSITION(27:30)  INTEGER EXTERNAL NULLIF mgr=BLANKS,
       sal        POSITION(32:39)  DECIMAL EXTERNAL NULLIF sal=BLANKS,
       comm   POSITION(41:48)  DECIMAL EXTERNAL DEFAULTIF comm = 100,
       deptno  POSITION(50:51)  INTEGER EXTERNAL NULLIF deptno=BLANKS,
       hiredate POSITION(52:62) CONSTANT SYSDATE
      )-hope this will solve ur purpose.
    Regards.
    Satyaki De.

  • How can we tell if SQL*Loader is working on a TABLE?

    We have a process that requires comparing batches with LDAP information. Instead of using an LDAP lookup tool, we get a nightly directory file, and import the two COLUMNs we want via SQL*Loader (REPLACE) into an IOT. Out of three cases, two just check the first COLUMN, and the third needs the second COLUMN as well.
    We did not think of using External TABLEs, because we cannot store files on the DB server itself.
    The question arises, what to do while the file is being imported. The file is just under 300M, so it takes a minute or so to replace all the data. We found SQL*Loader waits until a transaction is finished before starting, but a query against the TABLE only waits while it is actually importing the data. At the beginning of SQL*Loader's process, however, a query against the TABLE returns no rows.
    The solution we are trying right now is, to have the process that starts SQL*Loader flip a flag in another TABLE denoting that it is unavailable. When it is done, it flips it back, and notes the date. Then, the process that queries the information, exits if the flag is currently 'N'.
    The problem, is, what if SQL*Loader starts inbetween the check of the flag, and the query against the TABLE. How do we guarantee that it is still not being imported.
    I can think of three solutions:
    1) LOCK the ldap information TABLE before checking the flag.
    2) LOCK the record that the process starting SQL*Loader flips.
    3) Add a clause to the query against the TABLE checks that there are records in the TABLE (AND EXISTS(SELECT * FROM ldap_information).
    The problem with 3) is that the process has already tagged the batches (via a COLUMN). It could, technically reset them afterwards, but that seems a bit backwards.

    Just out of curiosity, are you aware that Oracle supplies a DBMS_LDAP package for pulling information from LDAP sources? It would obviously be relatively easy to have a single transaction that deletes the existing data, loads the new data via DBMS_LDAP, and commits, which would get around the problem you're having with SQL*Loader truncating the table.
    You could also have SQL*Loader load the data into a staging table and then have a second process either MERGE the changes from the staging table into the real table (again in a transactionally consistent manner) or just delete and insert the data.
    Justin

  • Loading two tables at same time with SQL Loader

    I have two tables I would like to populate from a file C:\my_data_file.txt.
    Many of the columns I am loading into both tables but there are a handful of columns I do not want. The first column I do not want for either table. My problem is how I can direct SQL Loader to go back to the first column and skip over it. I had tried using POSITION(1) and FILLER for the first column while loading the second table but I got THE following error message:
    SQL*Loader-350: Syntax error at line 65
    Expecting "," or ")" found keyword Filler
    col_a Poistion(1) FILLER INTEGER EXTERNALMy control file looks like the following:
    LOAD DATA
    INFILE 'C:\my_data_file.txt'
    BADFILE 'C:\my_data_file.txt'
    DISCARDFILE 'C:\my_data_file.txt'
    TRUNCATE INTO TABLE table_one
    WHEN (specific conditions)
    FIELDS TERMINATED BY ' '
    TRAILING NULLCOLS
    col_a FILLER INTEGER EXTERNAL,
    col_b INTEGER EXTERNAL,
    col_g FILLER CHAR,
    col_h CHAR,
    col_date DATE "yyyy-mm-dd"
    INTO TABLE table_two
    WHEN (specific conditions)
    FIELDS TERMINATED BY ' '
    TRAILING NULLCOLS
    col_a POSITION(1) FILLER INTEGER EXTERNAL,
    col_b INTEGER EXTERNAL,
    col_g FILLER CHAR,
    col_h CHAR,
    col_date DATE "yyyy-mm-dd"
    )

    Try adapting this for your scenario.
    tables for the test
    create table test1 ( fld1 varchar2(20), fld2 integer, fld3 varchar2(20) );
    create table test2 ( fld1 varchar2(20), fld2 integer, fld3 varchar2(20) );
    control file
    LOAD DATA
    INFILE "test.txt"
    INTO TABLE user.test1 TRUNCATE
    WHEN RECID = '1'
    FIELDS TERMINATED BY ' '
    recid filler integer external,
    fld1 char,
    fld2 integer external,
    fld3 char
    INTO TABLE user.test2 TRUNCATE
    WHEN RECID <> '1'
    FIELDS TERMINATED BY ' '
    recid filler position(1) integer external,
    fld1 char,
    fld2 integer external,
    fld3 char
    data for loading [text.txt]
    1 AAAAA 11111 IIIII
    2 BBBBB 22222 JJJJJ
    1 CCCCC 33333 KKKKK
    2 DDDDD 44444 LLLLL
    1 EEEEE 55555 MMMMM
    2 FFFFF 66666 NNNNN
    1 GGGGG 77777 OOOOO
    2 HHHHH 88888 PPPPP
    HTH
    RK

  • Creating SQL-Loader script for more than one table at a time

    Hi,
    I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
    It looks like I can create SQL-Loader scripts for all the tables
    or for one table at a time. If I want to create SQL-Loader
    scripts for 5-6 tables, I have to either create script for all
    the tables and then delete the unwanted tables or create the
    scripts for one table at a time and then merge them.
    Is there a simple way to create migration scripts for more than
    one but not all tables at a time?
    Thanks,
    Prashant Rane

    No there is no multi-select for creating SQL-Loader scripts.
    You can either create them separately or create them all and
    then discard the one you do not need.

  • SQL Loader (Oracle 8.1.5 on Suse 6.3) Internal Error

    Hi all,
    I try to insert data with SQL Loader on Linux (Suse 6.3) and get the following message:
    SQL*Loader-704: Internal error: ulmtsyn: OCIStmtExecute (tabhp) [-1073747572]
    ORA-00942: table or view does not exist
    The control file and data file did work on another platform.
    Please help me!
    Thanks,
    Thies Mauker

    Lee Bennett (guest) wrote:
    :Hi
    :I have successfully installed Oracle 8.1.5 Enterprise edition
    on
    :Suse 6.2 and applied the 8.1.5.0.1 patch set,
    NO!
    SuSe 6.2 have a patch file for Oracle made from their developers.
    Never use Oracle 8.1.5.0.1 patch file that doesn't work because
    us bugged.
    Use SuSe 6.2 Oracle patch set.
    (don't remember the web page where you can download it but a
    search with word "oracle" from SuSe homepage will lead you to
    it)
    -Stefano
    null

  • Decode Not working in sql loader

    I had a requirement of loading flatfile into staging table using SQL Loader, One of the columns in the the Flat file is having values FALSE or TRUE and my requirement is that I load 0 for FALSE and 1 for TRUE which can be achieved by simple DECODE function...I did use decode and tried to load several times but did not work. What might be the problem
    LOAD DATA
    INFILE 'sql_4ODS.txt'
    BADFILE 'SQL_4ODS.badtxt'
    APPEND
    INTO TABLE members
    FIELDS TERMINATED BY "|"
    ( Person_ID,
    FNAME,
    LNAME,
    Contact,
    status "decode(:status, 'TRUE', '1','FALSE','0')"
    I did try putting a trim as well as SUBSTR but did not work....the cloumn just doent get any values in the output (just null or say free space)
    Any help would be great.....

    Hello user8937215.
    Please provide a create table statement and a sample of data file contents. I would expect DECODE or CASE to work based on the information provided.
    Cheers,
    Luke
    Please mark the answer as helpful or answered if it is so. If not, provide additional details.
    Always try to provide create table and insert table statements to help the forum members help you better.

Maybe you are looking for

  • Performance issue related to BSIS table:pls help

    Theres a select statement which fetches data from BSIS table. As in the where clause the only key field used is BUKRS its consuming more time.Below is the code. Could you please tell me how to improvise this piece of code. I tried to fecth first from

  • Acrobat x Pro 10.1.3 suddenly stopped working

    Today Acrobat suddenly stopped working insofar as it just would not start. Looking in the task manager shows it starts then stops. This is on a Win 7 x64.

  • How do I create this look in illustrator....

    I'm recreating some vintage art and am trying to get this spray paint look. Any suggestions on how to go about achieving this look (see photo) in illustrator? I'm currently running CS4 (I'm on my work computer).... [URL=http://imageshack.us/photo/my-

  • Grants-Projects/Awards Reconciliation & GL

    What are the main reasons for reconciliation problems between Projects and Awards, including summary and detailed information?? Grants and GL reconciliation-main problems? The project and award segments in GL are necessary? If not, how to reconciliat

  • Images in HTML forms and/or reports

    Hi, Apologies if a stupid question, but can you display a combination of data and image content in Portal HTML forms and/or reports? If so, how? This question assumes that the image in question is browser-supported (e.g. gif file), and the link to it