Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oracle help with connection string
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00862294
Message ID:
00862492
Vues:
13
>Another ignorant question in that same area: Is there any way to pre-select the active database/schema? I can access content now, but I have to prefix everything with a Database prefix.

No way to "pre-select" a schema. If you connect with the User ID that owns the tables, you can avoid prefixing the table names with the schema [User ID] name. Otherwise, the way Oracle handles this is to create a Synonym for the table. Something like:

CREATE PUBLIC SYNONYM MyTable FOR SCHEMA.MyTable

The MyTable synonym MUST be unique in the entire Oracle database across all schemas. So if Schema1 has a MyTable1 and Schema2 has a MyTable1, a MyTable1 public synonym can only point to one of them.

Each user can have a set of their own [private] synonyms that can point to any table in the Oracle database as long as that user has SELECT privs on the table. These synonyms only have to be unique to that User's ID.

Usually, the Oracle DBA will limit your ability to create a public synonym as this could screw up existing synonyms.

>The terminology of Oracle is really getting me here. Schema is what would be the equivalent of a SQL Server database?

Kind of. A schema is really just a [generic] User ID created for a specific app to be the owner of all the objects, including tables, created under that ID. The biggest difference is all of this is contained under the Oracle instance and can not be "detached" from the instance and "attached" to another Oracle instance. You have to perform an export function to get a "dump" file of all the objects and data. Then you can import that file into another instance of Oracle as long as any Roles defined in the original instance already exist in the new instance.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform