Create Table Without Insert Permission?

Oct 1, 2012

Is it possible in oracle dbms for a user to have the permission to create a table but not have the permission to insert in, although the same user just created it?

View 6 Replies


ADVERTISEMENT

Create File With (other) User Having Read Permission When Using Utl_file?

Dec 23, 2012

We have a requirement to create a file using UTL_FILE package. so we tried to generate the file in directory at UNIX level,for example "/tmp" which means when we executing the stored procedure which in turn calls UTL_FILE package and create a file say "a.txt". On checking the permission for "a.txt", it shows as follows

-rw-r----- oracle dba a.txt

this means read and write for oracle user, read for dba group and no permission for other user.

our requirement is to have the following privileges at UNIX level.

-rw-r--r-- oracle dba a.txt

Is it possible to do at oracle level since the file is owned by oracle user or at UNIX level (with out logging to oracle user)?

Environment: UNIX AIX 6.1 and Oracle 11.2.0.3

View 3 Replies View Related

SQL & PL/SQL :: Create Trigger To Change Every Insert In Table To Sysdate

Feb 17, 2011

I have table 'A' with column 'ID','NAME','IN_DATE','PHONE','EMAIL'

Now I have to create a trigger such that on every insert in the table 'A' the value of column 'IN_DATE' changes to sysdate.I m not good in PL/SQL

View 4 Replies View Related

SQL & PL/SQL :: Create Trigger That Will Update Table When There Is Insert / Update

May 29, 2012

i want to create a trigger that will update a table when there is an insert or update.i can't across this error that i don't even know what it means "table %s.%s is mutating, trigger/function may not see it".

*Cause: A trigger (or a user defined plsql function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it.

*Action: Rewrite the trigger (or function) so it does not read that table.

CREATE OR REPLACE TRIGGER set_date_end
BEFORE INSERT OR UPDATE OF issued ON shares_amount
FOR EACH ROW
DECLARE
BEGIN
INSERT INTO shares_amount(date_end) VALUES(SYSDATE);
END set_date_end;
/

View 3 Replies View Related

Enterprise Manager :: What Is The Difference Between Create External Table Vs Create Table

Apr 29, 2011

What is the difference between CREATE EXTERNAL TABLE Vs CREATE TABLE .?

Is CREATE EXTERNAL TABLE included in CREATE TABLE?

View 3 Replies View Related

SQL & PL/SQL :: Min Max - Create And Insert Statements?

Oct 4, 2010

I don't have development env .create and insert statements work below for sample data:

View 8 Replies View Related

SQL & PL/SQL :: Trigger Insert - Create Or Replace?

Jun 12, 2013

I have make a new trigger.Create a trigger that inserting a new job_id MAX_SALARY assigned as the employee's salary more than 80 departmental charges

I have that code, is that correct?

CREATE OR REPLACE
TRIGGER TR27
AFTER INSERT ON JOBS FOR EACH ROW
BEGIN
(SELECT MAX(SALARY) FROM EMPLOYEES WHERE DEPARMENT_ID=80);
:NEW.MAX_SALARY := :OLD.MAX_SALARY;
END;

What I need to complete it?

View 2 Replies View Related

SQL & PL/SQL :: Create SQL Insert Statement With Multiple Values?

Jun 3, 2010

I need to create a SQL insert statement with mutipleValues and an select statement I am trying this it works -

insert into uwa_crew_ids(crew_ID, CREATION_DATE, CREATED_BY,LAST_UPDATE_DATE,LAST_UPDATED_BY, LAST_NAME, first_name )
values
( uwa_crew_ids_s.nextVal,sysdate, 1767,sysdate, 1767,'TEST1', 'NITA')

This statement does not work (with or without keyword) Is there any alternate syntax

insert into uwa_crew_ids(crew_ID, CREATION_DATE, CREATED_BY,LAST_UPDATE_DATE,LAST_UPDATED_BY, LAST_NAME, first_name )
( uwa_crew_ids_s.nextVal,sysdate, 1767,sysdate, 1767,(select last_name, first_name from uwa_crew_ids where guid = '8795EAAFBE694F8EE0440003BA2AEC90' ))

View 3 Replies View Related

Oracle 11gr2 - How To Create Insert Statement

Jun 6, 2013

oracle 11gr2
linux

how to generate insert script by using command prompt. Actually am using toad generating insert statement but it is taking too long time to generate.

View 4 Replies View Related

PL/SQL :: Create Or Replace Trigger After Insert On Transfer?

Sep 1, 2013

create or replace trigger aifer_transfer after insert on transfer for each new row begin     

   UPDATE Account SET balance = balance-:new.amount        WHERE acc_id = from_acc_id;        UPDATE Account SET balance = balance+:new.amount        WHERE acc_id = to_acc_id;      end if; end;     create or replace trigger bifer_transfer before insert on transfer for each new row begin      if get_balance(:new.from_acc_id) < :new.amount  then        raise_application_error(-20001, 'Not enough money in account!');        end if; end;   create or replace function get_balance(p_acc_id in number) return number as v_balance account.balance%type; begin select balance into v_balance from account where acc_id = p_acc_id; return v_balance; end;    select get_balance(123) from dual..................................................i am geting this error when executing the trigger..................................................Error report:ORA-01912: ROW keyword expected01912. 00000 -  "ROW keyword expected"*Cause:    keyword missing*Action:  

View 12 Replies View Related

Create Sproc (loop) To Insert Data

Aug 3, 2011

Need to create Sproc(loop) to insert data..We have 2 table:

- BE Table
Name Null Type
---------------------- -------- --------------
BID NOT NULL NUMBER(10)
BUSINESSENTITYTYPEID NOT NULL NUMBER(10)
PARENTID NUMBER(10)
VERSION NOT NULL NUMBER(10)
FULLNAME VARCHAR2(255)
PHONE VARCHAR2(255)
FAX VARCHAR2(255)
[code]....

Whenever the BE table is read it gives more than 80K records from cust_id=1 and so on and becomes a bit slow ..

Now, when we copy the records from BE to CUSTPAYMETHOD (assume 30k). Next time when we read the table it should show us the customerid from 3001based on New Customer's(user created) Customerid.

CUSTID column is logically linked with BID column (FK not enforced) We don't have to pass parameter as we know the cust_id=1,flag for suspended='Y' and Eff_date between date1 and date2..We have accept from/to Period.Probably a loop to insert...This particular SP will run in all env and the id is going to be different how we are going to handle this...

We want to have a procedure. This is to purge BE table.

1) Insert a new parameter CUST_PMNT_MTHD_RETENTION_PERIOD into system_parameter table(which is only a parameter table) -- this can be done outside of Proc.

2)Create a new Customer(user id) through the Customer application and then find out the custID for the new customer -- this can be done outside of Proc.

SP should be for:

- Store Proc will Update the CustID in the CustPayMethod table to the new customer ID (that was created) when the EFFECTIVESTARTDATE older than CUST_PMNT_MTHD_RETENTION_PERIOD(from system_parameter table) days and suspended=’Y’.

- Copy records with custid=1(anonymous user) and startdata older than retention_period and suspended='Y' to Table CUSTPAYMETHOD

Eventually,delete the record from BE table.BusinessEntity(parent) table is information about customer and customerpaymentmethod(child) table is about payment mode(how payment is made by customer).

Assume If BID=1 then we can find Cust_id=1(which can have many records as the payment mode may change because the customer pay by different mode(credit,debit etc).We have to use loop and commit every 200 or 500 records.

FIrst we have to update the table with new cust_id and then insert...

View 1 Replies View Related

Application Express :: How To Create Automatically Item If Value Insert Into Masters

Oct 14, 2013

 i have create service rate card Form for transport Service and i have declare transport component into master lookup table .There is 11 component into master.To Difine rate for a particular transport service i have insert these component name with there rate into another table transport_rate _card.

 To do this i have created page with these 11 component name item and there 11 rate item to enter component rate  with respective services. Problem is if i create 11 component name text item and 11 text item to enter there conmponent rate but if user add 3 or 4 or 5 more componenet name into master then i'll be need to add extra component name text item and component rate text item.so i need to create form where if user add more component into master then component name item and component rate item should be increase automaticaly. 

How i can create form where item added auotmaticaly acording to component which are exist into master table. there is only component name into master table. 

View 9 Replies View Related

Server Utilities :: How To Create Control File To Insert Data In Our Database

Dec 21, 2011

how to create control file and how to load the data through command window in our database using sql * loader.i am having structure in my database and .csv file in my desktop.

View 20 Replies View Related

TNS Permission Denied?

Jul 12, 2011

I can connect to a database instance using toad. But I can not connect to the instance through sqlplus. Its says TNS permisson denied ora-12546. However I can connect to other instances on other machines. If there were any permission issues on client oracle directories then I would not be able to connect to other machines with other instances.

I am using Oracle 11g client on windows 7 64 bit and I am connecting to oracle server Linux 32 bit

View 8 Replies View Related

SQL Query To Grant Permission?

Oct 6, 2012

I want sql querys for following scenarios

Owner of the compant wants to create 5 users,3 in following fashion

1) 2 -Must have authority of admin

2) 2- Normal user

3) 1 - User whose password is blocked for 15 days

View 10 Replies View Related

Finding Permission Tables

May 30, 2011

How to find the list of tables which has permission select only and tables which has both read and write access permission for a particular user.

I'm using ORACLE database.

View 1 Replies View Related

SQL & PL/SQL :: Grant Permission Revoke?

Dec 16, 2011

Is there a way to find out who and how was the GRANT permission revoked from user.Why i am asking is , i see a grant permission exist for a user and has been revoked later.

View 13 Replies View Related

SQL & PL/SQL :: Granting Permission On All The Tables To Another User?

Jan 19, 2011

I have 3 users in one schema. One user is having all the tables, packages,triggers etc and this is the super user.

I want to access all the tables, packages etc without prefix the username in other two users.

View 15 Replies View Related

Change Default Datafile Permission (640) To (644)

Mar 15, 2013

How datafile is created with 640 file permission by oracle software.(I know for security reasons it is created with 640 permission)

example:
-rw-r----- 1 orasd dba 104865792 Mar 15 01:17 users01.dbf

I want to change the datafile permission as below. how to change the default value of the datafiles permission from (640) to (644) internally while creating the datafile from oracle side.

example:
-rw-r--r-- 1 orasd dba 104865792 Mar 15 01:17 users01.dbf

View 7 Replies View Related

SQL & PL/SQL :: Primary Constraint On Table Affecting Procedure To Insert Rest Of Rows In Table?

Jun 12, 2012

primary key constraint on transaction_dtl_bk is affecting the insertion of next correct rows.

CREATE OR REPLACE PROCEDURE NP_DB.san_po_nt_wnpg_1 (
dt DATE
)
IS
v_sql_error VARCHAR2 (100); -- added by sanjiv
v_sqlcode VARCHAR2 (100); ---- added by sanjiv added by sanjiv

[code]...

View 2 Replies View Related

PL/SQL :: Selecting Records From 125 Million Record Table To Insert Into Smaller Table?

Jul 17, 2013

Oracle 11gI have a large table of 125 million records - t3_universe.  This table never gets updated or altered once loaded,  but holds data that we receive from a lead company. I need to select records from this large table that fit certain demographic criteria and insert those into a smaller table - T3_Leads -  that will be updated with regard to when the lead is mailed and for other relevant information.  select records from this 125 million record table to insert into the smaller table. 

I have tried a variety of things - views, materialized views, direct insert into smaller table...I think I am probably missing other approaches. My current attempt has been to create a View using the query that selects the records as shown below.  Then use a second query that inserts into T3_Leads from this View V_Market.  This is very slow. Can I just use an Insert Into T3_Leads with this query - it did not seem to work with the WITH clause?    My Index on the large table is t3_universe_composite and includes zip_code, address_key, household_key.   

CREATE VIEW V_Market  asWITH got_pairs    AS     (         SELECT /*+ INDEX_FFS(t3_universe t3_universe_composite) */  l.zip_code, l.zip_plus_4, l.p1_givenname, l.surname, l.address, l.city, l.state, l.household_key, l.hh_type as l_hh_type, l.address_key, l.narrowband_income, l.p1_ms, l.p1_gender, l.p1_exact_age, l.p1_personkey, e.hh_type as filler_data, 1.p1_seq_no, l.p2_seq_no       ,      ROW_NUMBER () OVER ( PARTITION BY  l.address_key                                    ORDER BY      l.hh_verification_date  DESC                    ) AS r_num         FROM   t3_universe  e         JOIN   t3_universe  l  ON                l.address_key  = e.address_key             AND l.zip_code = e.zip_code           AND   l.p1_gender != e.p1_gender      

[code]....

View 2 Replies View Related

Forms :: Read Data From Table And Insert To Another Table With A Cursor?

Feb 20, 2013

I have a table with a BLOB column ;

I want read data from table and insert to another table with a cursor

My code is :

procedure read_data is
cursor get_data is
select id,image from picture1;
id1 number;
pic blob;
begin
open get_data;

[code]....

when I run form , error FRM-40734 occurred

error in line " fetch .... "

View 1 Replies View Related

Application Express :: Insert Into History Table When Update Action Is Performed On Tabular Form View Or Table

Aug 24, 2013

My scenario is I need to insert into History table when a record is been updated into a tabular form(insert the updated record along with the additional columns Action_by,Action_type(Like Update or delete) and Action Date Into History table i.e History table contains all the records as the main table which is been visible in tabular form along with these additional columns ...Action_by,action_type and action_date.

So now i dont want to create a befor/after update trigger on base table rather i would like to create a generic procedure which will insert the updated record into history table taking the page alias and pade ID as the parameters(GENERIC procedure is nothing but whcih applies to all the tabular forms(Tables) contained int he application ).

View 2 Replies View Related

Server Administration :: Database Directory Permission

Feb 4, 2011

My database is running in oracle 10g. I have more than 25 oracle directories which are being used for batch/reporting jobs. I found read and write privileges are missing for 7 Dirs. I checked the last ddl time, it shows Jan 26th.

I want know how to check which userid revoked it.

View 4 Replies View Related

Networking And Gateways :: Ora-12546 Tns Permission Failed?

Feb 15, 2010

I am installing Oracle 10g using windows 7 but i am facing problem Ora-12546.

View 6 Replies View Related

Forms :: PERMISSION DENIED While Setting Value Path

Oct 13, 2012

At the time of installing developer 6i am getting the above error,at the stage of selecting the path for forms its throwing the above error saying the permission denied in setting the value path....

does any one come across this type of error before...

View 1 Replies View Related

PL/SQL :: Grant Read Only Permission On Stored Procedure

Oct 8, 2012

I have a requirement like give reaonly access on my stored procedure to another user , not even execute permission on that steored procedure.

let us know the command ?

View 10 Replies View Related

Oracle 10g - Take Snapshot Of Table Before Insert Or Update Happens To That Table

Dec 28, 2010

I need to take a snapshot of a table before insert or update happens to that table.... in oracle 10g. I am reading the MV docs from oracle and below link..

[URL].......

how MV should be written for this and how to schedule it in dbms_jobs for auto refresh?

assuming that t1 is the table where DML operation are goin to happen so before any insert or update, snapshot has to be taken, and I am assuming that to do this it would look something like this?

create materialized view my_view refresh fast as select * from t1;

create materialized view log on my_view;

and then schedule in a dbms_jobs?

View 1 Replies View Related

SQL & PL/SQL :: Insert All Records From External Table Into Export Table

Mar 25, 2013

following is the requirement

External Table
WKSHT_FILE_EXT
wksht_line
Export Table
Wksht_export
global_idvarchar2(10)
wksht_linevarchar2(250)
[code]....

Step 1.Insert all records from the external table into the export table. Truncate the export table first

Step 2.Read in a record from the export map table

Step 3.Search through export table records looking for the key words BRANCH =. Compare the branch code with the branch code form the map table

Step 4.If a match is found mark all records in the export table for the worksheet with the global ID from the export map table as follows..The first line of a worksheet is marked by the words WKSHTS..The last line of the work sheet is marked by the words COMPANY CONFIDENTIAL..We will need to capture the line break so also mark the next line after the COMPANY CONFIDENTIAL line

Step 5.Continue with Steps 2 - 4 until all records have been processed from the export map table.

first I have to create a procedure ti insert data from external table to export table.Global id will be blank.it will be updated by the mapping table's Global Id when The EB COLUMN's data(i.e 8p,2Betc ) will match with the BRANC=NA,2Betc of the datasheet loaded from the external table.. FOLLOWING IS THE SAMPLE DATASHEET

WKSHTS AAAAA BBBBBBBBBBB ELECTRONICS INC. TIME REPORT-DATE PAGE
SORT - BR, SLSREP AEC FIELD SALES REPRESENTATIVE 16:14 09/21/12 1
BRANCH = 2B
EMPLOYEE NAME SALVAAG, GREGG Days in the Month 28
[code]....

THERE ARE 2 pages..I have to split this LONG REPORT STORED IN WKSHT_LINE COLUMN OF EXPORT TABLE to 2 records..like wise 500 pages are there means 500 records.. AND THEN FIND BRANCH= after that which two words will come i.e NA,2B etc if it will MATCH WITH MAPPING TABLE"S EB COLUMN"S DATA,THEN MAPPING TABLE's GLOBAL ID WILL BE UPDATED TO EXPORT TABLE's GLOBAL ID WHICH IS BLANK

View 1 Replies View Related

Export All Schema And User Permission - Then Import To New Server?

Nov 2, 2010

I have database in 9.2.0.3 on windows 2003 R2 one server and i have serve with 10.2.0.4 64 bit on windows 2008 R2 64 bits. I want to move database from 9.2.0.3 to new server on 10.2.0.4.

!)should i do the cold backup of 9.2.0.3 and then create db instance on new server and then use dimutility to create new instance and then run the patch upgrade.

!!) I would like to do export all schema and user permision (is if possible?)export and then import to new server?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved