Quantcast
Channel: dbschemareader Discussions Rss Feed
Viewing all articles
Browse latest Browse all 166

New Post: Reading Oracle DB Schema?

$
0
0
After the schema is read into memory as datatables, there's a post-read process where the model is turned into a rich object model, and then it links up all the references. For instance, bidirectional links between table and column, and between indexes and constraints.

The rich model is great and useful, but that's several times the memory of the original plain datatables, which won't have been disposed until it's all finished.

Over a few hundred tables that's still workable- but it looks like you've hit the limit. 5k tables + 5k views within a single schema is pretty big.

If you're using databaseReader.ReadAll(), it's loading stored procedures and packages (and sources) as well, which in an average Oracle database is pretty huge.
ReadAll() does several calls that are available individually- AllUsers(), AllTables(), AllViews() and AllStoredProcedures() (the latter is functions and packages too).
You can try just with .AllTables() - it also does constraints + indexes so it's still a rich model.

If you still hit problems with the smaller model, there's a lighter way of working with the API. databaseReader.TableList() which just retrieves a list of table names. Then you can hit databaseReader.Table(tableName) for specific tables. Loading the model this way means it only has specific tables, and you can't navigate across foreign keys if the other side isn't loaded. This API might be a better fit.

HTH

Viewing all articles
Browse latest Browse all 166

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>