![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, You'll have to forgive me if I don't use the right terms. I am nowhere near an Oracle programmer and don't know the proper termanology. But I hope you'll bear with me.... Something I'm working on accesses an Oracle database we have at the office. Now this database has hundreds tables in one area (schema?) and we can't change that. However, the program that's accessing it (which is an ASP thing) is timing out. And I suspect it's due to the number of tables and such that is there becuase it works fine with smaller databases. So, now, my issue is... what can we do in Oracle, without splitting up this schema, to pull over references to just a few tables at a time. For instance, if we have 10 tables that deal with podiatrists and that's all we want to look at is podiatrists and not all of the pediatricians and so forth, is there some way -- without moving the tables themselves -- to set up a view just to the podiatrist type information? Then I could set up an ODBC connection to that view (whatever it is or however it's done) and see just podiatrist information without the system trying to slog through all the doctors? Thanks in advance for whatever assistance you can give me. --== Hyper ==-- |
#3
| |||
| |||
|
|
Hi all, You'll have to forgive me if I don't use the right terms. I am nowhere near an Oracle programmer and don't know the proper termanology. But I hope you'll bear with me.... Something I'm working on accesses an Oracle database we have at the office. Now this database has hundreds tables in one area (schema?) and we can't change that. However, the program that's accessing it (which is an ASP thing) is timing out. And I suspect it's due to the number of tables and such that is there becuase it works fine with smaller databases. So, now, my issue is... what can we do in Oracle, without splitting up this schema, to pull over references to just a few tables at a time. For instance, if we have 10 tables that deal with podiatrists and that's all we want to look at is podiatrists and not all of the pediatricians and so forth, is there some way -- without moving the tables themselves -- to set up a view just to the podiatrist type information? Then I could set up an ODBC connection to that view (whatever it is or however it's done) and see just podiatrist information without the system trying to slog through all the doctors? Thanks in advance for whatever assistance you can give me. --== Hyper ==-- |
#4
| |||
| |||
|
|
Hi Hypermommy, thanks for writing this: Hi all, You'll have to forgive me if I don't use the right terms. I am nowhere near an Oracle programmer and don't know the proper termanology. But I hope you'll bear with me.... Something I'm working on accesses an Oracle database we have at the office. Now this database has hundreds tables in one area (schema?) and we can't change that. However, the program that's accessing it (which is an ASP thing) is timing out. And I suspect it's due to the number of tables and such that is there becuase it works fine with smaller databases. So, now, my issue is... what can we do in Oracle, without splitting up this schema, to pull over references to just a few tables at a time. For instance, if we have 10 tables that deal with podiatrists and that's all we want to look at is podiatrists and not all of the pediatricians and so forth, is there some way -- without moving the tables themselves -- to set up a view just to the podiatrist type information? Then I could set up an ODBC connection to that view (whatever it is or however it's done) and see just podiatrist information without the system trying to slog through all the doctors? Thanks in advance for whatever assistance you can give me. --== Hyper ==-- Unless your ASP code is attempting to retrieve data from every table in the database (which would surprise me), it shouldn't matter how many tables you have. So you need to narrow it down to the tables that are being used in the ASP and concentrate on those. When you say it works on a "smaller database," do you mean smaller as in fewer tables ... or do you mean smaller as in an Access (as opposed to an Oracle) database? Do you have a DBA or other support person whom you can contact if you have problems? I assume the ASP code for the SELECT (or SELECTs) has a WHERE clause to limit the data returned (maybe by selecting from a drop- down list). If it doesn't have a WHERE clause, then that's probably the error (since that would return every record in the table). Does the table have an INDEX defined (so you can more quickly retrieve just the records you're looking for)? Maybe you can post the relavent portion of the ASP code (where the SELECT clause is), so we have something more to go on. That is, if you have access to the ASP code. It could also be a web server parameter that's set too low, causing the pages to time out before they're displayed. It could also be a network issue. It could also be ... well, you get the point ... it's kinda hard to diagnose what's happening without more info regarding what you're trying to retrieve. -- [:%s/Karsten Farrell/Oracle DBA/g] |
#5
| |||
| |||
|
|
Hi Hypermommy, thanks for writing this: Hi all, You'll have to forgive me if I don't use the right terms. I am nowhere near an Oracle programmer and don't know the proper termanology. But I hope you'll bear with me.... Something I'm working on accesses an Oracle database we have at the office. Now this database has hundreds tables in one area (schema?) and we can't change that. However, the program that's accessing it (which is an ASP thing) is timing out. And I suspect it's due to the number of tables and such that is there becuase it works fine with smaller databases. So, now, my issue is... what can we do in Oracle, without splitting up this schema, to pull over references to just a few tables at a time. For instance, if we have 10 tables that deal with podiatrists and that's all we want to look at is podiatrists and not all of the pediatricians and so forth, is there some way -- without moving the tables themselves -- to set up a view just to the podiatrist type information? Then I could set up an ODBC connection to that view (whatever it is or however it's done) and see just podiatrist information without the system trying to slog through all the doctors? Thanks in advance for whatever assistance you can give me. --== Hyper ==-- Unless your ASP code is attempting to retrieve data from every table in the database (which would surprise me), it shouldn't matter how many tables you have. So you need to narrow it down to the tables that are being used in the ASP and concentrate on those. When you say it works on a "smaller database," do you mean smaller as in fewer tables ... or do you mean smaller as in an Access (as opposed to an Oracle) database? Do you have a DBA or other support person whom you can contact if you have problems? I assume the ASP code for the SELECT (or SELECTs) has a WHERE clause to limit the data returned (maybe by selecting from a drop- down list). If it doesn't have a WHERE clause, then that's probably the error (since that would return every record in the table). Does the table have an INDEX defined (so you can more quickly retrieve just the records you're looking for)? Maybe you can post the relavent portion of the ASP code (where the SELECT clause is), so we have something more to go on. That is, if you have access to the ASP code. It could also be a web server parameter that's set too low, causing the pages to time out before they're displayed. It could also be a network issue. It could also be ... well, you get the point ... it's kinda hard to diagnose what's happening without more info regarding what you're trying to retrieve. |
#6
| |||
| |||
|
|
Hmm ... I see your point. If you can't change the ASP without opening another can of worms (maintenance nightmares) and you can't change the schema (the ePortfolio application's Oracle userid that owns all the tables), then you don't have many options. Bad news. However, there might be one technique that will work for you. I can't guarantee it because I don't know how the ASP code retrieves the metadata (data about the tables). If you can (are allowed to) add a couple of Oracle userids, one for each doctor type -- for example, one named podiatrist, one named pediatrician, and so on -- then you could grant select on the tables used by each doctor type as follows: 1. connect to the schema userid that owns all the tables 2. grant select on <table_name> to podiatrist 3. repeat step 2 for each relevant podiatrist table 4. repeat steps 2 and 3 for each doctor type Then if the ASP selects from USER_TABLES (one of Oracle's views that returns all the tables accessible by a particular userid), you could setup an ODBC connection for each of your doctor types (eg, userid podiatrist). If, however, the ASP won't allow you to change the userid or it determines the tables used by some other method, then you're hosed. Or maybe someone else can come up with another idea. |
#7
| |||
| |||
|
|
Hmm ... I see your point. If you can't change the ASP without opening another can of worms (maintenance nightmares) and you can't change the schema (the ePortfolio application's Oracle userid that owns all the tables), then you don't have many options. Bad news. |
#8
| |||
| |||
|
|
Karsten Farrell <kfarrell (AT) belgariad (DOT) com> wrote snipped for brevity Hmm ... I see your point. If you can't change the ASP without opening another can of worms (maintenance nightmares) and you can't change the schema (the ePortfolio application's Oracle userid that owns all the tables), then you don't have many options. Bad news. Hi again, Karsten, I've got a bit of a follow up on this but don't know if this is an Oracle related problem or ASP or my machine or what at this point. I got permission from mgmt to possibly make *small* changes in the ASP code. So I got to looking at the code that was giving me problems. Basically, what it does is opens a recordset listing information about the tables defined in the catalog that are accessible to a given user. set objTableRS = objConn.OpenSchema(adSchemaTables) That sounds like it would do what we were talking about -- the selection of only tables that have had rights granted to the user that logs in. But then I got to wondering... becuase this is all stemming from the idea that the page is hanging and we thought it was due to the number of records. So I put replaced the "do until rs.EOF" with a for loop that would let it run 10 times. That worked like a charm (except for one thing, which I'll get to in a moment). And then I said to myself, well, how many tables do I have in here so I tried to print out a recordcount of the obTableRS. Well, turns out I didn't have any. So I checked for BOF and EOF and sure enough, I seem to have an empty recordset. Which would explain why objTableRS("Table_Name") kept coming back blank. So I've got an empty recordset it says...... but then there's one more twist. I can set my upper limit on the for loop to 1000 and everything runs just fine. However, if I go back to my "do until rs.EOF" loop, the darn page hangs up. Can't be something else that's hanging the page becuase when I replace the do loop with a for loop, all works well. Can't be that it's not moving becuase I did double-check that I've got an objTableRS.MoveNext in there. I'm just stumped..... do you see anything in here, anyone, that you can clue me into? Thanks. |
#9
| |||
| |||
|
|
Hi Hypermommy, thanks for writing this: Karsten Farrell <kfarrell (AT) belgariad (DOT) com> wrote snipped for brevity Hmm ... I see your point. If you can't change the ASP without opening another can of worms (maintenance nightmares) and you can't change the schema (the ePortfolio application's Oracle userid that owns all the tables), then you don't have many options. Bad news. Hi again, Karsten, I've got a bit of a follow up on this but don't know if this is an Oracle related problem or ASP or my machine or what at this point. I got permission from mgmt to possibly make *small* changes in the ASP code. So I got to looking at the code that was giving me problems. Basically, what it does is opens a recordset listing information about the tables defined in the catalog that are accessible to a given user. set objTableRS = objConn.OpenSchema(adSchemaTables) That sounds like it would do what we were talking about -- the selection of only tables that have had rights granted to the user that logs in. But then I got to wondering... becuase this is all stemming from the idea that the page is hanging and we thought it was due to the number of records. So I put replaced the "do until rs.EOF" with a for loop that would let it run 10 times. That worked like a charm (except for one thing, which I'll get to in a moment). And then I said to myself, well, how many tables do I have in here so I tried to print out a recordcount of the obTableRS. Well, turns out I didn't have any. So I checked for BOF and EOF and sure enough, I seem to have an empty recordset. Which would explain why objTableRS("Table_Name") kept coming back blank. So I've got an empty recordset it says...... but then there's one more twist. I can set my upper limit on the for loop to 1000 and everything runs just fine. However, if I go back to my "do until rs.EOF" loop, the darn page hangs up. Can't be something else that's hanging the page becuase when I replace the do loop with a for loop, all works well. Can't be that it's not moving becuase I did double-check that I've got an objTableRS.MoveNext in there. I'm just stumped..... do you see anything in here, anyone, that you can clue me into? Thanks. Again, without the code in front of me, I'm just taking a shot in the dark. Since it seems to work with a FOR loop, but not a DO-UNTIL loop, it's beginning to sound like you are trying to open a connection AFTER you've already reached the rs.EOF. Do you see anywhere that you close the connection? If the code already detects an EOF when it comes to the DO-UNTIL statement, then the DO won't get executed and you'll have an empty RS. The FOR would execute, however, because it loops a specific number of times. I'm not an ASP expert (we use the similar JSP), so I hope someone else will jump in here. |
#10
| |||
| |||
|
|
Again, without the code in front of me, I'm just taking a shot in the dark. Since it seems to work with a FOR loop, but not a DO-UNTIL loop, it's beginning to sound like you are trying to open a connection AFTER you've already reached the rs.EOF. Do you see anywhere that you close the connection? If the code already detects an EOF when it comes to the DO-UNTIL statement, then the DO won't get executed and you'll have an empty RS. The FOR would execute, however, because it loops a specific number of times. I'm not an ASP expert (we use the similar JSP), so I hope someone else will jump in here. |
![]() |
| Thread Tools | |
| Display Modes | |
| |