PL/SQL :: Use Of Views And Synonyms If Changes Made To Them Affects Original Table Contents

Mar 28, 2013

what is the the use of views and synonyms if changes made to them affects the original table contents?It is data insecurity know?

View 2 Replies


ADVERTISEMENT

SQL & PL/SQL :: Finding User Who Made Changes In Table Structure Or Schema

Sep 21, 2011

i want to find the name of user who make changes in the table structure or create any index or constraint or unique key or alter the column? Is there any way to find in Oracle. in which table what change has been done as well?

following Output needed

userid, username, schemaname, schemachangetime, "what_change_has_been_made", IP address or Computername

View 11 Replies View Related

PL/SQL :: Get List Of Materialized Views / Views Using Column Of Table

Oct 17, 2013

I am removing sal column from table tab_emp; i want to check whether any materialized view or view using this column by  querying using data dictionary :- if i use like condition against query column of all_mviews it is throwing error sicne it is long data type. is there a way to search it without creating any function and use it in a query.

View 3 Replies View Related

SQL & PL/SQL :: Create Table If Renamed The Original

May 14, 2012

I am trying to recreate a table after I have renamed the original.

DECLARE
v_prd_detail_seq NUMBER;
v_orig_ddl CLOB;

[Code].....

View 6 Replies View Related

SQL & PL/SQL :: Mutating Trigger While Updating Original Table

Feb 18, 2013

I have a table EMPLOYEE with columns employee_id and status. I have a requirement that when an employee status is getting changed, then even its linked employee's status also should be changed to the same status value. For this, I need to handle the updating of linked employee's status using a trigger.

Since we get mutating trigger issue when try to update the originating table, I am trying to go with the approach of "in place of a single AFTER row trigger that updates the original table, resulting in a mutating table error, you may be able to use two triggers. The first is an AFTER row trigger that updates a temporary table, and the second an AFTER statement trigger that updates the original table with the values from the temporary table".

But however I am still facing the same issue.

Test case:

CREATE TABLE EMPLOYEE
(
EMPLOYEE_ID VARCHAR2(1),
STATUS NUMBER(9)
);

INSERT INTO EMPLOYEE VALUES ('A',1);
INSERT INTO EMPLOYEE VALUES ('B',1);
commit;
[code]....

Also, any alternate options (rather than using 2 triggers with temp table).

View 7 Replies View Related

SQL & PL/SQL :: Unable To Rename A Column For Original Table?

Feb 14, 2012

i am not able to rename a column for original table, once i create a new one with Create table as select i can rename the new table column, but not the original one

SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 14 13:10:10 2012

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> show user
USER is "WEBSYSTEMD6"
SQL> alter table cbe rename column tnum to tnum_old;
alter table cbe rename column tnum to tnum_old
*
ERROR at line 1:
ORA-00900: invalid SQL statement

SQL> create table cbe_test as select * from cbe;

Table created.

SQL> alter table cbe_test rename column tnum to tnum_old;

Table altered.

SQL>

View 12 Replies View Related

SQL & PL/SQL :: Check If Table Exist In Scheme - If Not Create As Original DDL

Aug 13, 2013

I have 20 or so tables, partitioned by range, indexed etc...soon these tables will be gone and i have to recreate them with the same definitions. I have to write a procedure(or script, it's up to me) which must:

1- check if table A exist in the scheme
2- if not create the table as the original ddl.

for 1 i've used smth like
-------------------------
SELECT count(*)
INTO a
FROM user_objects
WHERE object_name='A';

[code]....

so my question is how and what is the cleanest and fastest way to do this.? it's a lot DDLs,

View 17 Replies View Related

Alter Table Column And Its Contents?

May 4, 2011

I have a table with usernames and passwords. The passwords are stored in plaintext. I would like to issue an ALTER command on the password field to store a hash instead, and then repopulate those fields with an encrypted version of the plaintext passwords that were there before.

I would prefer to do this in a procedure, as I am going to perform it in a test environment first, then eventually in the production environment.

View 2 Replies View Related

SQL & PL/SQL :: Table Contents - Unavailable Date

Oct 17, 2012

i have table A i.e. contents

----------------------
1-jan-2012 x
2-jan-2012 y
4-jan-2012 x
7-jan-2012 x

I need to discplay below:

1-jan-2012 x
2-jan-2012 y
3-jan-2012 0
4-jan-2012 y
5-jan-2012 0
6-jan-2012 0
7-jan-2012 x

View 1 Replies View Related

SQL & PL/SQL :: Count Of Records In Table With Different Contents

Mar 31, 2010

I am having a table with contents like

item id, name
100,s_enter
100,p_enter
200,s_enter

i would like the output to be

Variable name cnt_s_enter=1 (this is for 200)
cnt_s_p_enter =1 (this is becoz 100 is both in s_enter and p_enter)

I am working with basic case but thats not working.

select
sum(case when name='s_enter' then 1 else 0 end),
sum(case when name in (s_enter,p_enter) then 1 else 0 end)
from table

View 3 Replies View Related

Application Express :: How To Insert Contents Of CSV File In Table

Sep 16, 2013

I'm starting with APEX, I would like to know how to insert the contents of a file. Csv in a table, how to map a file to a table, how to insert file contents. Xls in a table.

View 1 Replies View Related

Forms :: Changes Made Not Getting Effected In Front End

Mar 16, 2011

I am new to oracle 10g. I have a strange problem which i never used to face it while using oracle 8i.

Out of around 120 forms , there is 2 forms in which all the data entry is being done. any changes made to the coding / text in these fmb is not getting effected when i run the form through front end.The front end is developer 2000 .

Where as changes made to the other fmb is working perfectly fine. Is there any deployment issues which needs to be taken care off in oracle 10g.

View 8 Replies View Related

Server Administration :: Graphical Analysis Of Dynamic Performance Views (V$ Views)?

Nov 5, 2012

is there some open source or free tool which can graphical display V$ Views. Can TOAD do that in a good maner?

in UNIX there is the "sar" command, but a Java tool "ksar" for displaying the statistics in user friendly fashion.

View 2 Replies View Related

PL/SQL :: Use Securefile For New Partitions Made By Interval Partitioning

Oct 19, 2012

I am using Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.I have a range partitioned table having lobs as basicfile. Due to storage issue and other business constraints , it is determined not to change existing lobs to securefile.

However ,we want new lobs to be in securefile and alter table to have  interval partition+.While researching, I found sql to change lob in range partition to securefile by using

alter table t1 add partition t1_p2 value less than (10000) lob (col3) store as securefile (tablespace tbs_sf1)

What to do similar  in case of interval partition.

View 3 Replies View Related

Refresh Materialized Views Based On Remote Views?

Aug 4, 2011

I have a created a materialized view which is based on a view on remote database. Now how do I refresh the view.

Materialized view is created by

CREATE MATERIALIZED VIEW mv_employee_name
AS SELECT EMPLID, EMPL_NAME
FROM VEMPDATA@REMOTEDB
WHERE REGION = 'US';

I am wondering how the refersh happens or how do I specify the refresh clause.REFRESH FAST option is looking for VIEW LOG on the master table but in this case its a remote view, so I cannot create any object on remote db.

View 1 Replies View Related

PL/SQL :: Query To Find First And Last Call Made By Selected Number For Date Range

Apr 27, 2013

create table call(id number(10) primary key,mobile_no number(10), other_no number(10), call_type varchar2(10),call_date_time date, duration number(10));

insert into call values(1,9818764535,9899875643,'IN','24-APR-13 02:10:43',10);
insert into call values(1,9818764535,9898324234,'IN','24-APR-13 05:06:78',10);
insert into call values(1,9818764535,9215468734,'IN','24-APR-13 15:06:78',10);
insert into call values(1,9818764535,9899875643,'OUT','25-APR-13 01:06:78',10);
insert into call values(1,9899875643,9899875643,,'OUT','25-APR-13 22:06:78',10);

Query : need to find first and last call of '9818764535' mobile number and of call_date between '24-apr-13' and '25-apr-13';

Result :

date ,mobile_no , other_no, call_type, duration
24/apr/13 , 9818764535,9899875643,'IN',10
24/apr/13 ,9818764535,9215468734,'IN',10

[Code]....

View 5 Replies View Related

SQL & PL/SQL :: Synonyms Belonging To Other Schema?

Feb 25, 2012

There are plenty of synonyms say (80) and few tables say (3) exist under Jack schema. There are no records in all the 3 tables but the size of each tables shows 1MB and Schema (jack) size is 15mb.doubt it could be the synonym size.

Note:

All these synonyms belongs to other schema in same database.

View 11 Replies View Related

SQL & PL/SQL :: Materialized Views - Take Statistics For Table Again?

Oct 26, 2012

I have created materialized view which hold few million records.Should i have to analyse the view and compute the statistics after i create the materialized view?

Also,just in case i need further indexing,should i have to take the statistics for the table again??

View 5 Replies View Related

Create Synonyms Of Another User's Tables

Jan 10, 2013

Suppose two users (CONNECT and RESOURCE roles) A and B who work on the same project. How can B create synonyms of all tables of A without asking admin to do that? Of course, we assume that these users have the CREATE SYNONYM privilege. My problem is that B does not have access to user_tables of A, so he cannot obtain the list of A's tables to create synonyms.

View 3 Replies View Related

Server Utilities :: Synonyms Compilation Error

Sep 23, 2010

I did an export from 8.1.7 and imported in 10g. All the tables were imported. I created all the users and gave them necessary grants. when i try to compile synonyms for this schema i imported,I get the following error in enterprise manager:

Failed to compile: ORA-00980: synonym translation is no longer valid

I cannot login to my application with these users even though they have all grants. I receive the following error:

FRM-40735:PRE-FORM trigger raised unhandled exception ORA-00942

When i click ok, the screen disappears.

View 11 Replies View Related

Replication :: Replicate One Table In Two Materialized Views At Same Time

Nov 11, 2008

I have a table in one database and I want to replicate it in another two databases with materialized views. The refresh may be fast. Is this possible?

View 1 Replies View Related

SQL & PL/SQL :: How To Check System Views When Create Table Privilege

Jan 4, 2013

I'm new to oracle DB,i've been given access to Oracle as a user. when i try to create a table under my default schema i get the insufficient privileges error.

How do i check from the system views if i have create table privilege under my own schema?

View 2 Replies View Related

Convert Some Existing Materialized Views (fast Refresh) To Partition Materialized Views

Jul 7, 2010

I have to convert some existing materialized views (fast refresh) to partition materialized views.

Database version is oracle 10.1.0.4. I have decided to use on prebuilt table option to do the partitioning as it minimizes the time to transfer from the master site.

1) stop replication
1) create interim tables with similar structure as the materialized views
2) transfer all data from the materialized views to the interim tables
4) script out the materialized views structure and add in on prebuilt table option in the scripts
5) drop the materialized views
6) rename the interim tables with the same name as the materialized views
7) run the scripts to create the materialized views with on prebuilt table option
8) refresh the newly created materialized views -> it should take a short time since I am using on prebuilt table option

But I am facing one major issue. That is if I drop the materialized views, the materialized view logs of the master tables are purged. When the materialized views are refreshed fast, there are some data missing. the data that are purged out when the materialized view are dropped.

Do you happen to know other ways that existing materialized views can be converted to partitioned materialized views? Do you have any workaround to prevent the materialized view logs from being purged?

View 3 Replies View Related

Server Administration :: User See Only Synonyms And Avoid Looking At Definitions

May 26, 2010

I have granted connect,resource privilege to a user 'TestU' and have create several synonyms in the schema using the public database link. What worries me is that the user 'TestU' can view the all_ and users_ dictionary views, which makes him accessible to all public database links and all user specific objects definition.

Is there a way to restrict the user to see only the synonyms and avoid looking at their definitions

View 6 Replies View Related

Server Utilities :: Expdp Using Remap_schema Will It Also Remap Grants And Synonyms

May 1, 2010

If I would be using expdp using remap_schema will it also remap grants and synonyms ?

View 5 Replies View Related

SQL & PL/SQL :: User Is Creating Original Item Code Without Mm

Mar 28, 2012

i have a field in one table called item_name based on which i am creating new item name as duplicate with new given length, for eg there is one item_code which has length of 12000mm i am going and replacing the string using instr function and replace function based on criteria that where i will find mm it will extract a portion and replace the new length as 6300mm.But its failing because some time user is creating the original item code without mm, is there a way.

Original:'H194x150x6x9x8x12000mm, 29.9 kg/m, ASTM A992M'
New : 'H194x150x6x9x8x6300mm, 29.9 kg/m, ASTM A992M'

comes some times he is entering mm and sometimes he is entering without mm as

Original:'H194x150x6x9x8x12000, 29.9 kg/m, ASTM A992M'
New : 'H194x150x6x9x8x12000, 29.9 kg/m, 6300'

View 5 Replies View Related

SQL & PL/SQL :: View Created With Compilation Errors / ORA-01775 - Looping Chain Of Synonyms

Jun 21, 2011

I created a view in DB2 .I copied the code of view from DB3 and created in DB1. The view got created but with compilation errors.

SQL>
SQL> CREATE OR REPLACE FORCE VIEW bala.cee_efacts_pie_order_v (cenumber,
2 installationid,
3 areanumber,
4 clli,
5 servicedate,
6 forecasttype,
7 jobid,
8 shippriority,
[code]....

I checked the status of view in user_objects , it was invalid.How to make it valid ?

View 11 Replies View Related

Export/Import/SQL Loader :: Grants And Synonyms While Importing Through Data Pump

Jul 22, 2012

OS: RHEL
DB: 11.2.0.2

Every time i try to refresh my production DB with the a old expdp dumpfile using data pump i always face the issue of grants and creation of synonym. I would like to tell you that my DB has three schemas which have lots of dependencies among them and before refreshing them i drop the schemas and recreate the same.

Drop user user_name cascade;So i want to know, is there a script from which i can get all the grants of the DB before dropping the schemas, so that after import i can grant the same and also a query with which i will be able to get all the synonyms of the DB.

View 8 Replies View Related

Server Utilities :: Indexes Parameters Original Impdp

Sep 25, 2011

As we know,there is a parameters named indexes of orignal imp,it use to generate create index ddl,Is there a parameter in impdp compare to it?

View 6 Replies View Related

RAC & Failsafe :: How To Prevent VIP Transfer Back To Its Original Node Location

Nov 11, 2012

Normally if node fails, VIP & resources are transferred to another node (clients need to failover).

if node is back again CRS detect this, make it as 'family member' and try transfer VIP & resources back to this node (clients will force to failover again).

this failover (despite of failover method I use) make each uncommitted transaction to be rolled back. client need to be disconnected from the service and VIP through they are connected to this service and they need reconnect to the new node - during this stage all DMLs modifications are gone, and need to be re execute.

View 11 Replies View Related







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