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:
00863075
Vues:
19
Thanks Kelly,

This actually makes a lot more sense now...

This is just a test for me to see if I can get to work with the oracle provider. I'm trying to get my bus objects to work with it, and it works with the exception of the database prefixes which screws with my 'tablename'...

I may have to rethink this and add an optional DataBasePrefix and embed that into each command as needed...

Pretty lame that you can't select a data base directly, but with the Logon at least I might be able to test. Don't know if that is a realistic requirement though - you wouldn't want to have everybody logging in as the 'owner' fo the database...

+++ Rick ---



>Hi, Rick. As you can tell, Mark is quite the Oracle guru (doesn't that seem redundant?). I'm not sure he answered this part directly for you, though I may have missed it.
>
>> Every example I looked at uses no schema prefixes - they just connect and fire away at select * from customers. So how are they doing
>> this? Would this be a database that only has a single (default schema) then? But that can't be it either since they are uysually
>> using sample data...
>
>I've been using Oracle for over 3 years now and the terminology they use still baffles me, like it does you. Mark's much more apt to use the correct terminology. But those samples you are talking about tend to use the "scott" sample schema. There is also a "scott" login (assuming samples have been installed for the Oracle instance). Near as I can tell, a login automatically gains direct access to any objects stored within its schema and the schema is automatically created as soon as you create the login. So, the samples usually login with scott/tiger and have access to tables within the "scott" schema, without needing prefixes.
>
>If you are setting up a new schema for your own testing/demo, I suggest that you create a login with whatever name you want and then you will be allowed to create tables and select/specify that new login name as the schema for those tables. Then, when you use that login, you will be able to access the objects (e.g. tables) within that schema sans prefixing.
>
>If you are working with something an Oracle DBA already created, I'd do as Mark suggested and generate a script that you can execute to set up all of the synonyms, which also would allow you to access the tables without prefixes. Assuming that you wanted to access a "production" schema (login + database objects) named ORAPROD from a "test" schema (login) named ORATEST, you could execute something like this and save the results as a script text file to execute.
>
>
>select 'CREATE SYNONYM ORATEST.' || rtrim(table_name) || ' FOR ORAPROD.' || rtrim(table_name)
>  from all_tables
> where owner = 'ORAPROD'
> order by table_name
>
>
>"all_tables" is a system view so you may have to have a DBA run this for you if you are working in someone else's environment.
>
>HTH.
>
>Kelly
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform