Unix Technical Forum

FYI: Oracle 9i RAC-at-home setup on linux info

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 ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-23-2008, 09:18 AM
robert lojek
 
Posts: n/a
Default FYI: Oracle 9i RAC-at-home setup on linux info

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-23-2008, 09:19 AM
Matt
 
Posts: n/a
Default Re: FYI: Oracle 9i RAC-at-home setup on linux info

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-23-2008, 09:25 AM
Ted Chyn
 
Posts: n/a
Default sqlplus using Here document does not recognize v$ view ?

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-23-2008, 09:25 AM
Igor Racic
 
Posts: n/a
Default Re: sqlplus using Here document does not recognize v$ view ?




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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-23-2008, 09:25 AM
Howard J. Rogers
 
Posts: n/a
Default Re: sqlplus using Here document does not recognize v$ view ?

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



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-23-2008, 09:25 AM
Joel Garry
 
Posts: n/a
Default Re: sqlplus using Here document does not recognize v$ view ?

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-23-2008, 09:25 AM
Galen Boyer
 
Posts: n/a
Default Re: sqlplus using Here document does not recognize v$ view ?

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-23-2008, 09:26 AM
Igor Laletin
 
Posts: n/a
Default Re: sqlplus using Here document does not recognize v$ view ?

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-23-2008, 09:27 AM
Jaap W. van Dijk
 
Posts: n/a
Default Re: sqlplus using Here document does not recognize v$ view ?

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:18 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com