![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
If you are using Perl why not use the perl database interface to Oracle? *That would allow you to avoid the shell environment and eliminate the need to escape so much. |
#12
| |||
| |||
|
#13
| |||
| |||
|
|
I asked earlier ... can you explain what it is exactly you are trying to get done in Oracle land? *Where are you going or why? In my environment I do have a fair amount of custom monitoring and scripting to accompany and double checking some ( judiciously selected ) OEM monitoring capabilities. *So do lots of other people. Lots of capable 3rd party tools also from vendors like Quest etc. |
#14
| |||
| |||
|
#15
| |||
| |||
|
|
Dude this has been done and redone so many times in the last 25 years that unless you know exactly what you are doing and why you are doing it ... using something pre-written and off the shelf will at least initially probably be a whole lot better than what you are currently doing. |
|
All in all ... it might be a whole lot easier for you to either find some good prewritten stuff ( google things like "oracle health check script" maybe beware of the references to the site run by you know who ) |
|
Not to be rude but if you are struggling just to be able to in a script issue sqlplus commands against v$database it seems like you have a pretty steep learning curve in your immediate future. |
#16
| |||
| |||
|
|
Dude this has been done and redone so many times in the last 25 years that unless you know exactly what you are doing and why you are doing it ... using something pre-written and off the shelf will at least initially probably be a whole lot better than what you are currently doing. It is very unlikely that scripts written 25 years ago will work now. There wasn't even Perl then! Off the shelf code won't cater for the non-Oracle parts of the scripts I write - they do a whole lot more than just Oracle-related stuff. All in all ... it might be a whole lot easier for you to either find some good prewritten stuff ( google things like "oracle health check script" maybe beware of the references to the site run by you know who ) Errr .. that's what I'm doing. This is the internet right here :-) |
|
Not to be rude but if you are struggling just to be able to in a script issue sqlplus commands against v$database it seems like you have a pretty steep learning curve in your immediate future. I am not struggling. This thread was really just a simple question about the $ signs. Noone has presented any good reason why they are there (they've been there for 25 years - perhaps that was long enough to fix this design no-no?) |
|
I know shell is not ideal for Oracle programming in general - but you do have to consider the bigger picture beyond Oracle. Perhaps I do know what I am doing and I was just asking a simple question.. |
#17
| |||
| |||
|
#18
| ||||
| ||||
|
|
Much as I'd like to think not, usenet ain't the whole intertube. Perhaps if you told exactly what you are trying to accomplish, we could suggest or direct. |
|
Oracle came out of the DEC world, where using a dollar sign was considered a mark of he-man internals guru-dom. *On the pdp machines, $ was the identifier of the system account [1,2], on VMS machines it signified system objects in an object name. *Rather than a design no- no that should have been fixed, it is a backward compatibility convention that has no reason to change. *Oracle was written in C to be compatible across platforms, though real he-men programmed in BLISS, the language of the OS. *Meanwhile, unix was written in C, and is really where you have problems with shells and other pathetically eclectic languages doing strange stuff with with special characters screwed up substantial fractions of a century ago, not to mention the silliness of training generations of CS students to do application programming in C. *The blame isn't with Oracle here. |
|
John answered your simple question, but I have to wonder what you've been doing that you aren't familiar with these common interactions. |
|
As Sybrand noted, there may be a userenv way. *John was wrong (or joking) about Oracle versions though. *Everyone knows there was no Version 1, 'cause first versions always suck. |
#19
| |||
| |||
|
#20
| ||||
| ||||
|
|
Know about how and when to escape special characters in unix/linux environments does not exactly come close to expert level. *Somewhere along the lines "geez is there anything special about the dollar sign in a unix/linux script that I should be aware of?" ... |
|
If one is indeed in charge of writing and deploying script based monitoring solutions across so many different platforms and software architectures some basic scripting knowledge and competency is on the nice to have list. |
|
# What is more important for me is that the scripts follow a common standard - very specific STDOUT, STDERR and return code, respect a clearly documented set of environment variables, etc etc. One way to avoid "most" problems in querying oracle internal views/ tables and ( especially ) some of the stranger x and v etc views is to put your code inside a sql file and executing that sql file. |
|
No reason that you cannot use that technique probably along with whatever other "common standards" that you are working from. On the other hand if you are really as handy at C++ as you say then you can also go directly at Oracle databases instead of driving file based monitoring solutions to and from the database instances. |
![]() |
| Thread Tools | |
| Display Modes | |
| |