Page 1 of 1

Oracle table truncate

Posted: Wed Aug 03, 2011 9:13 am
by kennyapril
I need to truncate and load the table same time in the same job everyday.

So in the target I used Oracle enterprise stage with write method as load and
write mode as truncate.

Please let me know whether this works for my requirement,

I tried to do this use the userid of the table owner but I get an error

Access to sys.dba_data_files is required but is not available;
please see your database administrator for select privileges.



Thanks

Re: Oracle table truncate

Posted: Wed Aug 03, 2011 9:53 am
by chulett
Access to sys.dba_data_files is required but is not available;
please see your database administrator for select privileges.
That seems pretty clear to me.

Posted: Wed Aug 03, 2011 10:59 am
by pandeesh
I think the below link will help you:
http://publib.boulder.ibm.com/infocente ... ysadm.html

Re: Oracle table truncate

Posted: Wed Aug 03, 2011 11:56 am
by marpadga18
You can truncate table before loading in Oracle enterprise stage use "OPEN COMMAND"

begin
execute immediate 'truncate tablename;

Posted: Wed Aug 03, 2011 12:24 pm
by kennyapril
Forwarded this to DBA for the select permission to the below data files as mentioned in the document.

The problem was with the SQL bulk loader which needs specific permissions as I used LOAD in oracle enterprise.