A select from internal partition crashes Oracle
I have the following INTERNAL partitioned table and local index by BUREAU_CODE:
CREATE TABLE fin_mea (
fin_mea_uid NUMBER NOT NULL,
fiscal_month_uid NUMBER NOT NULL,
fiscal_year_uid NUMBER NOT NULL,
bureau_code VARCHAR2(3) NOT NULL,
main_acct_code VARCHAR2(4),
sub_acct_code VARCHAR2(3),
net_amt NUMBER(23,2))
PARTITION BY RANGE (fiscal_month_uid)
INTERVAL (1)
(PARTITION fmea_initial VALUES LESS THAN (200501) );
CREATE INDEX fin_mea_bureau_idx ON fin_mea (bureau_code ASC) LOCAL;
When I try to select rows from non-existing partition with a condition which uses indexed column Oracle crashes with 'End of communication channel' error:
SELECT * FROM fin_mea partition for (201301) a where a.bureau_code = 'ZZZ'
The following one works even no rows selected:
select * from (SELECT * FROM fin_mea partition for (201301)) a where a.bureau_code = 'ZZZ';
If I delete index then first query works with no problem:
SELECT * FROM fin_mea partition for (201301) a where a.bureau_code = 'ZZZ'
Is this a bug or am I doing something wrong?
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
The following is the full script. I renamed field names and removed tablespace section.
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 19 18:23:38 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> drop table fin_mea;
Table dropped.
SQL> CREATE TABLE tfs.fin_mea (
2 fin_mea_uid NUMBER NOT NULL,
3 field2 NUMBER NOT NULL,
4 fiscal_month_uid NUMBER NOT NULL,
5 field4 NUMBER NOT NULL,
6 field5 NUMBER NOT NULL,
7 field6 NUMBER NOT NULL,
8 field7 NUMBER NOT NULL,
9 field8 VARCHAR2(24) NOT NULL,
10 field9 NUMBER NOT NULL,
11 bureau_code VARCHAR2(3) NOT NULL,
12 field11 VARCHAR2(3),
13 field12 VARCHAR2(3),
14 field13 NUMBER(4),
15 field14 NUMBER(4),
16 field15 VARCHAR2(1),
17 field16 VARCHAR2(4),
18 field17 VARCHAR2(3),
19 field18 NUMBER(4),
20 field19 NUMBER(4),
21 field20 NUMBER(5),
22 field21 VARCHAR2(3),
23 field22 VARCHAR2(2),
24 field23 NUMBER(4),
25 net_amt NUMBER(23,2))
26 PARTITION BY RANGE (fiscal_month_uid)
27 INTERVAL (1)
28 (PARTITION fmea_initial VALUES LESS THAN (200501) )
29 PCTFREE 10
30 INITRANS 1
31 MAXTRANS 255
32 NOCACHE
33 MONITORING
34 NOPARALLEL
35 LOGGING
36 /
Table created.
SQL>
SQL> CREATE INDEX tfs.fin_mea_org_idx ON tfs.fin_mea LOCAL
2 (bureau_code ASC
3 )
4 PCTFREE 10
5 INITRANS 2
6 MAXTRANS 255
7 NOPARALLEL
8 LOGGING
9 /
Index created.
SQL>
SQL> SELECT * FROM fin_mea partition for (201301) a where a.bureau_code = 'ZZZ';
SELECT * FROM fin_mea partition for (201301) a where a.bureau_code = 'ZZZ'
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Similar Messages
-
Table Partitionining - Insert on primary select from previous partition
Hello,
I have a large table storing log data from the application. I want to query this table <TABLEA> and insert the result data to another table <TABLEB>.
At the same time another query is running selecting only from <TABLEB>.
I want to create 2 partitions on the TABLEB where the insert query will use one partition and the select query the second partition.
How can i do that ?alekons wrote:
Hello,
I have a large table storing log data from the application. I want to query this table <TABLEA> and insert the result data to another table <TABLEB>.
At the same time another query is running selecting only from <TABLEB>.
I want to create 2 partitions on the TABLEB where the insert query will use one partition and the select query the second partition.
How can i do that ?what type of partitioning was used?
Oracle support the following partitioning methods:
Range partitioning - data is mapped to partitions based on a range of column values (usually a date column)
Hash partitioning - data is mapped to partitions based on a hashing algorithm, evenly distributing data between the partitions.
List partitioning - data is mapped to partitions based on a list of discrete values.
Interval partitioning - data is mapped to partitions based on an interval
Composite partitioning - combinations of the above methods
Range-Hash partitioning - data is partitioned by range, then hashed to sub-partitions.
Range-List partitioning - data is partitioned by range, then to sub-partitions based on a value list.
Range-range partitioning
List-range partitioning
List-hash partitioning
List-list partitioning
Interval partitioning, an extension of range partitioning. New partitions are automatically added.
System partitioning, application controlled partitioning.
Reference partitioning, partitioned like a parent table (referenced in a referential constraint). -
Data selection from internal table.
Hi all,
Can anyone suggest me the replacement of the statement:
Select sum( col1 ) from table into var1 where col2 = 'abc' and col3 like '1.%' or col3 = 1.
above statement works on database table but i need the same query on an internal table.
please tell me.
Thanks in advance
RahulPLEASE HELP !
points will be awarded. -
Hi,
i need to select data from some internal table.
data : wa_vcera type /BIC/ASUSP00 .
"VCERA" is not defined in the ABAP Dictionary as a table, projection view, or database view.
What should I do?
Thanks
RadkaHi Radka,
If you want to process itab records you can loop at itab or you can read the records.
You declared work area not a internal table, it cant hold multiple records.
Can you please bit clear?
Siri.
Message was edited by: Srilatha T -
SELECT from MySQL, INSERT into Oracle
Hallo,
I am new to Java.
My task is to collect data from about 30 tables inside MySQL database and then insert it to similar tables in Oracle.
Script should copy data one a day, during the night.
Number of rows in each table is about 30,000.
MySQL version 5.1
Oracle version 11.1.7
Both of them are installed on really fast servers.
The way i would do it is:
1. connect to MySQL
2. connect to Oracle
3. select data from MySQL table and insert it to Oracle table.
repeat this step for each table
More precise about SELECT and INSERT:
handle_one = "SELECT a, b, c FROM mysql_table1";
while(handle_one is true)
INSERT a, b, c INTO oracle_table1;
4. close MySQL connection
5. close Oracle connection
Is it best way?
Best Regards
slkslkLinuxUser wrote:
Script should copy data one a day, during the night.
Number of rows in each table is about 30,000.There are variations on the above depending on what the above two statements mean. -
SELECTING FROM INTERNAL TABLES
hi i have an internal table say i_fpla which has two records. from this internal table i want to get the first row( or any one row) and put it into another internal table. can u plss tell me how to do it.
Hi there
Lets say you have 2 records in tbl_tab1 and you want to put the records into another internal table say tbl_tab2.For this:
1. Define work areas for both the internal tables . lets say they are wa_tab1 which is of the same type as tbl_tab1 and wa_tab2 which is of the same type as tbl_tab2.
DATA: wa_tab1 like line of tbl_tab1,
wa_tab2 like line of tbl_tab2.
2. Now if you have a specific key in tbl_tab1 and you want to read a particular record with some condition then u can simply read table tbl_tab1 into the work area and then whichever fields you want to copy into wa_tab2 you can and simpyl append this to tbl_tab2.
READ TABLE tbl_tab1 into wa_tab1 with key field 1 = 'X'.
wa_tab2-field1 = wa_tab1-field1.
append wa_tab2 to tbl_tab2.
This will append a particular record to tbl_tab2.
X is some value for field1 which you want to read.
3.if you want to move both the records to tbl_tab2 then simply loop through this table.
loop at tbl_tab1 into wa_tab1.
wa_tab2-field1 = wa_tab1-field1.
append wa_tab2 to tbl_tab2.
endloop.
Both your records will get appended to tbl_tab2.
Hope this helps.
Cheers
shivika
Message was edited by:
Shivika Bhorchi -
Selecting from partition is taking too much time
The SEARCH_MEMBE_PROVIDER_ROLLUP is partitioned with range-list partition
ROLLUP_ID --range (about 30 partitions ) and other column with list subpartitioned (about 48)
*indexes on columns
b-tree global index on ROLLUP_ID
bitmap local index on ROLLUP_ID, MEMBERONE_ID_1010
bitmap local index on MEMBERONE_ID_1010*
I could not figured it out as some partition's data is coming fast and some partition's data is not coming at all(taking 18 minutes)
any help would be greatly appreciated and please let me know if need more information
Please see the following information
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for HPUX: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> explain plan for SELECT COUNT (1)
2 FROM (SELECT LY.MEMBERONE_ID_1010
3 FROM (SELECT *
4 FROM (SELECT dr.*
5 FROM MEMBERONE_last1year dr)) ly
6 WHERE 1 = 1
7 AND LY.MEMBERONE_ID_1010 IN (SELECT RP.MEMBERONE_ID_1010
8 FROM SEARCH_MEMBE_PROVIDER_ROLLUP RP
9 WHERE RP.rollup_id = 7));
Explained.
SQL> @utlxplp
PLAN_TABLE_OUTPUT
Plan hash value: 677376773
| Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 18 | 84 | | |
| 1 | SORT AGGREGATE | | 1 | 18 | | | |
| 2 | NESTED LOOPS SEMI | | 154K| 2707K| 84 | | |
| 3 | INDEX FULL SCAN | IX1_MEMBERONE_LAST1YEAR | 2701K| 20M| 75 | | |
| 4 | PARTITION RANGE SINGLE | | 64749 | 632K| 84 | 7 | 7 |
| 5 | PARTITION LIST ALL | | 64749 | 632K| 84 | 1 | 48 |
| 6 | BITMAP CONVERSION TO ROWIDS| | 64749 | 632K| 84 | | |
|* 7 | BITMAP INDEX SINGLE VALUE | IX3_SEARCH_MEMBE_PROVIDER_ROLL | | | | 289 | 336 |
Predicate Information (identified by operation id):
7 - access("RP"."ROLLUP_ID"=7 AND "DR"."MEMBERONE_ID_1010"="RP"."MEMBERONE_ID_1010")
Note
- cpu costing is off (consider enabling it)
23 rows selected.
*THE ABOVE QUERY is taking more than 18 minutes*
========================
*THE BELOW QUERY is taking not even two seconds*
SQL> SELECT COUNT (1)
2 FROM (SELECT LY.MEMBERONE_ID_1010
3 FROM (SELECT *
4 FROM (SELECT dr.*
5 FROM MEMBERONE_last1year dr)) ly
6 WHERE 1 = 1
7 AND LY.MEMBERONE_ID_1010 IN (SELECT RP.MEMBERONE_ID_1010
8 FROM SEARCH_MEMBE_PROVIDER_ROLLUP RP
9 WHERE RP.rollup_id = 11));
COUNT(1)
131575
Elapsed: 00:00:01.53
SQL> explain plan for SELECT COUNT (1)
2 FROM (SELECT LY.MEMBERONE_ID_1010
3 FROM (SELECT *
4 FROM (SELECT dr.*
5 FROM MEMBERONE_last1year dr)) ly
6 WHERE 1 = 1
7 AND LY.MEMBERONE_ID_1010 IN (SELECT RP.MEMBERONE_ID_1010
8 FROM SEARCH_MEMBE_PROVIDER_ROLLUP RP
9 WHERE RP.rollup_id = 11));
Explained.
Elapsed: 00:00:00.03
SQL> @utlxplp
PLAN_TABLE_OUTPUT
Plan hash value: 3092271485
| Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
| 0 | SELECT STATEMENT | | 1 | 18 | 80 | | | | | |
| 1 | SORT AGGREGATE | | 1 | 18 | | | | | | |
| 2 | PX COORDINATOR | | | | | | | | | |
| 3 | PX SEND QC (RANDOM) | :TQ10002 | 1 | 18 | | | | Q1,02 | P->S | QC (RAND) |
| 4 | SORT AGGREGATE | | 1 | 18 | | | | Q1,02 | PCWP | |
|* 5 | HASH JOIN RIGHT SEMI | | 70780 | 1244K| 80 | | | Q1,02 | PCWP | |
| 6 | PX RECEIVE | | 208K| 2034K| 6 | | | Q1,02 | PCWP | |
| 7 | PX SEND HASH | :TQ10001 | 208K| 2034K| 6 | | | Q1,01 | P->P | HASH |
| 8 | PX BLOCK ITERATOR | | 208K| 2034K| 6 | 1 | 48 | Q1,01 | PCWC | |
|* 9 | TABLE ACCESS FULL| SEARCH_MEMBE_PROVIDER_ROLLUP | 208K| 2034K| 6 | 481 | 528 | Q1,01 | PCWP | |
| 10 | BUFFER SORT | | | | | | | Q1,02 | PCWC | |
| 11 | PX RECEIVE | | 2701K| 20M| 75 | | | Q1,02 | PCWP | |
| 12 | PX SEND HASH | :TQ10000 | 2701K| 20M| 75 | | | | S->P | HASH |
| 13 | INDEX FULL SCAN | IX1_MEMBERONE_LAST1YEAR | 2701K| 20M| 75 | | | | | |
Predicate Information (identified by operation id):
5 - access("DR"."MEMBERONE_ID_1010"="RP"."MEMBERONE_ID_1010")
9 - filter("RP"."ROLLUP_ID"=11)
Note
- cpu costing is off (consider enabling it)
30 rows selected.
Elapsed: 00:00:00.54
SQL> spool offthanks againHi
1) there are two major differences between the plans: serial vs parallel and NESTED LOOPS SEMI vs HASH JOIN SEMI
2) NESTED LOOPS look like a bad choice here, and it also looks like the optimizer badly underestimates it's real cost. Which is a bit odd, because it knows that the outer rowsource has 2701K, i.e. the inner operation would have to be executed 2701K times. Looks like an optimizer glitch, which brings us to the point that Dan has already raised here: you shouldn't be running on an old unsupported version
3) regarding serial vs parallel: it could be due to difference in session settings (ALTER SESSION ENABLE/DISABLE PARALLEL QUERY)
4) the two plans have different values of the filter against rollup_id (7 vs 11), so one possible reason for different behavior is the histogram on SEARCH_MEMBE_PROVIDER_ROLLUP.rollup_id. If you can reproduce the issue on a test database, re-gather stats on this table without histograms (method_opt=>'for all columns size 1', no_invalidate=>false) and see if the problem goes away
Best regards,
Nikolay -
Hi All,
I have a table D_POSITION with partition created on record_date, key1 with Range-hash partition.
Previously I use to get the data by following this query.
SELECT * FROM D_POSITION PARTITION (P_20080331)
Recently I truncated the table and reinserted from the backup table.
Now this is giving me the 0 records. But for this partition we have more than 60000 records.
Please let me know where it went wrong....SELECT * FROM D_POSITION PARTITION (P_20080331)[/i]
It's not advisable to use the partition clause in the query. You should use the predicate(where clause) that will make Oracle choose the appropriate partition. -
Problems Faced with Partitions in Oracle 9i.
I have a doubt regarding the partitions in Oracle 9i can you please help me regarding this?
Create table t1
( x number,
y number,
z number);
insert into t1 values (1,1,1);
insert into t1 values (2,2,2);
insert into t1 values (3,3,3);
Create table t2
x number,
y number,
z number
partition by range(x)
partition p1 values less than(2),
partition p2 values less than(3),
partition p3 values less than(4),
partition p4 values less than(maxvalue)
alter table t2 exchange partition p1 with table t1;
SQL> alter table t2 exchange partition p1 with table t1;
alter table t2 exchange partition p1 with table t1
ERROR at line 1:
ORA-14099: all rows in table do not qualify for specified partition
WHAT DOES THIS ERROR MESSAGE MEAN? I AM NOT ABLE TO UNDERSTAND THIS? WHAT NEED's TO BE DONE TO RESOLVE THIS?
alter table t2 exchange partition p1 with table t1 WITHOUT VALIDATION;
SQL> SELECT * FROM T2;
X Y Z
1 1 1
2 2 2
3 3 3
SQL> SELECT * FROM T2 PARTITION(P1);
X Y Z
1 1 1
2 2 2
3 3 3
SQL> SELECT * FROM T2 PARTITION(P2);
no rows selected
SQL> SELECT * FROM T2 PARTITION(P3);
no rows selected
(i) Why i am facing this error ORA-14099: while partitioning? Can you please brief me about this ?
(ii) why there is not data's in the PARTITIONS p2 &p3 after the partitions is exchanged WITHOUT VALIDATION options?
what is going with this method?
(iii) Also can you please explain me with an example how to partitions a table having milliion of records with EXCHANGE PARTITION Options with MULITPLE partition segment's (say partition based on status id column with 6 differnt values i am thinking to use list partitions using status_id as partition key) ?
Also i have tried the below approch is this a right approch? please correct me if i am wrong.
Create table t1
( x number,
y number,
z number);
insert into t1 values (1,1,1);
insert into t1 values (2,2,2);
insert into t1 values (3,3,3);
commit;
Create table t2
x number,
y number,
z number
partition by range(x)
partition p1 values less than(2),
partition p2 values less than(3),
partition p3 values less than(4),
partition p4 values less than(maxvalue)
SQL> insert into t2 select * from t1;
3 rows created.
SQL> commit;
Commit complete.
SQL> SELECT * FROM T2 PARTITION(P1);
X Y Z
1 1 1
SQL> SELECT * FROM T2 PARTITION(P2);
X Y Z
2 2 2
SQL> SELECT * FROM T2 PARTITION(P3);
X Y Z
3 3 3
SQL> SELECT * FROM T2 PARTITION(P4);
no rows selected
EXPLAIN PLAN
FOR SELECT * FROM T2 WHERE X = 1
| Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 9 | 2 | | |
| 1 | TABLE ACCESS FULL | T2 | 1 | 9 | 2 | 1 | 1 |
Now my question is what is problem instead of using EXCHANGE PARTITION why caun't we follow this above approch?
to partition a non-partitioned table?
Thanks,
Rajesh.The value of 3 should obviously should go into the partition P3.Then why are you putting it into p1?
Your command,
<tt> alter table t2 exchange partition <b>p1</b> with table t1;</tt>
will swap partition p1 with the contents of table t1, leaving you with partition p1 containing the three values that were in t1. At first it told you there were rows in t1 that did not belong in that partition, but you used FORCE so it put them in anyway.
btw there are notes in the FAQ about how to use ** tags to format your posts.
~Edited by: William Robertson on Oct 15, 2008 6:49 AM~ -
I want to do a query that returns data only from last two partitions
I have this select that returns data from one partition only.
select *
from tsieven PARTITION(P200707_2Q)
I would like to have something like this for example...
select *
from tsieven PARTITION(P200707_2Q and P200707_1Q)Oracle version is 9i
Partition method (MAX VALUE): TO_DATE(' 2006-04-16 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
Usually the partition is divided by 15 days. starts in the begin of the month and ends in 15th of the same month.
Partition column: DATA_CRIACAO
I'm trying to to this query:
select tsieven.loptica, tsieven.data_evento Data_Distribuicao
from tsieven (PARTITION MAX), tgirnos n, tsiobje o
where tsieven.no_evento = n.COD_NO
and tsieven.loptica = o.loptica
and to_char(tsieven.data_evento,'dd-mm-yyyy') = to_char(p_data,'dd-mm-yyyy')
and o.cod_classe = p_classe
and n.COD_TIPO_NO='2'
and tsieven.COD_T_EVEN = 'EMZ'
and n.cod_no = p_cdp
order by tsieven.loptica
For example I need to get data for sysdate from 27th of july it's not in this last partition, because it started a new one in 1st of august.
Hope I'm being clear now.
Thanks for your help. -
Unable to delete data from a partition
Hi,
Unable to delete data from a partition
I am using the command as:
ALTER TABLE TEST DROP PARTITION DATE_20090820090000
Its giving 0 rows deleted.Bu there are 200 rows for the Partition.
The partition is getting deleted but the data remains.
I want a command where the data in the partition also to be deleted along with partition.
Any help will be needful for meSQL> CREATE TABLE range_part (
prof_history_id NUMBER(10),
person_id NUMBER(10) NOT NULL,
organization_id NUMBER(10) NOT NULL,
record_date DATE NOT NULL)
PARTITION BY RANGE (record_date) (
PARTITION yr0 VALUES LESS THAN (TO_DATE('01-JAN-2007','DD-MON-YYYY'))
PARTITION yr7 VALUES LESS THAN (TO_DATE('01-JAN-2008','DD-MON-YYYY'))
PARTITION yr8 VALUES LESS THAN (TO_DATE('01-JAN-2009','DD-MON-YYYY'))
PARTITION yr9 VALUES LESS THAN (MAXVALUE) );
Table created.
SQL> INSERT INTO range_part VALUES (1, 1, 1, SYSDATE-720);
INSERT INTO range_part VALUES (2, 2, 2, SYSDATE-360);
INSERT INTO range_part VALUES (3, 3, 3, SYSDATE-180);
INSERT INTO range_part VALUES (4, 4, 4, SYSDATE);
1 row created.
SQL>
1 row created.
SQL>
1 row created.
SQL>
1 row created.
SQL>
SQL> commit;
Commit complete.
SQL> SELECT * FROM range_part;
PROF_HISTORY_ID PERSON_ID ORGANIZATION_ID RECORD_DATE
1 1 1 31-AUG-2007 05:53:22
2 2 2 25-AUG-2008 05:53:22
3 3 3 21-FEB-2009 05:53:22
4 4 4 20-AUG-2009 05:53:22
SQL> SELECT * FROM range_part PARTITION(yr7);
PROF_HISTORY_ID PERSON_ID ORGANIZATION_ID RECORD_DATE
1 1 1 31-AUG-2007 05:53:22
SQL> alter table range_part drop partition yr7;
Table altered.
SQL> SELECT * FROM range_part PARTITION(yr7);
SELECT * FROM range_part PARTITION(yr7)
ERROR at line 1:
ORA-02149: Specified partition does not exist
SQL> SELECT * FROM range_part;
PROF_HISTORY_ID PERSON_ID ORGANIZATION_ID RECORD_DATE
2 2 2 25-AUG-2008 05:53:22
3 3 3 21-FEB-2009 05:53:22
4 4 4 20-AUG-2009 05:53:22 -
Help me please to migrate from MS SQL to Oracle
Hi all,
we are in process of migration from MS SQL to Oracle.
Please help me to perform the same in Oracle:
select number+1 as rowid,number*6+1 as rowbeg,number*6+6 as rowend
from master.dbo.spt_values
where type='P'
Our Oracle version:
select * from v$version
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
5 rows selected.996831 wrote:
Here is another solution without "connect by":
select 1 as rnum, 1 as rowbeg, 6 as rowend from dual
union all
select rownum+1 as rnum,rownum*6+1 as rowbeg,rownum*6+6 as rowend
from all_objects
1
1
6
2
7
12
3
13
18
4
19
24
5
25
30
6
31
36
7
37
42
(et cetera).
This needs the user to have access on all_objects view and it will limit the result upto the numbers of objects returned by the all_objects view. -
Selecting from a view when tables are in more than one schema problem
I give up where am I missing it. Why is the ORA-01031 error being generated on the view u1.bv1. In testing even if I give object access to u3 I still get the same errors:
SQL>
SQL> drop user u1 cascade;
drop user u1 cascade
ERROR at line 1:
ORA-01918: user 'U1' does not exist
SQL> drop user u2 cascade;
drop user u2 cascade
ERROR at line 1:
ORA-01918: user 'U2' does not exist
SQL> drop user u3 cascade;
drop user u3 cascade
ERROR at line 1:
ORA-01918: user 'U3' does not exist
SQL> drop role aRole;
drop role aRole
ERROR at line 1:
ORA-01919: role 'AROLE' does not exist
SQL>
SQL>
SQL> select user from dual;
USER
SYS
1 row selected.
SQL>
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Solaris: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
5 rows selected.
SQL>
SQL> create user u1 identified by u1 default tablespace users
2 quota unlimited on users;
User created.
SQL>
SQL> create user u2 identified by u2 default tablespace users
2 quota unlimited on users;
User created.
SQL>
SQL> create role aRole;
Role created.
SQL>
SQL> create user u3 identified by u3 default tablespace users;
User created.
SQL>
SQL> grant aRole to u3;
Grant succeeded.
SQL>
SQL> alter user u3 default role all;
User altered.
SQL>
SQL> grant create session to u3;
Grant succeeded.
SQL>
SQL> create table u1.t1(c1 number);
Table created.
SQL>
SQL> create table u2.t1(c1 number);
Table created.
SQL>
SQL> grant select on u2.t1 to u1;
Grant succeeded.
SQL>
SQL> create or replace view u1.bv1 as
2 select u1.t1.c1 as c1 ,u2.t1.c1 as c2
3 from u1.t1, u2.t1 where u1.t1.c1 = u2.t1.c1;
View created.
SQL>
SQL> grant select on u1.bv1 to aRole;
Grant succeeded.
SQL>
SQL> create or replace view u1.gv1 as select * from u1.t1;
View created.
SQL>
SQL> grant select on u1.gv1 to aRole;
Grant succeeded.
SQL>
SQL> connect u3/u3
Connected.
SQL>
SQL> select * from u1.bv1;
select * from u1.bv1
ERROR at line 1:
ORA-01031: insufficient privileges
SQL>
SQL> select * from u1.gv1;
no rows selected
SQL>
SQL> spool offUser u1 cannot do a grant on a view to other user if the view uses tables from other schemas unless you do a "with grant option" grant.
You need to do the following to make it work:
SQL> grant select on u2.t1 to u1 with grant option;
Grant succeeded.
SQL> -
hi all,
hope i'm in the right forum. i have 2 databases sitting in 2 separate machines. 1 installed with Oracle 9i and 1 with Oracle 10g. I'm trying to select a partitioned table in 9i remotely (from the 10g db). In order to do that, I've created a synonym in 10g pointing to the partitioned table in 9i.
In 9i, if i do a select "select count(*) from tableA partition (p1)", i'm able to grab the correct count of the partition. But when i use the same select statement in 10g, it's grabbing all the data of the table, sum of all partitions. it looks like the partition qualifier specified in the select statement has no effect. Can i know what is the problem? hope to get some response a.s.a.p. tq
regards,
yklI did recreate your same situation, and actually the result is the same. I get that result when using a synonym. If I use <table name>@<db link> instead of synonym, then the result is different :
ORA-14100: partition extended table name cannot refer to a remote object
(internal unpublished bug 3076633, fixed in 10.2)
In my case I can solve the problem using partition key, instead of partition name, that is
SQL> select count(*) from <partition table synonym> where <partition key> = <value>;
instead of
SQL> select count(*) from <partition table synonym> partition(<partition name>);
Paul -
Select * from tab is not working in oracle 10g
select * from tab is not working in oracle 10g. But at the same time,
select * from <<table>> is working.
Please advise me.This works for me in 10.2.0.2
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
LOAN_DETAIL TABLE
PLAN_TABLE TABLE
...
Maybe you are looking for
-
Only first row of dynamic table saves to pdf
Please help me with this. I have a dynamic table in an xdp that can grow by adding rows (called details). This appears to work in the browser, when I edit. However, when I save to pdf, only the top row saves. Any idea why the entire table is not
-
I dont know if im in the wrong place but Im looking for a white MacBook Pro
I dont know if im in the wrong place but Im looking for a white MacBook Pro, I was told the white is cheaper but its not advertised anymore so I had to talk in here to get info? Can somebody please help.THANKS! <Email Edited by Host>
-
Should we Use cache seeding iBots to pre-cache the reports ?
Hi Everyone, We have requirement from client to improve the performance of some reports.We have a very old RPD and it is really huge so we don't want to do much on database side for performance tuning. Will it be a good idea to use cache seeding iBot
-
Hi gurus, I am creating a Business Rule based on a Data Source coming from a Query. I need to apply a filter, but I can not check any values when creating the filter (check image below). Could you please help me? Thanks, Kind regards,
-
How to crop a video clip for subsequent animation
I have several video clips that I'd like to crop (either with Motion or FCE 3.5) and then animate using Motion, but I'm not sure how to approach the problem. Specifically, the clips in question are interviews, and my intent is to crop out extra backg