Unix Shell - Newbie Scripting question

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > November 2005 > Newbie Scripting question





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Newbie Scripting question
Jigar2Reshma@gmail.com

2005-11-14, 5:56 pm

....I have been "commissioned" to write a shellscript to automate
refeshes.. right now we perform about 20 refresh each 300gb in size
which takes up our time. my goal is to write a shellscript which can be
executed by a user on serverA to refresh any of the 7 databases on
ServerA. I am trying to figure out how to tell the script how based on
SID that is passed with the script how to figure out which
mountpoints/directories are owned by that sid?

Bill Marcum

2005-11-14, 5:56 pm

On 14 Nov 2005 11:16:11 -0800, Jigar2Reshma@gmail.com
<Jigar2Reshma@gmail.com> wrote:
> ...I have been "commissioned" to write a shellscript to automate
> refeshes.. right now we perform about 20 refresh each 300gb in size
> which takes up our time. my goal is to write a shellscript which can be
> executed by a user on serverA to refresh any of the 7 databases on
> ServerA. I am trying to figure out how to tell the script how based on
> SID that is passed with the script how to figure out which
> mountpoints/directories are owned by that sid?
>

I'm not sure what SID is, but perhaps
find . -user sid


--
Quid me anxius sum?

[ What? Me, worry? ]
Jigar2Reshma@gmail.com

2005-11-14, 5:56 pm

Sid is instance name...

Chris F.A. Johnson

2005-11-15, 2:51 am

On 2005-11-14, Jigar2Reshma@gmail.com wrote:
> Sid is instance name...


Instance of what?

Please include context; read <http://cfaj.freeshell.org/google> for
more information.


--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Jigar2Reshma@gmail.com

2005-11-15, 5:59 pm

Oracle database....

Thorsten Kampe

2005-11-15, 5:59 pm

* Jigar2Reshma@gmail.com (2005-11-15 15:26 +0100)
> Oracle database....


http://cfaj.freeshell.org/google
Chris F.A. Johnson

2005-11-15, 5:59 pm

On 2005-11-15, Jigar2Reshma@gmail.com wrote:
> Oracle database....


What about it? Please read the link on my previous response.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Dale DeRemer

2005-11-16, 7:54 am

"Bill Marcum" <bmarcum@iglou.com> wrote in message
news:nh6n43-4dt.ln1@don.localnet...
> On 14 Nov 2005 11:16:11 -0800, Jigar2Reshma@gmail.com
> <Jigar2Reshma@gmail.com> wrote:

*snip*[vbcol=seagreen]

Use if.

For example

#refresh prd

#!/usr/bin/ksh

export sid=$1

if [ $sid = "prd" ] ; then
export disk1=/u01
export disk2=/u02
elif [ $sid = "dev" ] ; then
export disk1=/d01
export disk2=/d02
fi



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com