473,395 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Snapshot Materialized view : how to ?

Hi

I'm a bit lost with snapshot creation, so can I have an easy (but with
all details : *.ora, user grants, *.sql, db links, ...) example of
snapshot between :

Server1 :
instance : I1
oracle user : user1
table : user1.table1

Server2 :
instance : I2
oracle user : user2
snapshot : user2.table1 as select * from user1.table1;

Thank you for your examples.

Bernard
bs*******@free.fr
http://bsegonnes.free.fr
Jul 19 '05 #1
5 7941
bs*******@free.fr (Bernard Segonnes) wrote in message news:<cc*************************@posting.google.c om>...
Hi

I'm a bit lost with snapshot creation, so can I have an easy (but with
all details : *.ora, user grants, *.sql, db links, ...) example of
snapshot between :

Server1 :
instance : I1
oracle user : user1
table : user1.table1

Server2 :
instance : I2
oracle user : user2
snapshot : user2.table1 as select * from user1.table1;

Thank you for your examples.

Bernard
bs*******@free.fr
http://bsegonnes.free.fr


Hi,
Please do the following.

Locate Server1 and get the Tnsnames entry from the Tnsnames.ora file.

Paste this entry in the Tnsnames.ora file of the server2.

I am assuming that you are trying to connect to server1 from server2.

Please find out the schema name and password for User1.

assuming userid= user1 and password =password.
Please query the following against the database on sever1.
Global Database Name would be the output from Select * from
global_name.
Service Name would be the output from Select * from v$database.

Assuming that the above queries fetched me the following results.

Global Database Name = sap.patni.com
Service Name = sap

You should have a create database link priviledge to create the link.
Please ask your DBA to provide it to you.

Please run the following to create the link.

create database link sap.patni.com
connect to user1 identified by password
using 'sap';

I think creating a snapshot is easier than making it work through a
database link. :-)

Aamir
Jul 19 '05 #2
mo************@patni.com (Mohammad Aamir) wrote in message news:<46**************************@posting.google. com>...
bs*******@free.fr (Bernard Segonnes) wrote in message news:<cc*************************@posting.google.c om>...
Hi

I'm a bit lost with snapshot creation, so can I have an easy (but with
all details : *.ora, user grants, *.sql, db links, ...) example of
snapshot between :

Server1 :
instance : I1
oracle user : user1
table : user1.table1

Server2 :
instance : I2
oracle user : user2
snapshot : user2.table1 as select * from user1.table1;

Thank you for your examples.

Bernard
bs*******@free.fr
http://bsegonnes.free.fr


Hi,
Please do the following.

Locate Server1 and get the Tnsnames entry from the Tnsnames.ora file.

Paste this entry in the Tnsnames.ora file of the server2.

I am assuming that you are trying to connect to server1 from server2.

Please find out the schema name and password for User1.

assuming userid= user1 and password =password.
Please query the following against the database on sever1.
Global Database Name would be the output from Select * from
global_name.
Service Name would be the output from Select * from v$database.

Assuming that the above queries fetched me the following results.

Global Database Name = sap.patni.com
Service Name = sap

You should have a create database link priviledge to create the link.
Please ask your DBA to provide it to you.

Please run the following to create the link.

create database link sap.patni.com
connect to user1 identified by password
using 'sap';

I think creating a snapshot is easier than making it work through a
database link. :-)

Aamir

Actually database links are a prerequisite for snapshots.
So what are you talking about?

Sybrand Bakker
Senior Oracle DBA
Jul 19 '05 #3
Thanks for your answers.

After 3 days of reshearches I've finaly created my snapshot. It
wasn't really clear from Oracle PDF documentation !

- I didn't knew a database link was required to have a snapshot.
- I didn't knew SYS couldn't create a database link (nor snapshot) for
another user.
- I didn't knew the 'dual' stuff.
- Oracle in not case sensitive when you type commands. But it IS case
sensitive for the ORACLE_SID.
- etc...

I wish the next Oracle version will have a better documentation for
beginer :-)

So here is the few lines I was looking for (for 3 days !) :

connect sys/sys as sysdba;
grant create database link to user2;
grant create materialized view to user2;
connect user2/user2;
create database link I1 connect to user1 identified by user1 using
'I1';
create materialized view testmv as select * from
user1.myTable@I1,dual;
Jul 19 '05 #4
bs*******@free.fr (Bernard Segonnes) wrote in message news:<cc*************************@posting.google.c om>...
Hi

I'm a bit lost with snapshot creation, so can I have an easy (but with
all details : *.ora, user grants, *.sql, db links, ...) example of
snapshot between :

Server1 :
instance : I1
oracle user : user1
table : user1.table1

Server2 :
instance : I2
oracle user : user2
snapshot : user2.table1 as select * from user1.table1;

Thank you for your examples.

Bernard
bs*******@free.fr
http://bsegonnes.free.fr
Hi,
Please do the following.

Locate Server1 and get the Tnsnames entry from the Tnsnames.ora file.

Paste this entry in the Tnsnames.ora file of the server2.

I am assuming that you are trying to connect to server1 from server2.

Please find out the schema name and password for User1.

assuming userid= user1 and password =password.
Please query the following against the database on sever1.
Global Database Name would be the output from Select * from
global_name.
Service Name would be the output from Select * from v$database.

Assuming that the above queries fetched me the following results.

Global Database Name = sap.patni.com
Service Name = sap

You should have a create database link priviledge to create the link.
Please ask your DBA to provide it to you.

Please run the following to create the link.

create database link sap.patni.com
connect to user1 identified by password
using 'sap';

I think creating a snapshot is easier than making it work through a
database link. :-)

Aamir
Jun 27 '08 #5
mo************@patni.com (Mohammad Aamir) wrote in message news:<46**************************@posting.google. com>...
bs*******@free.fr (Bernard Segonnes) wrote in message news:<cc*************************@posting.google.c om>...
Hi

I'm a bit lost with snapshot creation, so can I have an easy (but with
all details : *.ora, user grants, *.sql, db links, ...) example of
snapshot between :

Server1 :
instance : I1
oracle user : user1
table : user1.table1

Server2 :
instance : I2
oracle user : user2
snapshot : user2.table1 as select * from user1.table1;

Thank you for your examples.

Bernard
bs*******@free.fr
http://bsegonnes.free.fr

Hi,
Please do the following.

Locate Server1 and get the Tnsnames entry from the Tnsnames.ora file.

Paste this entry in the Tnsnames.ora file of the server2.

I am assuming that you are trying to connect to server1 from server2.

Please find out the schema name and password for User1.

assuming userid= user1 and password =password.
Please query the following against the database on sever1.
Global Database Name would be the output from Select * from
global_name.
Service Name would be the output from Select * from v$database.

Assuming that the above queries fetched me the following results.

Global Database Name = sap.patni.com
Service Name = sap

You should have a create database link priviledge to create the link.
Please ask your DBA to provide it to you.

Please run the following to create the link.

create database link sap.patni.com
connect to user1 identified by password
using 'sap';

I think creating a snapshot is easier than making it work through a
database link. :-)

Aamir

Actually database links are a prerequisite for snapshots.
So what are you talking about?

Sybrand Bakker
Senior Oracle DBA
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ozy | last post by:
how to create a snapshot view on a table that refreshes each time a table is updated (or inserted row)? Or, at least, how to refresh snapshot periodicaly, let's say, each 10 minutes? tnx
3
by: M. Mehta | last post by:
It seems that you can not create a materialized view if you are using outer joins...can someone please verify this? Thanks M. Mehta Please follow my example below: created 2 tables:
0
by: Geoff Bray | last post by:
I need to set the column types and lengths in my materialized view that is created with a select as. Anyone able to do this? Here's one of my gazillion attempts which gave me a syntax error. ...
6
by: Vincent LIDOU | last post by:
Do not trust values returned by materialized views under SQL Server without frequently checking underlying tables!!! I already posted this message under microsoft.public.sqlserver.server and I'm...
1
by: Hans-Jürgen Schönig | last post by:
hello ... i am running into a couple of questions regarding materialized view logs. my goal is to take data from an oracle database and replicate it to some remote data store (maybe some other...
4
by: Mairhtin O'Feannag | last post by:
Hello all ... hopefully without sounding too obtuse, we've run into a case where we need to persist the contents of a view for performance reasons. As I understand it (and I don't really)...
1
by: rumasinha | last post by:
Hi, I first created a materialized view that was based on the org striped views like po_headers hence the automatic refresh was not happening. After automatic complete refresh, the materialized...
0
by: sybrandb | last post by:
JamesLane <JamesLane03@yahoo.comwrote in message news:<3038611.1056489810@dbforums.com>... There is not Sybrand Bakker Senior Oracle DBA
2
by: Preeti Bajaj | last post by:
I created a materialized view log on table DUMMY_TAB as shown below: create materialized view log on DUMMY_TAB with primary key including new values; Primary key for the table DUMMY_TAB is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.