How to Avoid Redundant Indexes on Indexed Views
Let's say I have an indexed view - so far it only has a clustered index. I want to avoid redundant indexes. So let's say the view joins Customers and Orders. If I've already put a nonclustered index on every column in both base tables, it's a pretty sure
bet that adding nonclustered indexes to the view will be redundant, right? Or not? I'm not understanding this.
The indexes on the view are not redundant even if on the same columns as the base tables. The indexes on view columns materialize the result after joins and aggregations in the view query.
Columns should generally be indexed only if they are used in join or where clauses. An index on every column may be overkill.
Dan Guzman, SQL Server MVP, http://www.dbdelta.com
Similar Messages
-
How to create a Complex Organization Index Materialized View Example
Hi
I have a 11g database that I'm trying to create a complex Materialized View that I would like to make Organization Index? How do I specify what I want for a primary Key?
CREATE MATERIALIZED VIEW RCS_STG.MV_NEXT_HOP_iot
ORGANIZATION INDEX
AS
SELECT r2.resource_key, r1.resource_key resource_key2, r2.resource_full_path_name, device_name, device_model,
service_telephone_number, service_package_name, telephone_number.telephone_number_key, c1.created_on
FROM network_resource PARTITION (network_resource_subinterface) r1,
connection c1,
network_resource PARTITION (network_resource_subinterface) r2,
device d1,
tn_network_resource,
telephone_number
WHERE r1.resource_key = c1.resource1_key
AND c1.resource2_key = r2.resource_key
AND d1.device_key = r2.device_key
AND tn_network_resource.resource_key(+) = r2.resource_key
AND telephone_number.telephone_number_key(+) = tn_network_resource.telephone_number_key
UNION ALL
SELECT r1.resource_key, r2.resource_key resource_key2, r1.resource_full_path_name, device_name, device_model,
service_telephone_number, service_package_name, telephone_number.telephone_number_key, c1.created_on
FROM network_resource PARTITION (network_resource_subinterface) r1,
connection c1,
network_resource PARTITION (network_resource_subinterface) r2,
device d1,
tn_network_resource,
telephone_number
WHERE r1.resource_key = c1.resource1_key
AND c1.resource2_key = r2.resource_key
AND d1.device_key = r1.device_key
AND tn_network_resource.resource_key(+) = r1.resource_key
AND telephone_number.telephone_number_key(+) = tn_network_resource.telephone_number_key
I get an error message ORA-25175: no PRIMARY KEY constraint found
I would like to specify resource_key, resource_key2, and service_telephone_number as my primary key?Ah,
I get it now. This is what I did.
CREATE TABLE mv_next_hop_iot
resource_key NUMBER (38),
resource_key2 NUMBER (38),
resource_full_path_name VARCHAR2 (256 BYTE),
device_name VARCHAR2 (64 BYTE),
device_model VARCHAR2 (64 BYTE),
service_telephone_number VARCHAR2 (20 BYTE),
service_package_name VARCHAR2 (64 BYTE),
telephone_number_key NUMBER (38),
created_on DATE,
CONSTRAINT mv_next_hop_pk PRIMARY KEY (resource_key, resource_key2, service_telephone_number)
ORGANIZATION INDEX
CREATE MATERIALIZED VIEW rcs_stg.mv_next_hop_iot
ON PREBUILT TABLE
AS
/* Formatted on 2010/06/10 1:39:04 PM (QP5 v5.149.1003.31008) */
SELECT resource_key, resource_key2, resource_full_path_name, device_name, device_model, service_telephone_number,
service_package_name, telephone_number_key, created_on
FROM (SELECT r2.resource_key, r1.resource_key resource_key2, r2.resource_full_path_name, device_name, device_model,
NVL (service_telephone_number, ' ') AS service_telephone_number, service_package_name,
telephone_number.telephone_number_key, c1.created_on
FROM network_resource PARTITION (network_resource_subinterface) r1,
connection c1,
network_resource PARTITION (network_resource_subinterface) r2,
device d1,
tn_network_resource,
telephone_number
WHERE r1.resource_key = c1.resource1_key
AND c1.resource2_key = r2.resource_key
AND d1.device_key = r2.device_key
AND tn_network_resource.resource_key(+) = r2.resource_key
AND telephone_number.telephone_number_key(+) = tn_network_resource.telephone_number_key
UNION ALL
SELECT r1.resource_key, r2.resource_key resource_key2, r1.resource_full_path_name, device_name, device_model,
NVL (service_telephone_number, ' ') AS service_telephone_number, service_package_name,
telephone_number.telephone_number_key, c1.created_on
FROM network_resource PARTITION (network_resource_subinterface) r1,
connection c1,
network_resource PARTITION (network_resource_subinterface) r2,
device d1,
tn_network_resource,
telephone_number
WHERE r1.resource_key = c1.resource1_key
AND c1.resource2_key = r2.resource_key
AND d1.device_key = r1.device_key
AND tn_network_resource.resource_key(+) = r1.resource_key
AND telephone_number.telephone_number_key(+) = tn_network_resource.telephone_number_key)
Many thanks. the PREBUILT TABLE is the secret. -
How can I create index in a view?
Dear all,
How can I create index in a view?
Best Regards,
AmyA view is a stored query. It gets executed at run time. A view does not occupy any physical space in the database (other than the insignificant amount of space required to store the query in the data dictionary).
A materialized view actually materializes the results of a query in a separate table structure, so it consumes physical space in the database. It also has to be refreshed at some interval, either synchronously with DML or asynchronously on a set interval.
Justin -
How to create unique index on a View
Hi All,
11.2.0.1
How do I create an index on a view or any workaround that my view wont get duplicates?
SQL> create unique index indx01 on db_backup_details_vw(id);
create unique index indx01 on db_backup_details_vw(id)
ERROR at line 1:
ORA-01702: a view is not appropriate here
Thanks a lot,
KinzI'm thinking of using a distinct clause here.
if i get 5 duplicate rows in my selection set because of the join condition, can't i discard the remaining 4 using a distinct clause.
Observe this
SQL> select * from a;
T1 T2
1 4
2 4
3 4
SQL> select * from b;
T1 T2
1 4
2 5
in both a,b t1 is the primary key. so we'll write a join on t2 (non PK).
SQL> select b.t1,b.t2 from a,b where a.t2=b.t2;
T1 T2
1 4
1 4 -- duplicates
1 4
Now create view with distinct clause
create view ab as select distinct b.t1,b.t2 from a,b where a.t2=b.t2;
SQL> select * from ab;
T1 T2
---------- ---------- -- no duplicates
1 4
CSM -
Indexes in a view(how does it work?)
I have a view that makes a union query between too similar tables,
selecting equal fields in both, and the field I use in the where clause are the same in both too.
That's somenthing like this:
CREATE OR REPLACE VIEW TABLE_1 AS
SELECT T1.DESC_DATA
T1.TOTAL_DATA
FROM TABLE_1 T1
WHERE T1.COD = &COD_PARAMETER
UNION
SELECT T2.DESC_DATA
T2.TOTAL_DATA
FROM TABLE_2 T2
WHERE T2.COD = &COD_PARAMETER
The first table(TABLE_1) has to many rows, around 10 millon registers, so it has index for the field cod,
but the TABLE_2 has few registers, like 1000, and has no index created.
But when I run a query using the view TABLE_1 it goes to slowly, not using the index.
How do I have to proceed in this case?
Do I have to create index for the same index in TABLE_2?
TABLE_2 not having any indexes makes the view not use indexes?
Or is something else?
The version that I'm using is Oracle 9.2.0.4.0.We need more information like the explain plan.. Please look at this link about when the query is slow.
When your query takes too long ...
Thanks -
How to get the current slide Index or Id?
I can get the selected slide of presentation use blow method.
Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange, function (asyncResult) {
if (asyncResult.status == Office.AsyncResultStatus.Failed) {
write('Action failed. Error: ' + asyncResult.error.message);
else {
write('Selected slides: ' + JSON.stringify(asyncResult.value.slides));
But, How can I get the executor slide?Hi,
>> How to get the current slide Index or Id?
In my option, when you select a slide, it change to current slide. So, you could use the getSelectedDataAsync method to get the current slide, and then get the index or id by using the Slice object. You could refer the link below for Slice Object.
# Slice.index property (JavaScript API for Office)https://msdn.microsoft.com/EN-US/library/office/jj715285.aspx?f=255&MSPPError=-2147217396
Some key code as below:
<script>
function getText() {
Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange,
{ valueFormat: "unformatted", filterType: "all" },
function (asyncResult) {
var error = asyncResult.error;
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
write(error.name + ": " + error.message);
else {
// Get selected data.
var dataValue = asyncResult.value;
write('Selected data is ' + dataValue.slides[0].index);
// Function that writes to a div with id='message' on the page.
function write(message) {
document.getElementById('message').innerText += message;
</script>
>> How can I get the executor slide?
What do you mean by this? Is this a new issue which is different from the above issue? If so, I will recommend you post a new thread for this issue and share us more information about this.
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hello everyone.
I have a table (A) that stores point locations (X,Y) and contains the following fields:
ID NUMBER(10,0) No 1
CD_CODIGO_EMA VARCHAR2(10 BYTE) Yes 2
TX_NOMBRE_EMA VARCHAR2(50 BYTE) Yes 3
CD_PROVINCIA_EMA NUMBER(5,0) Yes 4
CD_MUNICIPIO_EMA NUMBER(5,0) Yes 5
NU_UTMX_EMA NUMBER(10,2) Yes 6
NU_UTMY_EMA NUMBER(10,2) Yes 7
NU_HUSO_EMA NUMBER(5,0) Yes 8
NU_TIPO_EMA NUMBER(3,0) Yes 9
TX_URL_EMA VARCHAR2(255 BYTE) Yes 10
I have created a view (V) with a field of type SDO_GEOMETRY values based on longitude (NU_UTMX_EMA) and latitude columns (NU_UTMY_EMA) in Table A, as follows:
CREATE VIEW A_VIEW (ID, SHAPE)
AS SELECT
ID, MDSYS.SDO_GEOMETRY(2001, 83030, MDSYS.SDO_POINT_TYPE(NU_UTMX_EMA, NU_UTMY_EMA, NULL), NULL, NULL)
FROM A
I have updated the view USER_SDO_GEOM_METADATA:
insert into user_sdo_geom_metadata values (
'A_VIEW',
'SHAPE',
MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT('Longitude',90000,630000,0.005),
MDSYS.SDO_DIM_ELEMENT('Latitude',3980000,4300000,0.005)
83030
I can see the spatial view in differentes clientes (for example, Geoserver and ArcMap). The problem is when I try to Zoom into the View I receive the message: Interface not supported without a spatial index+
If I try to make an spatial index on the view, I receive the message:
create index V_idx on A_VIEW(SHAPE) indextype is MDSYS.SPATIAL_INDEX;
ORA-01702 A view is nos appropiate here.
How can I fix it? The original table (A) has a spatial index and it works fine.
Thanks in advanceThis should be answered in your other post:
View with SDO_GEOMETRY column -
Index organized Materialized View in SQL Developer Datamodeler
Hello SQL Developer Datamodeler Team,
I'm using version 4.0.2.840 and looking for a how-to to change a MV to an IOMV.
So far I do the following:
Create Table in Relational Model
Create MV in Oracle 11g Physical Model
Double Click Table in Oracle 11g Physical Model
Set "Implement as MV" to my MV
OK
Now I can't find an option for index organized in Physical Model Materialized View properties.
The setting "Organization: Head/Index" for Physical Model MV-Basetable properties does not change the generated DDL.
Also, setting this to "Index" does not enable the window's "IOT Properties"-tab (like it does for normal tables).
Is it possible to create an Index organized Materialized View in current SQL Developer Datamodeler?
Thank you & Best regards,
BlamaHi Blama,
DDL for Index-organized Materialized Views is generated in the Early Adopter release 4.1.0.866, which is now available for download.
The Organization on the Table that is implemented as the Materialized View should be set to INDEX, and the Table's IOT properties will be used during DDL generation.
David -
How to calc storage prarams on INDEXES?
Can anyone recommend any good rules of thumb (or associated reading) on how to calculate
"good" values for index tablespace
allocations? Fox example, if I know the number and datatypes of my keys and the anticipated number of rows, can I workout
a viable INITIAL EXTENT value?Hi,
Sizing of Indexes
First we will have to find out how much data fits in to one block.
The size of the block header is approximately 161 bytes.
If your block size is 2k then this leaves
2048-161 = 1887 bytes available
Next factor is the pctfree setting.
While calculating an Indexs size we will have to keep pctfree in mind and
deduct that from the total size to find out the actual available size.
If you use a pctfree of 10, then
1887*(pctfree/100) = 1887*0.1=189 (rounded up)
Of the available free space, 189 bytes will be deducted.
1887-189=1698 (bytes available)
Of the 2048 bytes in the block, 1698 bytes are available for storing index
entries.
The next step is to calculate the space used per index entry.
To estimate the space used per index entry, you need to estimate the average
row length.
The average row length is the total of the average length of each value in a
row; for indexes you only need to be concerned about the indexed columns.
For example consider an index containing two columns, all of which are
varchar2 (10). The average row length cannot exceed 20.
Its actual length depends on the data that will be stored there.
If the sample data is available, then the VSIZE function can be used to
determine the average row length.
SELECT AVG (NVL (VSIZE (COLUMN1), 0))+
AVG (NVL (VSIZE (COLUMN2), 0)) AVG_ROW_LENGTH
FROM TABLENAME;
For example, in the sample two-columned index, assume that the average row
length for the indexed columns is 16 bytes. To that total add 1 byte for
each column in the index, for a total of 18 bytes per row. If the index has
columns that contain data that is more than 127 characters long, add an
extra byte for each such column.
Finally, add 8 bytes for the index entry header.
Space used per row = avg_row_length
+8 (for the header)
+ Number of columns
+ Number of long columns (250+)
Space used per row = 16
+8
+ 2
+ 0
=26 bytes per index entry
If the index is a unique index, add I to this total.
26 + 1 = 27 bytes per row
Given 1698 bytes available and 27 bytes per row, you can fit 62 index
entries in a block:
Entries per block = TRUNC (1698 free bytes/27 bytes per entry)
= 62 entries per block.
Since you can fit 62 entries in one block of 2k size you can estimate the
size of the index accordingly.
Creation of a different tablespace for Indexes
(check if you already have a tablespace for this purpose by querying the
data dictionary table dba_tablespaces )
create tablespace indexes
datafile 'd:\oracle\oradata\ocp1\index01.dbf' size 25M
default storage(
initial 250k
next 250k
maxextents unlimited
pctincrease 0
If you are creating a new index then use the following command
Alter table <table_name>
Add constraint <constraint_name> unique (column_name)
Using index tablespace indexes;
If you already have an index and you want to transfer it to the tablespace
created for this purpose then use the following command
Alter index <index_name> rebuild
Tablespace indexes
Storage (initial 2M next 2M pctincrease 0);
Rollback Segment Information:
The following data dictionary views give information about the rollback
segments.
DBA_ROLLBACK_SEGS
GV$ROLLSTAT
V$ROLLNAME
V$ROLLSTAT
with regards,
Boby Jose Thekkanath,
Dharma Computers(P) Ltd.
Bangalore-India.
www.dharma.com -
Script to find duplicate index and how can we tell if an index is REALLY a duplicate?
Does any one have script to find duplicate index? and how can we tell if an index is REALLY a duplicate?
RahulOne more written by Itzik Ben-Gan
The first query finds exact matches. The indexes must have
the same key columns in the same order, and the same included columns but in any order.
These indexes are sure targets for elimination. The only caution would be to check for index hints.
-- exact duplicates
with indexcols as
select object_id as id, index_id as indid, name,
(select case keyno when 0 then NULL else colid end as [data()]
from sys.sysindexkeys as k
where k.id = i.object_id
and k.indid = i.index_id
order by keyno, colid
for xml path('')) as cols,
(select case keyno when 0 then colid else NULL end as [data()]
from sys.sysindexkeys as k
where k.id = i.object_id
and k.indid = i.index_id
order by colid
for xml path('')) as inc
from sys.indexes as i
select
object_schema_name(c1.id) + '.' + object_name(c1.id) as 'table',
c1.name as 'index',
c2.name as 'exactduplicate'
from indexcols as c1
join indexcols as c2
on c1.id = c2.id
and c1.indid < c2.indid
and c1.cols = c2.cols
and c1.inc = c2.inc;
The second variation of this query finds partial, or duplicate, indexes
that share leading key columns, e.g. Ix1(col1, col2, col3) and Ix2(col1, col2)
would be considered duplicate indexes. This query only examines key columns and does not consider included columns.
These types of indexes are probable dead indexes walking.
-- Overlapping indxes
with indexcols as
select object_id as id, index_id as indid, name,
(select case keyno when 0 then NULL else colid end as [data()]
from sys.sysindexkeys as k
where k.id = i.object_id
and k.indid = i.index_id
order by keyno, colid
for xml path('')) as cols
from sys.indexes as i
select
object_schema_name(c1.id) + '.' + object_name(c1.id) as 'table',
c1.name as 'index',
c2.name as 'partialduplicate'
from indexcols as c1
join indexcols as c2
on c1.id = c2.id
and c1.indid < c2.indid
and (c1.cols like c2.cols + '%'
or c2.cols like c1.cols + '%') ;
Be careful when dropping a partial duplicate index if the two indexes differ greatly in width.
For example, if Ix1 is a very wide index with 12 columns, and Ix2 is a narrow two-column index
that shares the first two columns, you may want to leave Ix2 as a faster, tighter, narrower index.
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Use of substr function will avoid the use of indexes in a table
i have one table which will contain some 3,00,000 records, it contains some 11 primary keys i am using some update statements to update some fields in the records (of 3,00,000 i will compare some 1,50,000 records with 1,50,000 another records) i am using substr function in all the select statements. whether usage of substr function will avoid the use of index
can any one clarify?contains some 11 primary keys by this I suppose you mean to say the table has a composite PK on 11 columns.
i am using substr function in all the select statementsCould you please post your SQL statement? -
I'm a MB Pro beginner (after 25 years with PC). I have an Iomega ext HD, but how do get it indexed?, and it doesn't come up with any results I'm trying searches in Finder, and it says "searching Iomega drive" - but I don't think it's indexing. How do I force it to index?
Well I'm leaning the other way. I think my present MBP will be the last Apple product I buy.
With the way Apple is going, all New Mac computers are sealed unit that don't allow the user to upgrade them in any way. They are getting more expensive initially. They are impossible to fix, even by Apple. All the parts are either soldered to the Logic Board or glued inside the case parts. The add on warranty only covers manufacturing defects and is expensive. And to fix one out of waranty is close to if not more then a new system.
The only thing different in a Mac, and most other products Apple sells, is the operating system and the cases they come in. As for the OS both have their glitches and at this time there are no viruses that infect OS X. There is more software available for Windows. More choices as to what hardware you can use or upgrade to at a later date.
Mac computers are becoming large iPads or iPhones with built in keyboards.
jeremy_from_rome wrote:
And as for the question: PC or Mac, the consensus that I hear from colleagues and friends is just as you state it: stay with Mac, be patient, work at it, and you’ll never look back! Thanks again -
How to set and retrive the index log path stored by parameter LOG_DIRECTORY
how to set and retrive the index log path stored by parameter LOG_DIRECTORY.
http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/lsnrctl.htm#sthref72
http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/cmctl.htm#sthref239 -
Hi,
I have created 7 indexes on a view.
Its working fine for me.
Is it the right way or is there any limit for the number of indexes creation?
Can somebody please advice.
Thank you
--KumarThanks for your reply Reidelme
but i think the concept of insert/update/delete doesn't apply for this materialized view i guess because this view is like a snapshot of a table and
the insert/delete/update are done in the table and not in this View and this view needs to be refreshed once in a while.
I'm using this view for my discoverer report.
I have written a concurrent programme and before running the report, the users need to run the concurrent request so that the Materialized view is dropped and created again with indexes for updated data.
Rgds
--Kumar -
Is it possible to create a spatial index on a view?
Hi
Is it possible to create a spatial index on a view?
We would like to link our spatial tables to each other (using only one of the SDO_GEOMETRY fields) in a view & make it very easy so that anybody can work with the data.
Thanks Caroline.Simon,
In order for autoregistration to work, you first need to make sure that all entries in mdsys.sdo_geom_metadata_table are registered with SDE. All tables not just one schema. None of our spatial tables or views exist in the SDE schema.
Also make sure all Oracle Spatial tables in sde.table_registry are held in mdsys.sdo_geom_metadata_table.
When a user makes a database connection in ArcCatalog, all Oracle Spatial tables will be registered with SDE automatically. Also, entries will be inserted into mdsys.sdo_geom_metadata_table and indexes will be created. If you do not have primary key fields, you will have to Register with Geodatabase and it will create the OBJECTID field.
This did not work for us originally. but after cleaning up metadata and installing SP1, it is working now and it is very convenient.
VIEWS:
You have to create the view thru SDE. You cannot register foreign views. There are bugs in support of views containing SDO_GEOMETRY objects. I have been told some problems will be fixed in SP2 and there may be a patch out to address some others.
Here are the incidents I have filed in reference to views:
1.
I created a view consisting of a geometry column from a "foreign" Oracle
Spatial table (SDO_GEOMETRY) and corresponding attribution in another table.
I used the following command to create the view through SDE:
C:\arcgis\arcexe81\BIN>sdetable -o create_view -T gis_v_traffic -t
"trims_traffi c_geom,traffic" -c
"trims_traffic_geom.geometry,trims_traffic_geom.fid,traffic.i
d_number,traffic.aadt" -w "trims_traffic_geom.mslink = traffic.mslink" -u
gis -p spatial -i esri_sde -s JJ0DN10
ArcSDE 8.1 Build 832 Thu Mar 22 14:08:07 PST 2001 Attribute Administration
Utility ----------------------------------------------------- Successfully
created view gis_v_traffic.
I can preview the geometries in ArcCatalog without error.
However, when I try to select a feature in ArcMap I get the following error:
The instruction at "0x125222dd" referenced memory at "0x00000000". The
memory could not be "read".
I click ok.
Then I get this error:
The insruction at "0x5f8012d3" referenced memory at "0x00000004". the memory
could not be "read".
I click ok and ArcMap terminates.
I can select features from the spatial table the view is pointing to, but
not from the view itself.
2.
I need to create views utilizing database links to tie attribution in other
databases to geometries created for that data in a spatial database.
I issued the following command from command prompt and got this error:
C:\arcgis\arcexe81\BIN>sdetable -o create_view -T link_v_traffic -t
"trims_traff ic_geom,[email protected]" -c
"trims_traffic_geom.geometry,trims_traffic_ge
om.fid,[email protected],[email protected]" -w
"trims_t raffic_geom.mslink = [email protected]" -u gis -p
spatial -i esri_sd e -s JJ0DN10
ArcSDE 8.1 Build 832 Thu Mar 22 14:08:07 PST 2001 Attribute Administration
Utility ----------------------------------------------------- Error:
Underlying DBMS error (-51). Error: Unable to create view link_v_traffic
ORA-00957: duplicate column name (link_v_traffic)
3.
Spatial Views created on Oracle Spatial LRS layers containing SDO_GEOMETRY
objects are not recognized as feature classes unless they are created with
the sdetable -o create_view command.
Here is typical SQL for the view creation:
create or replace view trims_v_traffic as select a.geometry,
b.nbr_tenn_cnty, b.nbr_rte, b.spcl_cse, b.cnty_seq, b.tr_beg_log_mle,
b.tr_end_log_mle, b.yr_trfc, b.aadt, b.pct_peak_hr, b.dhv_pct, b.drct_distr,
b.vhcl_pass_pickups, b.vhcl_su_trk, b.vhcl_mu_trk, b.actl_cnt, b.updt_by,
b.updt_on, b.mslink, b.mapid, b.id_number, b.sta_nbr from
gis.trims_traffic_geom a, gis.traffic b where a.mslink = b.mslink;
The table containing the SDO_GEOMETRY object is registered with SDE in the
following manner:
C:\arcgis\arcexe81\BIN>sdelayer -o register -l trims_traffic_geom,geometry
-e slM -k SDO_GEOME
TRY -s JJ0DN10 -i esri_sde -u gis -p spatial -c fid -C SDE
A feature class is successfully created for this layer and the data can be
added successfully to a map.
However, there is no way of adding data to a map from a spatial database
view containing an SDO_GEOMETRY object which was created externally from
SDE.
We are using Oracle Spatial 8.1.7 on NT 4.0. We are also using ArcGIS 8.1
and ArcSDE 8.1.1.
4.
SDE does not support spatial database views which reference snapshot
objects.
I was unable to create a view using sdetable -o create_view which referenced
a snapshot object.
The snapshot was created using the following sql syntax:
CREATE SNAPSHOT SNP_TEST
BUILD IMMEDIATE
REFRESH FAST
ON DEMAND
AS
SELECT * FROM [email protected]
We are using ArcSDE 8.1.1 with Oracle 8.1.7 on NT 4.0.
Here are the permissions I granted, they need to be the same for every schema:
for sde (these are all the permissions that might be needed for any type of
activity - new install or upgrade)..lets just step through and go ahead and
grant them all...
grant create session to sde;
grant create table to sde;
grant create procedure to sde;
grant create sequence to sde;
grant create trigger to sde;
grant unlimited tablespace to sde;
grant select any table to sde;
grant create any sequence to sde;
grant create any procedure to sde;
grant execute any procedure to sde;
grant drop any procedure to sde;
grant select any sequence to sde;
grant create any view to sde;
grant drop any view to sde;
grant create any trigger to sde;
grant drop any sequence to sde;
each Oracle user will also need the following privileges...
grant create session to gis;
grant create table to gis;
grant create procedure to gis;
grant create sequence to gis;
grant create trigger to gis;
grant unlimited tablespace to gis;
Viewer
The viewer is allowed to connect to an ArcSDE database. Other users grant
select privileges on their tables and feature classes to the viewer or to
the public role. The DBA can create a role that can be granted select
privileges on data objects owned by other users. The role can be granted to
the viewer.
create session
select on other user's data objects
Editor
The editor is allowed to connect to an ArcSDE database. Other users grant
select and insert, update, or delete on data objects they own to editor. The
DBA may create a role that can be granted select, insert, update, and delete
privileges on data objects owned by other users. The role can be granted to
the editor.
create session
select, insert, update, or delete on other user's data objects
Creator
The creator is allowed to connect to an ArcSDE database and create data
objects. The creator may grant privileges on their
objects to other users or roles. Other users can grant select and insert,
update, or delete on data objects they own to creator. The DBA may create a
role that can be granted select, insert, update, and delete privileges on
data objects
owned by other users. The role can be granted to the creator:
create session
create table
create procedure
create sequence
create trigger
unlimited tablespace
select, insert, update, or delete on other user's objects
It might be worthwhile to rebuild your SDE metadata. I can walk you thru that if you need help.
Hope this helps.
Dave
null
Maybe you are looking for
-
Hi..How does one define an autoincrement row in oracle.In SQL Server they use IDENTITY .. Thanks for the help.
-
How do I speak with customer support if I don't know my serial number?
Customer support won't let me chat or call until I list my serial number for my computer. I don't have it with me right now but would still like to speak with them. Any thoughts?
-
Why do i need to use a credit card to do updates
I don't want to set up iTunes with a credit card, however, when I try to update something like iPhoto it requires me to have a credit card. If it is a free update then why do I need to put in a credit card number?
-
MDM Workflow (no Properties pane in MS Visio)
Hi, I am using SAP MDM version (5.5 SP5) (5.5.41.70) and workflow and MS Visio 2003 Professional. When we go to MDM Data manager and create a new workflow and then click on "Microsoft visio document", system take me to MS visio screen but not show me
-
Photoshop Elements 11 with retina display?
I just ordered Photoshop Elements 11 for my new Macbook Pro with retina display, but based on the discussion here, I am worried that it might not work correctly. Does anyone know if Elements 11 supports retina display? Thanks!