ORA-00942 table or view does not exist error in Relational Model Data Retrievel Wizard

Posts   
 
    
Marcel
User
Posts: 5
Joined: 25-Nov-2010
# Posted on: 25-Nov-2010 13:54:34   

I have an Oracle database with mulple schema's. When I select the schema that contains the tables in the Relational Model Data Retrieval Wizard I get the error message table or view does not exist. However when I select the schema in the database tool Aqua Data Studio the tables are shown. I use Oracle DBDriver using MS Oracle to retrieve the data. Aqua Data Studio uses a different driver.

Version LBLLGENPro: v3.0 Final October 1st Oracle driver version 3.0.06162010

Any ideas?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39898
Joined: 17-Aug-2003
# Posted on: 25-Nov-2010 14:23:10   

I'm sorry but I find your description too vague. When exactly do you get the error and is this an exception or a different message? Do you get the message after the refresh in the refresh log?

Also, have you tried the latest build ? We have released a newer build after october 1st.

Frans Bouma | Lead developer LLBLGen Pro
Marcel
User
Posts: 5
Joined: 25-Nov-2010
# Posted on: 25-Nov-2010 15:28:26   

Thank you for your fast response.

I have download and installed the latest version, but unfortunately it did not fix the issue.

These are the steps I take: 1. Select Relational Model Data 2. Add Relational Model Data From a Database 3. Select database driver Oracle 9i/10g/11g Driver (MS Oracle) 4. Enter username + password (data specific authentication) 5. Test Connection (succeeded) 6. Database is found and several schemas are shown. 7. Select the schema that contains the tables. 8. Receive exception message Exception type: OracleException ORA-00942: table or view does not exist

Stacktrace: LLBLGen Pro version 3.0. Build November 15th, 2010 -----[Core exception]-------------------- at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at SD.LLBLGen.Pro.DBDrivers.Oracle.OracleDBDriverBase.GetAllStoredProcedureNames(String catalogName, String schemaName) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.0\Drivers 3.0\Oracle\OracleDBDriverBase.cs:line 376 at SD.LLBLGen.Pro.Gui.Controls.WizardPages.MetaDataRetrievalWizard_Step_ElementSelection.PopulateSchema(TreeNode nodeToPopulate, TagEntry`1 tagData)

At first I thought is was a security issue, but I found out that I can access the information using another tool (Aqua Data Studio).

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 25-Nov-2010 21:38:55   

And are you connecting as the same user when you use the Aqua tool ?

Matt

Marcel
User
Posts: 5
Joined: 25-Nov-2010
# Posted on: 26-Nov-2010 07:34:09   

I found the problem. The database is an oracle 8i database. The database driver supports 9, 10 and 11.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 26-Nov-2010 08:07:57   

Correct. Oracle 8i has been phased out by Oracle. And starting from v.3.0 we stopped supporting Oracle 8i.

Marcel
User
Posts: 5
Joined: 25-Nov-2010
# Posted on: 26-Nov-2010 08:15:13   

I understand. Unfortunately customers do not always phase out databases when suppliers stop supporting it cry

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39898
Joined: 17-Aug-2003
# Posted on: 26-Nov-2010 09:26:36   

We did stop supporting it because it doesn't support some clauses we use in our queries to obtain meta-data and some, as you've seen, meta-data views. ODP.NET also doesn't support 8i anymore and neither does oracle.

I'll see what I can do for you, as MS Oracle in theory should support 8i still (and our generated code also should work on 8i).

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39898
Joined: 17-Aug-2003
# Posted on: 26-Nov-2010 12:05:14   

The query executed is: SELECT OBJECT_NAME, PROCEDURE_NAME FROM ALL_PROCEDURES WHERE OWNER='<schema>'

It seems your 8i doesn't have the system view 'ALL_PROCEDURES'. In v2.6, we used OleDb to obtain the procedure names (OleDbConnection.GetOleDbSchemaTable() ). In v3 we use DbProviderFactory and no OleDb anymore (as it often gave other problems), so we can't support 8i as we couldn't find a way to obtain the meta-data otherwise from 8i...

There are other problems: obtaining table/view field info, 8i's meta-data tables don't have the field 'CHAR_LENGTH', which is necessary to obtain lengths for some types.

so if you really need it, we can create a driver for MS Oracle (ODP.NET 10g and up doesn't support 8i, and the ODP.NET v9 doesn't work on newer windows versions... disappointed ) but it won't support stored procs and it might have a problem with some character types (like it also does in v2) where char length isn't determinable.

Frans Bouma | Lead developer LLBLGen Pro
Marcel
User
Posts: 5
Joined: 25-Nov-2010
# Posted on: 26-Nov-2010 14:42:43   

Thank you for the great service! It seems that the limitations of the 8i database itself causes the limitation. I found a workaround. I generate scripts for creating a new database and execute these scripts in a Oracle 9 database. I use this database with LBLGen Pro. As the 'normal' queries work on 8i this should work. The database does not change often so I do not need to generate scripts everytime.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39898
Joined: 17-Aug-2003
# Posted on: 26-Nov-2010 14:49:55   

Marcel wrote:

Thank you for the great service! It seems that the limitations of the 8i database itself causes the limitation. I found a workaround. I generate scripts for creating a new database and execute these scripts in a Oracle 9 database. I use this database with LBLGen Pro. As the 'normal' queries work on 8i this should work. The database does not change often so I do not need to generate scripts everytime.

That's indeed a good workaround simple_smile I'll close this thread for now. If you can't proceed with this workaround, please let us know and we'll see what we can do for you in the driver department. You can then just post in this thread to reopen it.

For the runtime queries: be sure you set ansijoins to false. By default it's true, and the joins will use join syntaxis which isn't supported on oracle 8i. By setting the OracleAnsiJoins setting to false using <add key="OracleAnsiJoins" value="false" /> in your application's config file, it will produce FROM a, b WHERE a.Foo(+) = b.Foo kind of queries which will work on 8i simple_smile

Frans Bouma | Lead developer LLBLGen Pro