dbTalk Databases Forums  

A synonym question

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss A synonym question in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nsparta@gmail.com
 
Posts: n/a

Default A synonym question - 01-25-2008 , 01:54 PM






I have the following scenario:

- Tables and views are in Schema1 and Schema2
- Synonyms are created private under UserX

this works fine no problem.

Lately I created Schema3 and Schema4 to backup 1 and 2 respectively.
Now I want to access these new schemas logging with userX and using
the same synonyms, but the synonyms point to schema 1 and 2 how can I
switch the same synonyms to point to schema3 and 4 dynamically?

Thank You,
Ziko


Reply With Quote
  #2  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: A synonym question - 01-25-2008 , 02:14 PM






nsparta (AT) gmail (DOT) com wrote:
Quote:
I have the following scenario:

- Tables and views are in Schema1 and Schema2
- Synonyms are created private under UserX

this works fine no problem.

Lately I created Schema3 and Schema4 to backup 1 and 2 respectively.
Now I want to access these new schemas logging with userX and using
the same synonyms, but the synonyms point to schema 1 and 2 how can I
switch the same synonyms to point to schema3 and 4 dynamically?

Thank You,
Ziko

Not.

Accounts and schema's have a relationship. Your userX has
schemaX; schemaX has synonyms pointing to One.table_1
and One.view_1 (without going into the discussion whether
one stands for the account, or for the schema).
One belongs to user1 (which is schema1). You cannot
point to user4 'dynamically'.

Just drop the synonym, and re-create it while pointing to
the other schema.

The other schema's being backups, I fail to see the point
of this exercise. Do not touch your backup!

--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


Reply With Quote
  #3  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: A synonym question - 01-25-2008 , 02:14 PM



nsparta (AT) gmail (DOT) com wrote:
Quote:
I have the following scenario:

- Tables and views are in Schema1 and Schema2
- Synonyms are created private under UserX

this works fine no problem.

Lately I created Schema3 and Schema4 to backup 1 and 2 respectively.
Now I want to access these new schemas logging with userX and using
the same synonyms, but the synonyms point to schema 1 and 2 how can I
switch the same synonyms to point to schema3 and 4 dynamically?

Thank You,
Ziko

Not.

Accounts and schema's have a relationship. Your userX has
schemaX; schemaX has synonyms pointing to One.table_1
and One.view_1 (without going into the discussion whether
one stands for the account, or for the schema).
One belongs to user1 (which is schema1). You cannot
point to user4 'dynamically'.

Just drop the synonym, and re-create it while pointing to
the other schema.

The other schema's being backups, I fail to see the point
of this exercise. Do not touch your backup!

--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


Reply With Quote
  #4  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: A synonym question - 01-25-2008 , 02:14 PM



nsparta (AT) gmail (DOT) com wrote:
Quote:
I have the following scenario:

- Tables and views are in Schema1 and Schema2
- Synonyms are created private under UserX

this works fine no problem.

Lately I created Schema3 and Schema4 to backup 1 and 2 respectively.
Now I want to access these new schemas logging with userX and using
the same synonyms, but the synonyms point to schema 1 and 2 how can I
switch the same synonyms to point to schema3 and 4 dynamically?

Thank You,
Ziko

Not.

Accounts and schema's have a relationship. Your userX has
schemaX; schemaX has synonyms pointing to One.table_1
and One.view_1 (without going into the discussion whether
one stands for the account, or for the schema).
One belongs to user1 (which is schema1). You cannot
point to user4 'dynamically'.

Just drop the synonym, and re-create it while pointing to
the other schema.

The other schema's being backups, I fail to see the point
of this exercise. Do not touch your backup!

--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


Reply With Quote
  #5  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: A synonym question - 01-25-2008 , 02:14 PM



nsparta (AT) gmail (DOT) com wrote:
Quote:
I have the following scenario:

- Tables and views are in Schema1 and Schema2
- Synonyms are created private under UserX

this works fine no problem.

Lately I created Schema3 and Schema4 to backup 1 and 2 respectively.
Now I want to access these new schemas logging with userX and using
the same synonyms, but the synonyms point to schema 1 and 2 how can I
switch the same synonyms to point to schema3 and 4 dynamically?

Thank You,
Ziko

Not.

Accounts and schema's have a relationship. Your userX has
schemaX; schemaX has synonyms pointing to One.table_1
and One.view_1 (without going into the discussion whether
one stands for the account, or for the schema).
One belongs to user1 (which is schema1). You cannot
point to user4 'dynamically'.

Just drop the synonym, and re-create it while pointing to
the other schema.

The other schema's being backups, I fail to see the point
of this exercise. Do not touch your backup!

--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


Reply With Quote
  #6  
Old   
nsparta@gmail.com
 
Posts: n/a

Default Re: A synonym question - 01-25-2008 , 02:28 PM



On Jan 25, 3:14*pm, Frank van Bortel <frank.van.bor... (AT) gmail (DOT) com>
wrote:
Quote:
nspa... (AT) gmail (DOT) com wrote:
I have the following scenario:

- Tables and views are in Schema1 and Schema2
- Synonyms are created private under UserX

this works fine no problem.

Lately I created Schema3 and Schema4 to backup 1 and 2 respectively.
Now I want to access these new schemas logging with userX and using
the same synonyms, but the synonyms point to schema 1 and 2 how can I
switch the same synonyms to point to schema3 and 4 dynamically?

Thank You,
Ziko

Not.

Accounts and schema's have a relationship. Your userX has
schemaX; schemaX has synonyms pointing to One.table_1
and One.view_1 (without going into the discussion whether
one stands for the account, or for the schema).
One belongs to user1 (which is schema1). You cannot
point to user4 'dynamically'.

Just drop the synonym, and re-create it while pointing to
the other schema.

The other schema's being backups, I fail to see the point
of this exercise. Do not touch your backup!

--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up- Hide quoted text -

- Show quoted text -
The new created schemas are actually an archive not backup my
appologies.
I want to connect with the same user and dynamically switch between
main database and archive one.

Thank You,
Ziko


Reply With Quote
  #7  
Old   
nsparta@gmail.com
 
Posts: n/a

Default Re: A synonym question - 01-25-2008 , 02:28 PM



On Jan 25, 3:14*pm, Frank van Bortel <frank.van.bor... (AT) gmail (DOT) com>
wrote:
Quote:
nspa... (AT) gmail (DOT) com wrote:
I have the following scenario:

- Tables and views are in Schema1 and Schema2
- Synonyms are created private under UserX

this works fine no problem.

Lately I created Schema3 and Schema4 to backup 1 and 2 respectively.
Now I want to access these new schemas logging with userX and using
the same synonyms, but the synonyms point to schema 1 and 2 how can I
switch the same synonyms to point to schema3 and 4 dynamically?

Thank You,
Ziko

Not.

Accounts and schema's have a relationship. Your userX has
schemaX; schemaX has synonyms pointing to One.table_1
and One.view_1 (without going into the discussion whether
one stands for the account, or for the schema).
One belongs to user1 (which is schema1). You cannot
point to user4 'dynamically'.

Just drop the synonym, and re-create it while pointing to
the other schema.

The other schema's being backups, I fail to see the point
of this exercise. Do not touch your backup!

--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up- Hide quoted text -

- Show quoted text -
The new created schemas are actually an archive not backup my
appologies.
I want to connect with the same user and dynamically switch between
main database and archive one.

Thank You,
Ziko


Reply With Quote
  #8  
Old   
nsparta@gmail.com
 
Posts: n/a

Default Re: A synonym question - 01-25-2008 , 02:28 PM



On Jan 25, 3:14*pm, Frank van Bortel <frank.van.bor... (AT) gmail (DOT) com>
wrote:
Quote:
nspa... (AT) gmail (DOT) com wrote:
I have the following scenario:

- Tables and views are in Schema1 and Schema2
- Synonyms are created private under UserX

this works fine no problem.

Lately I created Schema3 and Schema4 to backup 1 and 2 respectively.
Now I want to access these new schemas logging with userX and using
the same synonyms, but the synonyms point to schema 1 and 2 how can I
switch the same synonyms to point to schema3 and 4 dynamically?

Thank You,
Ziko

Not.

Accounts and schema's have a relationship. Your userX has
schemaX; schemaX has synonyms pointing to One.table_1
and One.view_1 (without going into the discussion whether
one stands for the account, or for the schema).
One belongs to user1 (which is schema1). You cannot
point to user4 'dynamically'.

Just drop the synonym, and re-create it while pointing to
the other schema.

The other schema's being backups, I fail to see the point
of this exercise. Do not touch your backup!

--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up- Hide quoted text -

- Show quoted text -
The new created schemas are actually an archive not backup my
appologies.
I want to connect with the same user and dynamically switch between
main database and archive one.

Thank You,
Ziko


Reply With Quote
  #9  
Old   
nsparta@gmail.com
 
Posts: n/a

Default Re: A synonym question - 01-25-2008 , 02:28 PM



On Jan 25, 3:14*pm, Frank van Bortel <frank.van.bor... (AT) gmail (DOT) com>
wrote:
Quote:
nspa... (AT) gmail (DOT) com wrote:
I have the following scenario:

- Tables and views are in Schema1 and Schema2
- Synonyms are created private under UserX

this works fine no problem.

Lately I created Schema3 and Schema4 to backup 1 and 2 respectively.
Now I want to access these new schemas logging with userX and using
the same synonyms, but the synonyms point to schema 1 and 2 how can I
switch the same synonyms to point to schema3 and 4 dynamically?

Thank You,
Ziko

Not.

Accounts and schema's have a relationship. Your userX has
schemaX; schemaX has synonyms pointing to One.table_1
and One.view_1 (without going into the discussion whether
one stands for the account, or for the schema).
One belongs to user1 (which is schema1). You cannot
point to user4 'dynamically'.

Just drop the synonym, and re-create it while pointing to
the other schema.

The other schema's being backups, I fail to see the point
of this exercise. Do not touch your backup!

--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up- Hide quoted text -

- Show quoted text -
The new created schemas are actually an archive not backup my
appologies.
I want to connect with the same user and dynamically switch between
main database and archive one.

Thank You,
Ziko


Reply With Quote
  #10  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: A synonym question - 01-25-2008 , 03:00 PM



On Jan 25, 2:28*pm, nspa... (AT) gmail (DOT) com wrote:
Quote:
On Jan 25, 3:14*pm, Frank van Bortel <frank.van.bor... (AT) gmail (DOT) com
wrote:





nspa... (AT) gmail (DOT) com wrote:
I have the following scenario:

- Tables and views are in Schema1 and Schema2
- Synonyms are created private under UserX

this works fine no problem.

Lately I created Schema3 and Schema4 to backup 1 and 2 respectively.
Now I want to access these new schemas logging with userX and using
the same synonyms, but the synonyms point to schema 1 and 2 how can I
switch the same synonyms to point to schema3 and 4 dynamically?

Thank You,
Ziko

Not.

Accounts and schema's have a relationship. Your userX has
schemaX; schemaX has synonyms pointing to One.table_1
and One.view_1 (without going into the discussion whether
one stands for the account, or for the schema).
One belongs to user1 (which is schema1). You cannot
point to user4 'dynamically'.

Just drop the synonym, and re-create it while pointing to
the other schema.

The other schema's being backups, I fail to see the point
of this exercise. Do not touch your backup!

--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up- Hide quoted text -

- Show quoted text -

The new created schemas are actually an archive not backup my
appologies.
I want to connect with the same user and dynamically switch between
main database and archive one.

Thank You,
Ziko- Hide quoted text -

- Show quoted text -
Then you'll need to create additional synonyms pointing to your
archive schema objects or drop and recreate these synonyms so they
point to the desired objects; there exists no dynamic reconfiguration
of synonyms in Oracle.


David Fitzjarrell


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.