This is a discussion on FYI: Oracle 9i RAC-at-home setup on linux info within the Oracle Database forums, part of the Database Server Software category; --> We're doing some oracle RAC testing here, mostly proof-of-concept type stuff, and I just wanted to let folks know ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| We're doing some oracle RAC testing here, mostly proof-of-concept type stuff, and I just wanted to let folks know that netapp's document on how to tweak client-side NFS on linux to work with netapp NAS's also works if you're using a generic linux nfs server. Their doc is here (as of 5/13/2004): http://www.netapp.com/tech_library/3189.html We're running RHAS 2.1 for everything (3 nodes + 1 nfs server), and it works well (though performance won't be as good as with a dedicated NAS like netapp). Happy trails, Robert Lojek |
| |||
| Cheers for the link.... I have been looking for something like this for ages... I have had a play around with a two node RHAS 2.1 setup with an external firewire hard drive but I found that the access to the shared storage was too flaky. With your 3 node setup did you get OEM to work with it... What about TAF..? Cheers Matt mexilent@hushmail.com (robert lojek) wrote in message news:<883a0924.0405131224.513a04d0@posting.google. com>... > We're doing some oracle RAC testing here, mostly proof-of-concept type > stuff, and I just wanted to let folks know that netapp's document on > how to tweak client-side NFS on linux to work with netapp NAS's also > works if you're using a generic linux nfs server. > > Their doc is here (as of 5/13/2004): > http://www.netapp.com/tech_library/3189.html > > We're running RHAS 2.1 for everything (3 nodes + 1 nfs server), and it > works well (though performance won't be as good as with a dedicated > NAS like netapp). > > Happy trails, > > Robert Lojek |
| |||
| dear sir, why following sqlplus command using here document did not recognize the v$database(case 1). it worked in case 2 when login directly. my question : How to rectify case 1 to ensure unix here document works ? thanks ted ===== 1. case 1 SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.3.0 - Production /export/home/oracle/script > sqlplus -s /nolog <<eof > connect system/huni123_ > select name from v$database; > exit > eof Connected. select name from v * ERROR at line 1: ORA-00942: table or view does not exist ====================== 2. case 2 /export/home/oracle/script > sqlplus system SQL*Plus: Release 9.2.0.3.0 - Production on Mon May 17 13:20:07 2004 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Enter password: Connected to: Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.3.0 - Production SQL> select name from v$database; NAME --------- EASDEV |
| |||
| Chyn, replace it with v\$database ( shell substitution thing ) Igor P.S. Huh, I've done something usefull today :-) Ted Chyn wrote: > dear sir, > > why following sqlplus command using here document did not recognize > the > v$database(case 1). it worked in case 2 when login directly. > > my question : How to rectify case 1 to ensure unix here document works > ? > > > thanks ted > > > ===== > 1. case 1 > > SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - > 64bit Production > With the Partitioning, OLAP and Oracle Data Mining options > JServer Release 9.2.0.3.0 - Production > /export/home/oracle/script > sqlplus -s /nolog <<eof > >>connect system/huni123_ >>select name from v$database; >>exit >>eof > > Connected. > select name from v > * > ERROR at line 1: > ORA-00942: table or view does not exist > ====================== > 2. case 2 > > /export/home/oracle/script > sqlplus system > > SQL*Plus: Release 9.2.0.3.0 - Production on Mon May 17 13:20:07 2004 > > Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. > > Enter password: > > Connected to: > Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production > With the Partitioning, OLAP and Oracle Data Mining options > JServer Release 9.2.0.3.0 - Production > > SQL> select name from v$database; > > NAME > --------- > EASDEV |
| |||
| Ted Chyn wrote: > dear sir, > > why following sqlplus command using here document did not recognize > the > v$database(case 1). it worked in case 2 when login directly. > > my question : How to rectify case 1 to ensure unix here document works > ? > > > thanks ted > > > ===== > 1. case 1 > > SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - > 64bit Production > With the Partitioning, OLAP and Oracle Data Mining options > JServer Release 9.2.0.3.0 - Production > /export/home/oracle/script > sqlplus -s /nolog <<eof > >>connect system/huni123_ >>select name from v$database; >>exit >>eof > > Connected. > select name from v > * > ERROR at line 1: > ORA-00942: table or view does not exist It's actually quite nice when Oracle gives you an error message which tells you precisely what's wrong, albeit with a little bit of interpretation required. Oracle says table "v" doesn't exist. You know your script contains the name "v$database". Therefore, there must be something about the "$" in your script that is causing Oracle to sort-of terminate the input and not read the following characters. Happens a lot with "odd" characters. ">", "<", "$" ...they can all do it. If you want them to be read literally, your original script has to 'escape' them, by prefacing them with something that tells SQL*Plus to keep on reading. Usually, that's a "\". So if you edit your input script file so it says "v\$database", you should get it working OK. Regards HJR |
| |||
| tedchyn@yahoo.com (Ted Chyn) wrote in message news:<44a19320.0405171023.72ad9ac5@posting.google. com>... > dear sir, > > why following sqlplus command using here document did not recognize > the > v$database(case 1). it worked in case 2 when login directly. > > my question : How to rectify case 1 to ensure unix here document works > ? > > > thanks ted > > > ===== > 1. case 1 > > SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - > 64bit Production > With the Partitioning, OLAP and Oracle Data Mining options > JServer Release 9.2.0.3.0 - Production > /export/home/oracle/script > sqlplus -s /nolog <<eof > > connect system/huni123_ > > select name from v$database; > > exit > > eof > Connected. > select name from v > * > ERROR at line 1: > ORA-00942: table or view does not exist > ====================== > 2. case 2 You need to escape the dollar sign, most likely by putting a backslash (\) before it. The shell is interpretting $database as an empty variable. jg -- @home.com is bogus. Comment created. Comment created. Comment created. |
| |||
| Not only are people telling you the correct solution, escape the $. But, if you think about it, thats a pretty powerful scripting mechanism that shell gives you. #!/bin/sh table=$1 sqlplus ... << EOSQL select count(*) from $table; EOSQL You call the script at the command-line with, say "EMP" as a parameter, the "$table" gets replaced with "EMP". and you get the count of EMP. Maybe you then upgrade it to accept a comma-delimited string of column-names? #!/bin/sh table=$1 columnnamelist=$2 sqlplus ... << EOSQL select $columnnamelist, count(*) from $table group by $columnnamelist; EOSQL The world is your oyster and pretty useful in my book. -- Galen Boyer |
| |||
| tedchyn@yahoo.com (Ted Chyn) wrote in message news:<44a19320.0405171023.72ad9ac5@posting.google. com>... > dear sir, > > why following sqlplus command using here document did not recognize > the > v$database(case 1). it worked in case 2 when login directly. Shell (whichever one you use) substitutes '$database' with the value of its variable 'database'. > my question : How to rectify case 1 to ensure unix here document works ? Insert backslash before $. Cheers, Igor > thanks ted > > > ===== > 1. case 1 > > SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - > 64bit Production > With the Partitioning, OLAP and Oracle Data Mining options > JServer Release 9.2.0.3.0 - Production > /export/home/oracle/script > sqlplus -s /nolog <<eof > > connect system/huni123_ > > select name from v$database; > > exit > > eof > Connected. > select name from v > * > ERROR at line 1: > ORA-00942: table or view does not exist > ====================== > 2. case 2 > > /export/home/oracle/script > sqlplus system > > SQL*Plus: Release 9.2.0.3.0 - Production on Mon May 17 13:20:07 2004 > > Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. > > Enter password: > > Connected to: > Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production > With the Partitioning, OLAP and Oracle Data Mining options > JServer Release 9.2.0.3.0 - Production > > SQL> select name from v$database; > > NAME > --------- > EASDEV |
| ||||
| On 17 May 2004 17:40:28 -0700, ilaletin@usa.net (Igor Laletin) wrote: .... >Shell (whichever one you use) substitutes '$database' with the value >of its variable 'database'. > >> my question : How to rectify case 1 to ensure unix here document works ? > >Insert backslash before $. .... And if you would have a lot of backslashing to do: you can prevent the shell from interpreting the $ sign by putting single quotes around the eof, thusly: sqlplus -s /nolog <<'eof' In that case no backslashing is needed. Jaap. |
| Thread Tools | |
| Display Modes | |
|
|