RE: Life without a correlated subquery

2003-11-10 Thread JApplewhite
How about using Minus? (I'm a set operator groupie.) It usually performs well for me, though I've done no detailed analysis. delete from theTable where rowid in ( select rowid from theTable where X is not null minus select min(rowid) from theTable where X is not null group by X ) ; Jack C.

Re: Boolean dates...

2003-10-22 Thread JApplewhite
Jose, In my experience - long ago - managing dates rarely involved Boolean logic, which is Two Valued Logic, True or False. Instead, they involved MVL (Multi-Valued Logic) with the most common return value being one of a bewildering assortment of INDETERMINATE variations, followed by frequent

Re: Boolean dates...

2003-10-22 Thread JApplewhite
The 15th of March. From http://www.infoplease.com/spot/ides1.html : Kalends (1st day of the month) Nones (the 7th day in March, May, July, and October; the 5th in the other months) Ides (the 15th day in March, May, July, and October; the 13th in the other months Jack C. Applewhite Database

Oracle Client for Macintosh

2003-10-01 Thread JApplewhite
I've searched TechNet and MetaLink but can't find a downloadable 8i, 9i, anything Oracle Client for Apple Macintosh - OS 9 or OS X. What am I missing? Is it not available? Some docs on MetaLink mention it, but the versions seem related to SQL*Net, not the RDBMS. I'm clueless when it comes to

RE: DBA needed in Austin, TX

2003-09-26 Thread JApplewhite
Raj, It's Mongolian Barbeque and still there. Now there's even a Mongolian BBQ North. Tom, You're forgetting that: - In the summer it's hot. - When it's hot, people wear less clothes to keep cool, sometimes a LOT less. - Austin is home to the University of Texas (almost 50,000 students at peak,

RE: DBA needed in Austin, TX

2003-09-25 Thread JApplewhite
100 deg. F and raining - Happens all over Texas during an afternoon summer thunderstorm, though the rain usually cools things down a bit. The wimps in Dallas can't complain about humidity at all. Folks in Houston certainly can. Unfortunately, my wife won't let me keep even ONE of the Dixie

Re: DBA needed in Austin, TX

2003-09-24 Thread JApplewhite
David forgot to mention a couple of things about working for AISD: - We don't wear neckties (well, David does sometimes). - We get 23 paid Holidays (how does 2 weeks off for Christmas and a week off for Spring Break sound?). - We have an unlimited site license for Oracle EE. I slap databases out

Re: Any known problems with installing new MS patch on Oracle server

2003-09-12 Thread JApplewhite
If MS means Micros**t, our Techs have been applying patches like crazy to all our Win2k servers. Our production Student Info. database lives on one of those - it's EE 8.1.7.4 - and I've seen no ill effects. We just had to find a time to reboot the server so the patches would take effect. Jack

Recover 8.1.7 DB with _allow_resetlogs_corruption

2003-08-22 Thread JApplewhite
8.1.7.0 on HP-UX. Another DBA (really, it wasn't me) forgot which server he was on and deleted the RBS tablespace datafile and all the archived redo logs - on different mount points - of our Production Financials database. No time for the whys of that story or why we don't mirror our archived

Re: Row level security and latch waits

2003-08-20 Thread JApplewhite
I got the 9.2 docs and this is in the Concepts manual: Dynamic Predicates The function or package that implements the security policy you create returns a predicate (a WHERE condition). This predicate controls access as set out by the policy. Rewritten queries are fully optimized and

RE: Row level security and latch waits

2003-08-20 Thread JApplewhite
Raj, Thanks. A mention of which FM would've saved me some searching, but I found it under Introduction to Fine-Grained Access Control / Automatic Reparse in the Oracle9i Application Developer's Guide - Fundamentals. I'll have to do more investigation, since those paragraphs don't clearly

Re: Row level security and latch waits

2003-08-19 Thread JApplewhite
RLS doesn't use bind variables? How then does Oracle treat the Application Context variables that you include in the predicates generated by the Security Policy functions? If those aren't bind variables then I guess I don't know what bind variables are. Please refer me to the documentation on

Re: Re: Row level security and latch waits

2003-08-19 Thread JApplewhite
OK, I went and looked in the 8i Concepts manual. It seems pretty clear that Application Context variables are used as bind variables. It may have changed for 9i, but I can't see how or why. Application Context Application context facilitates the implementation of fine-grained access control.

Re: Row level security and latch waits

2003-08-19 Thread JApplewhite
Application Context is used to implement FGAC (aka RLS). You need to read those sections in the Concepts doc. Jack C. Applewhite Database Administrator Austin Independent School District Austin, Texas 512.414.9715 (wk) 512.935.5929 (pager) [EMAIL PROTECTED]

Re: Implementing different document types with different attributes

2003-08-09 Thread JApplewhite
Tim, As soon as I sent this I saw my mistake. There's got to be one more table. Doc_Types and Doc_Attributes stay, but Documents gets changed and Document_Attributes gets created. Actually, if you wanted you could make a single integer PK column for Doc_Type_Attributes and use that as the FK

Re: Implementing different document types with different attributes

2003-08-07 Thread JApplewhite
Tim, How about this? Table Doc_Types Doc_Type_IDNumberPK ,Doc_Type_Descr VarChar2(100) Table Doc_Attributes Doc_Attrib_ID NumberPK ,Doc_Attrib_Descr VarChar2(100) Table Doc_Type_Attributes (Intersect table of the above

Re: Set Role in Trigger

2003-07-31 Thread JApplewhite
Jared, Yeah, I'm sure our Developers complain to their boss That dang DBA's Jacking with my application again. ;-) Actually, it would only take as long to generate the 50k triggers as it would to loop through the list of tables in a PL/SQL procedure and generate/execute the Dynamic SQL

Re: Set Role in Trigger

2003-07-30 Thread JApplewhite
OK, here's what I've found so far. There is no way at all in Oracle8i (don't know about 9i or 10g) to enable/disable/affect a User's Role from within a Trigger. Role processing is automatically disabled in any Definer Rights PL/SQL module. All Triggers can only be created to execute with

Set Role in Trigger

2003-07-27 Thread JApplewhite
Short form of my question: How can I enable a Role for a User within a database trigger (owned by another Schema) on a table owned by yet another Schema? - The M's I've RTF'd indicate that a trigger (and any procedure it calls) can never execute with Invoker's Rights. - I can't find a way to

Re: Set Role in Trigger

2003-07-27 Thread JApplewhite
Arup, Thanks for your reply. As I said in my memo, I really want the User's Role to be changed from within a Trigger on a table, not a System Trigger. Actually, it doesn't matter, since no database trigger can be defined with Invoker's Rights. That means that any trigger in which I issue execute

Re: Union quries: INTERSECT, MINUS, etc

2003-07-24 Thread JApplewhite
Jonathon, I've got a query for you that uses all 3 set operators at once! I wrote it to compare two different versions of our 3rd Party Student Information System (SASI) in two different databases. We were getting ready to upgrade Production, having already upgraded a Test instance. The query

RE: should you seperate indexes from tables in seperate datafiles?

2003-07-15 Thread JApplewhite
Yes, complicated with as simple a combination as tables and their indexes. Consider even more variables introduced by using LOBs and interMedia Text. In a past job, I used to make myself crazy analyzing and placing all the segments involved with interMedia-indexed CLOBs. Here's what I came up

Re: security without using different usernames

2003-07-15 Thread JApplewhite
Ryan, To make a particular schema the focus for a session: Alter Session Set Current_Schema = TheSchema ; Better yet, instead of proliferating the same schema for each client, convert the tables to partitioned tables in a single schema, with each partiion being for a specific client. That way

Re: security without using different usernames

2003-07-15 Thread JApplewhite
Ryan, Segment Exchange is a very easy, instantaneous, method of moving data back and forth between standalone tables and partitioned tables. Transportable Tablespaces can ingest the data into your DB, but then it can be comfortably digested into partitions via Segment Exchange. Jack C.

Re: How to get user's IP address?

2003-06-25 Thread JApplewhite
Anne, I use database triggers to capture system events and send me email. I use the Event Attributes, though I've not captured IP address. My 8.1.7 docs say that you should use ora_client_ip_address, though it looks like that Attribute is only available in an After Logon Event, so you'd need

Re: anyone have any soundex scripts?

2003-06-09 Thread JApplewhite
You might consider an interMedia Text index on the column(s) of interest. The interMedia Fuzzy Search and scoring functionality (and others) may prove more flexible than Soundex. Jack C. Applewhite Database Administrator Austin Independent School District Austin, Texas 512.414.9715 (wk)

Re: Autoallocate vs Uniform extent performance

2003-04-04 Thread JApplewhite
Rachel, At a recent past job, under 8.1.6 on Win2k we had tables with out-of-line CLOB segments of 30,000 extents (1MB each). Every month we dropped one to make room for another (6 months of CLOB documents online). It always just took a few seconds for the drop. These were in DMTs. Later we

Re: create interMedia index problem

2003-03-28 Thread JApplewhite
Guang, Is your RESINDEX tablespace a Locally-Managed Tablespace with Uniform Extents of less than 3 database blocks? If so, that's your problem. InterMedia indexes consist of some LOB segments and those require extents of at least 3 database blocks - at least in 8i. If not, I don't know. Jack

Perl Use Net8 Encryption?

2003-03-24 Thread JApplewhite
A Perl client app on Linux can successfully access an 8.1.7.4 DB via a listener on a non-standard port through a firewall. The Perl developer figured out where he has to configure the non-standard port# to connect to the DB. However, we want this client to access the DB using native Net8

Re: DBV

2003-02-27 Thread JApplewhite
Jeremiah, Perhaps the fact that my experience was with Personal Oracle 7.3.2.3 on Win95 explains the hosed database - Win95 not being the best platform, to say the least. I'll definitely try it again - on a test database, of course. BTW, I can't find any way to tell DBV to verify more than one

Re: DBV

2003-02-26 Thread JApplewhite
Dan, That must be new for 9i, since my 8.1.7 docs say it is an offline utility. I remember hosing an entire 7.3 test database years ago when I first ran DBV on it while it was up and open - can't remember the errors, but the DB was unusable. One of the (too) many times I learned to read the

Re:

2003-02-19 Thread JApplewhite
Ken, Do all the following as a way to minimize MTTR (Mean Time To Recovery) for a variety of scenarios and, by the way, they happen to use a lot of disk: ;-) 1. Mirror your online and archived redo logs to multiple drives 2. Put backup copies of drive A' datafiles on drive B (or C) and vice

Re: Service startup on Windows 2000 fails

2003-02-19 Thread JApplewhite
Lisa, What error do you get when you try lsnrctl start from the command line? Have you tried oradim from the command line to start the DB service? Jack C. Applewhite Database Administrator Austin Independent School District Austin, Texas 512.414.9715 (wk) 512.935.5929 (pager)

Re: Skipping a table on import

2003-02-07 Thread JApplewhite
Craig, I had to smile when you stated you had 400 tables and were reluctant to list them in the export or import parfile. Our 3rd party Student Information system has over 47,000 tables. I frequently do exports and/or imports with parfiles listing several thousand tables. It's not a problem

RE: Skipping a table on import

2003-02-07 Thread JApplewhite
John, A quick check turned up a medium parfile for me - only 1201 tables listed. The file size is 14KB, so I guess it's not an issue for 8i. Even on larger parfiles I've never gotten an error - for neither HP-UX nor Win2k. Jack C. Applewhite Database Administrator Austin Independent School

Re: Size of a Long Field

2003-02-05 Thread JApplewhite
Ed, Perhaps you could use the DBMS_SQL Define_Column_Long and Column_Value_Long procedures to manipulate the Long? Converting the Long to a LOB using To_LOB function, then manipulating it with the DBMS_LOB package might do, too. Jack C. Applewhite Database Administrator Austin Independent

RE: Size of a Long Field

2003-02-05 Thread JApplewhite
Dennis, Using VSize on a Long results in: ORA-00997: illegal use of LONG datatype Just tried in on Trigger_Body in DBA_Triggers. (8.1.7.0.0 on HP-UX). Jack C. Applewhite Database Administrator Austin Independent School District Austin, Texas 512.414.9715 (wk) 512.935.5929 (pager) [EMAIL

Re: why these tables can not be seen from user_segments?

2003-02-04 Thread JApplewhite
Guang Mei, All the DR$ objects are interMedia Index segments - some are tables, some are indexes, some are IOTs. Check out OTN and/or MetaLink for docs on how each segment type contributes to the interMedia indexing process. It's quite interesting. Jack C. Applewhite Database Administrator

Re: Case of the Missing Rows

2003-01-28 Thread JApplewhite
Rick, Might there be a Scheduled Task or DBMS_Job that runs shortly after the load and deletes rows? Just a thought - such automagic processes have bitten me in the past. Jack C. Applewhite Database Administrator Austin Independent School District Austin, Texas 512.414.9715 (wk) 512.935.5929

Re:RE: dbms_job - running jobs every 15 minutes

2003-01-22 Thread JApplewhite
Actually, Interval is evaluated at the beginning of the job according to the docs. I've not seen anyone mention the real cause behind DBMS_Job creep. That is the setting of Job_Queue_Interval which, by default, is 60 seconds. So your jobs will run 1 minute later each time unless you set

Re: primary key, local partition index - prefixed/non-prefixed

2003-01-10 Thread JApplewhite
Sean, In your case the PK would need to be on (Last, ID) in order for the index to be Local. Otherwise, it's gotta be Global or else you need to change your partition key. Jack C. Applewhite Database Administrator Austin Independent School District Austin, Texas 512.414.9715 (wk) 512.935.5929

Re: Conversion from CLOB to RAW

2003-01-10 Thread JApplewhite
Bill, I agree with Michael. You've already got the data in a suitable datatype. Why move it to a cumbersome, soon-to-be-obsolete datatype? You can use DBMS_LOB functionality on LOBs, not on Raw. I'd be so happy if the couple dozen tables in our 3rd party Student Information system that have

Re: ORA-04031

2002-12-20 Thread JApplewhite
David, What OS and Oracle version? At least in 8.1.7.0.0 on HPUX that error message could be the result of a bug - we get it every few weeks on our production financials database and have to bounce the DB. Flushing the Shared Pool every night doesn't prevent it. Eventually we'll patch to

Re: Re[2]: Happy Holidays!!

2002-12-20 Thread JApplewhite
Well... I've got to take off here in a bit for our two week Winter Break (can't call it Chrismas Holiday - gotta be denominationally neutral), though I *will* get to come in the weekend of the 28th to rebuild our Student Information database. A five day Thanksgiving Holiday was hard to get

RE: SQL question avoiding 2 views and not in

2002-12-13 Thread JApplewhite
Lisa, A couple of years ago, when I was a consultant, I implemented Application Context and Fine-Grained Access Control, AKA Row Level Security for a client. Since it causes a predicate to be appended to the Where clause of every SQL statement issued against the tables having a Security Policy,

Re: Purging Managed Standby Database Archive Logs

2002-12-12 Thread JApplewhite
Steve, It's pretty simple. No need to record anything - see the Order By Descending in the SQL below. Here are a batch file and a SQL script I used on an 8.1.7 Standby DB under Win2k. It ran reliably for months as a Scheduled Task once every hour and got rid of all applied logs, assuming that

Re: Any way to script or document jobs defined to the NT/MS2000 Task

2002-12-05 Thread JApplewhite
Ron, Saw your memo and fooled around with Task Scheduler a bit. All it is is Windows Explorer pointed at the Scheduled Tasks folder in Control Panel. To back up your Scheduled Tasks, simply single click on one or more of them (or use the Edit / Select All menu item, then de-select Add

Re: To_Number

2002-12-05 Thread JApplewhite
Laura, Are those really zeros in $34,000.05 or are they letter Os? If so use Replace. (Beware of letter l being used instead of numeral 1 as well.) Any leading or trailing spaces? If so use Trim(unit_cost). Just a couple of quick suggestions. Jack C. Applewhite Database Administrator

Re: To_Number

2002-12-05 Thread JApplewhite
Rachel, We have two Third Party apps here for Finance and Student Information that do ridiculous stuff like this so often, I just immediately jumped into fix it mode without even questioning. Don't even ask why is our motto.; -) Jack C. Applewhite Database Administrator Austin Independent

Re: image storage confusion ??

2002-12-03 Thread JApplewhite
FWIW ... in my last job we stored 13 million CLOB documents (max size of 5KB, stored out-of-line in their own CLOB segments) in an 8.1.7.3 DB under Win2k (2 CPU HP NetServer with 4GB RAM and twenty-three 36GB drives; JBOD). The CLOB documents were all interMedia Text indexed. Contains queries

Re: Dynamic views

2002-11-20 Thread JApplewhite
David, How about Dynamic SQL in an Instead Of trigger? Jack C. Applewhite Database Administrator Austin Independent School District Austin, Texas 512.414.9715 (wk) 512.935.5929 (pager) [EMAIL PROTECTED]

Slow Inserts

2002-11-15 Thread JApplewhite
Oracle 8.1.7.0.0 on Win2k (4 CPU, 4GB RAM) A 3rd Party app. is experiencing very slow performance on one of our databases. I think I've nailed it down to slow, row-at-a-time inserts. The same app. performs very fast on another DB with LMTs. After switching the tables and indexes in the slow DB

Re: Convert TEMP tablespace from datafiles to tempfiles

2002-11-06 Thread JApplewhite
Rich, If you've got the disk space, do it while the DB is up. Much simpler. Create a new Temporary LMT - call it NewTemp - with the appropriate tempfiles. Switch everyone to NewTemp by spooling and executing this and running the spooled file: Select 'Alter User ' || UserName || ' Temporary

Re: LOCALLY MANAGED TABLESPACE

2002-10-24 Thread JApplewhite
Seema, Our production Student Information database (8.1.7 under Win2k) has 40,000 tables and 60,000 indexes. It's a third party app designed for dBaseIV - go ahead and laugh, we do all the time (when we're not crying). Anyhow, we have to regularly clone out the data to a couple of other

Re: System Tablespace and Autoextend

2002-10-24 Thread JApplewhite
Sam, Autoextend caused tablespace corruption for me once, but it was over 5 years ago with Personal Oracle 7.3.2.3 on Win95 - not the most reliable OS that Oracle has ever ported to. ;-) We have several 8.1.7 databases here, on both Win2k and HPUX. Autoextend, even on System, has caused no

Re: No Nulls? (was: Warehouse design: snowflake vs star schemas)

2002-10-14 Thread JApplewhite
Rich, Several years ago in the old Database Programming and Design magazine (a really useful publication, IMHO - too bad it's gone), C. J. Date and another database guru (I can't remember his name) carried on a debate that lasted several months about the badness (Date) vs goodness (the other

Re: No Nulls? (was: Warehouse design: snowflake vs star schemas)

2002-10-14 Thread JApplewhite
Rich, I piqued my own curiosity and looked at Database Programming and Design On-Line. Below is a link to a lengthy response (1995) by Date and others to Tom Johnston's article defending MVL (Multi-Valued Logic). Plenty to chew on. http://www.dbpd.com/vault/dateresp.htm Jack C. Applewhite

Re: count(*)

2002-09-19 Thread JApplewhite
If you can modify the application code, how about incrementing a sequence for each row inserted? Not to hamper performance with a Select MySequence.NextVal From Dual you could select from - I vaguely remember this from a thread a few weeks ago - x$dual (or something like that - I can't remember

Re: dbms_space_admin.tablespace_migrate_to_local

2002-07-03 Thread JApplewhite
John, Here's the syntax from the Supplied PL/SQL Packages doc - refer to it for details: TABLESPACE_MIGRATE_TO_LOCAL(tablespace_name, allocation_unit, relative_fno) Jack C. Applewhite Database Administrator Austin Independent School District Austin, Texas 512.414.9715 [EMAIL PROTECTED]

Re: Adding processor to Oracle server

2002-05-30 Thread JApplewhite
Dave, Your Oracle instance won't have a problem with it. Your Oracle Sales Rep. will be absolutely delighted, because you will owe them more $$$ for the extra CPU license! Better check with your CIO (or equivalent) to see if your organization really wants to add that CPU. Jack C.

Re: Script for deleting old archive logs from NT

2002-05-16 Thread JApplewhite
Arun, Here are a couple of files (a .bat and .sql) that let me maintain a constant number of Archived Redo Logs online. The first batch file executes SQL*Plus to produce two other batch files to delete the excess logs and move some others, maintaining, in this case about 450 logs. It ran every