SQL & PL/SQL :: Not Getting Output For Other Schemas?
Feb 2, 2010
One function returns table metadata in xml form. This works for current schema but not for other schemas. Is it a privilege problem?
my code is..
CREATE OR REPLACE FUNCTION TEST.F_DBEG2
RETURN XMLTYPE
AS
Handle NUMBER;
V_OUTPUT_TOTAL XMLTYPE;
V_CNT NUMBER := 0;
BEGIN
[code]....
but when i select the object of another schema, got output.
SELECT * FROM TEST_NEW.DEPT;
Which privilege i need?
View 9 Replies
ADVERTISEMENT
Jul 1, 2013
DECLARE
JOBSFILE UTL_FILE.FILE_TYPE;
-- TAKE ALL JOB TITLES FROM JOBS
CURSOR JOBSCUR IS
SELECT *
-- DDOCNAME,DDOCTITLE,DSECURITYGROUP,DDOCAUTHOR,DDOCTYPE,DINDATE,PRIMARYFILE,EXTRACTIONDATE,BATCH_ID
FROM TARGET_UCM ;
[code].......
this is my plsql here to print table values i am using many utl_file.put_line statements is there any way to print all table values in a single utl_file.put_line.
View 2 Replies
View Related
Sep 25, 2013
Currently I have a requirement where I need to create 2 more output rows using each result row.
In my requirement I am populating charges table with types of charges, on each line item of charges, I need to apply 2 types of taxes and populate it along with the charge line item. I will be storing charges in table charges and the 2 taxes to be applied in taxes table respectively. For each row of charges, i need to apply these 2 taxes present in taxes table resulting in 3 rows output.
--Create tables charges
create table charges
(
charge_type varchar2(10) ,
charge number
);
[Code]....
My expected output should be like below:
Item_type amount
-------------------- ----------
charge1 100
Charge1_tax1 10
Charge1_tax2 20
charge2 200
Charge2_tax1 20
Charge2_tax2 40
how I can achieve the expected output using a single sql query
View 6 Replies
View Related
Jan 8, 2013
Is there any way to run a select command between 2 different schemas without using DB links ?
View 1 Replies
View Related
Jun 6, 2012
I'm trying to get the Create-Statements of all tables of several schemas:
SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name,'<schmema>')
FROM (SELECT TABLE_NAME, OWNER FROM SYS.ALL_TABLES WHERE owner='<schema>') u
Is there a way to create a loop to handle several schemas listed in a array, for example?
View 10 Replies
View Related
Feb 25, 2013
I want to find difference between the objects(tables(columns,constraints), views, sequences) in two schemas. One schema is staging and one is development . In development lot of changes are made , Is there a script or a opensource tool which will bring out the difference in columns, constraints in each table and sequences , views etc.
View 2 Replies
View Related
Apr 27, 2011
I am trying to export schemas from 10g to 11g. The NLS_CHARACTERSET for 10g is WE8ISO8859P1 and the NLS_CHARACTERSET for 11g is WE8MSWIN1252. Is it fine or do I need to change the character set, so that I will be able to successfully do the export/import?
View -1 Replies
View Related
Jul 14, 2011
I have a role mfg_grp .I want to know, to whom the role is granted and which objects and which privileges on those objects are assigned to this role.
View 4 Replies
View Related
Sep 16, 2013
I need to retrieve the list of tables with same name from 2 different schemas.
View 10 Replies
View Related
May 25, 2011
I have following schemas in my database scott,sh,hr...I created a triger on a schema scott with the following method
1. sqlplus / as sysdba
2. CREATE TABLE LOGIN_AUDIT_INFO_ALL (
operation VARCHAR2(30),
obj_owner VARCHAR2(30),
object_name VARCHAR2(30),
sql_text VARCHAR2(64),
attempt_by VARCHAR2(30),
attempt_dt DATE);
3.CREATE OR REPLACE TRIGGER login_audit_prod_schemas
AFTER CREATE OR ALTER OR DROP
ON SCOTT.SCHEMA
[code]....
But it don't fulfill my requirement. trigger is fired when scott perform any action. but my requirment is that trigger should be fired when create action is performed on scott by hr,sh or scott. i also want a single trigger which fulfill the requirement.
View 8 Replies
View Related
May 19, 2013
i have schema A and i want to check who(which schemas) can access schema A's objects and what privileges other schemas have on objects of schema A.
View 7 Replies
View Related
Feb 6, 2013
i am trying to generate a SUM from the individual schemas to put on this report but i can't seem to get it right...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1252">
<meta name="generator" content="SQL*Plus 11.2.0">
<TITLE>Launch page </TITLE></head>
<body>
<table border='1' width='90%' align='center' summary='Script output'>
[code].....
View 1 Replies
View Related
Aug 5, 2013
find the below task. I have unique schemas. and every schema we have many tables.I would like to know
1. I have Scott schema and here I have 10 tables. EMP,DEPT,SALGARDE ( and these tables having different priviliges).
2. another schema MACIN having table DEPT, SALS, GRADE ( having different priviliges) Now I would like to know Schema 1 having permissions to see the tables and he is doing some modifications,inserting,deleting .... on tables containing in MACIN schema.like this it is happening in vice verse in max schemas. now I would like to know who all are having access to login to another schema and what are the priviliges they have till now on what tables they applied changes...is it possible to figure out? if yes how can we?
View 6 Replies
View Related
Sep 22, 2013
After successfully installing the 12c, how can I connect to pdb to use the scott or hr schemas?By default when I connect as sys or system from sqlplus it is connecting to orcl not to pdborcl.also how can we make scott connection in sql developer.
View 11 Replies
View Related
Apr 17, 2013
My primary objective was to compare objects in schemas in two different databases and find out the differences, Execute DDL's in the database where objects are missing and syn schemas in two different databases.
So I need to compare schemas in databases. Which tool will be user friendly to make a comparison of database objects existing in schemas in two different databases.
I'd like to see if I can get a list of pro and cons between Toad and SQL Developer for comparing schemas pros and cons. How to make a comparison. I have some idea on using TOAD but was not familiar with SQL Developer.
Below is my requirement:-
Connect to Source
Connect to Target
Compare schemas with different object types
Find out differences
Generate DDL's for the missing objects or for the objects in difference report
Run them in missing instace(Source/Target)
Make sure both are in sync.
View 2 Replies
View Related
Apr 19, 2010
I connect to an Oracle-10g database using OEM, and if I click to see the list of users, roles, storage options, ... everything is ok, but if I click to see the list of schemas, I get "1031: insufficient privileges" error.
The user account I use has the SELECT_ANY_DICTIONARY privilege and SELECT_CATALOG_ROLE role granted, and if I try to do "select * from dba_tables" in the SQL*Plus, I get a result.
The matter is even more strange because, if I use the SYSTEM account, I get the same error (!!!).
Do I need any other privilege/role to see the user's schemas with OEM?
View 2 Replies
View Related
Jul 25, 2010
Is it possible to create two objects in different schemas in a single database.
For example in Schema A, table "T1" is there, is to possible to create a table with the same name "T1" in Schema B.
View 4 Replies
View Related
Jan 20, 2011
I have two schemas with 149 tables in each schema, what I need to do is to prove that the content(data) between the two schemas is identical. I know that all the table names between the two schemas are the same, just need to prove that there is no difference in data.
So the query needs to prove that Schema A content = Schema B content
I know I cant do a simple select from Schema A.tab1 minus select Schema B.tab1 but since there are 159 tables, I am not sure if this is an efficient way of doing it.
View 14 Replies
View Related
Oct 13, 2013
Database: 12cR1, 12.0.1.0, x64System: Oracle Linux 6.4, x64
I installed a simple starter database during the installation of Oracle Database 12cR1 with the PDBORCL option selected (default) and would like to install the Oracle Example data, such as users HR schema, etc.
according to URL....IDENTIFIED BY hr *ERROR at line 1:ORA-65096: invalid common user or role name
Perhaps the scripts were not designed for container and plug-able databases. I did the following:
alter pluggable database pdborcl open;alter session set container=PDBORCL;@?/demo/schema/human_resources/hr_main.sqlUser altered. Grant succeeded.Grant succeeded.Connected.GRANT execute ON sys.dbms_stats TO hr
*ERROR at line 1:ORA-01917: user or role 'HR' does not exist
I could probably create a normal database, but I wonder if there is any other option without having to modify the setup scripts.
View 2 Replies
View Related
Jun 12, 2012
Im using APEX 4.0. We startet with APEX 2.2 and upgraded it till 4.0. Database is 10g
The application generates emails which schould be send by APEX background job via APEX_MAIL.PUSH_QUEUE. Currently no mails will be send. Mails are added to APEX_MAIL_QUEUE only. I don´t see anything in columns MAIL_SEND_COUNT and MAIL_SEND_ERROR. Administrators of email server say that they don´t see any attempt to send the mails in our mail queue in mail server logs.
It´s possible to send mails with UTL_SMTP!There is no error produced by APEX push_queue background job.But there are several jobs running:
Schema: FLOWS_030100
Job: wwv_flow_mail.pusch_queue(...)
Job: wwv_flow_cache.purge_sessions(..)
Schema: APEX_0400000
Job: wwv_flow_mail.pusch_queue(...)
Ok, it´s possible that´s this is an error of our database administrator.
1. Shouldn´t I see the two background jobs (push_queue, purge_sessions) in schema APEX_0400000?
2. Should I kill push_queue job in schema FLOWS_030100? Where schould the jobs run?
3. How can I debug push_queue? Even if I run it manually I don´t get any return values/errors?
4. Must the jobs have job id 4002 and 4001?
View 3 Replies
View Related
Mar 11, 2012
There are two different DBs having similar schema. Need to compare the rows in the tables and insert in the 1st DB whatever is different in 2nd DB.
Can I choose which rows to insert which to discard from 2nd DB in 1st DB.
View 2 Replies
View Related
Oct 19, 2011
I would like to know the Replication method which is fast and the best approach,we need two schemas to be moved/replicated to a new reporting database.It appears that data is to be flown in one way,do we proceed with Materialized view replication or please clarify about Oracle Streams and Advanced replication. what are the factors to decide the replication method.
View 3 Replies
View Related
Jan 10, 2013
RDBMS Version:11.2.0.3
Both source and Target DBs are in Grid Infrastructure version : 11.2.0.3
Planning to Migrate RHEL 5.4 to Solaris 10
Currently we have 3 schemas with a combined size of 4 Terabyte in 11.2.0.3 RAC ASM in RHEL 5.4. All these 3 schemas share one tablespace which has around 150 datafiles.
We want to move these 3 schemas to a Solaris RAC DB with ASM.
If we use Transportable tablespace , should there be any down time for Target DB ?
View 6 Replies
View Related
Feb 7, 2013
We have 2 apex schemas
APEX_030000
APEX_040200
Before executing the apxchpwd.sql, found the "alter session command" sets schema to APEX_030000. So we changed that to APEX_040200. Then we executed the sql script. It executed fine.
But now when we try to login to apex, and pressing enter after providing the username/pwd, it raises the following exception
Error Error in PLSQL code raised during plug-in processing.
ORA-06508: PL/SQL: could not find program unit being called
View 1 Replies
View Related
Aug 23, 2012
DB version : 11.2.0.2 Enterprise Edition
Platform : RHEL 5.6
I have an expdp dump of a schema (HRTB_AP_PROD). I wanted to create 3 schemas from this dump in one go. So i tried this
## The parfile I used
DIRECTORY=DPUMP_DIR
DUMPFILE=HRTB_AP_PROD%u.dmp
LOGFILE=TheThreeSchemas-imp.log
remap_schema=HRTB_AP_PROD:HRTB_AP_DEV1
remap_schema=HRTB_AP_PROD:HRTB_AP_DEV2
remap_schema=HRTB_AP_PROD:HRTB_AP_DEV3
exclude=statistics
parallel=2
nohup impdp '/ as sysdba' parfile=impdp-aug23.par &But i encountered
ORA-39046: Metadata remap REMAP_SCHEMA has already been specified.When I googled it found the following link in which Dean Says , it is not possible.
Re: one dump file inport into multiple schema
So, I had to run 3 separate imports (impdp) to do this.
This is a bit wierd. I am surprized that Oracle guys haven't done anything about this . This is like DB2 !
View 2 Replies
View Related
Dec 9, 2010
findout and to fill up the excel which lists down the Database schemas and states whether they have in active / or not.
Active state may be determined whether it has been used for the last 3 months or so. The last updated time may be a good indicator of the same.
View 2 Replies
View Related
Jul 8, 2011
I have a lot of shemas inside an instance... How to organize them?
What I see is a long list of schemas which could be difficult to manage if number of schemas grows up... For example, I'd like to group Schema_1, Schema_2 and Schema_3 in something like Group_1, so it could be seen more organized.
Group_1
Schema_1
Schema_2
Schema_3
Sometimes a java or .net application uses 3 or 4 schemas... these schemas are in the same instance which has other schemas for other applications.
View 2 Replies
View Related
Apr 17, 2013
My primary objective was to compare objects in schemas in two different databases and find out the differences, Execute DDL's in the database where objects are missing and syn schemas in two different databases. So I need to compare schemas in databases. make a comparison of database objects existing in schemas in two different databases. I'd like to see if I can get a list of pro and cons between Toad and SQL Developer for comparing schemas pros and cons. navigation in SQL Developer to compare schemas.
Connect to Source
Connect to Target
Compare schemas with different object types
Find out differences
Generate DDL's for the missing objects or for the objects in difference report
Run them in missing instace(Source/Target)
Make sure both are in sync.
View 2 Replies
View Related
Jan 24, 2013
The best way to structure my schemas within a single Oracle instance to support multiple project development. At the moment, within an Oracle instance I have Area_Dev and Area1_Test schemas, with the intention that Project Xv1.0 would use Dev schema for development and Test schema for testing.
Lets say I want to start on Project Xv2.0 development while I am still finalizing Project Xv.10 development what is the best way of accommodating that, without creating individual schemas for each project?
View 3 Replies
View Related
Oct 11, 2012
I need to export only the data from schemas or tables, how to do that with Oracle Data Pump? when we use schemas parameter this export all schema, not only the data right?
View 7 Replies
View Related