Hi,
Can anyone help me on the error message ? ; -)
recover.sh: line 18: syntax error: unexpected end of file
================================== -
#!/usr/bin/sh
-
HostName=`hostname`
-
LOGDIR=$PWDLE_SID
-
LOGFILE=$LOGDIR/${MYSID}
-
num=0
-
while [$num -lt 10]
-
do
-
echo -n $num
-
num='expr $num+1'
-
sqlplus /nolog <<EOF
-
conn / as sysdba
-
recover datafile $num;
-
exit
-
done
-
Thanks & Regards,
Vinod Sadanandan
Oracle DBA
3 1948
Hi,
Can anyone help me on the error message ? ; -)
recover.sh: line 18: syntax error: unexpected end of file
================================== -
#!/usr/bin/sh
-
HostName=`hostname`
-
LOGDIR=$PWDLE_SID
-
LOGFILE=$LOGDIR/${MYSID}
-
num=0
-
while [$num -lt 10]
-
do
-
echo -n $num
-
num='expr $num+1'
-
sqlplus /nolog <<EOF
-
conn / as sysdba
-
recover datafile $num;
-
exit
-
done
-
Thanks & Regards,
Vinod Sadanandan
Oracle DBA
Well, you have a here document , line 10 above, that tells the script to do all of the commands that follow until you see "EOF" on a line by itself. if that is the case, then you have not met the requirements of the here document. You need to have EOF on a line by itself, I assume, right before the word "exit".
Regards,
Jeff
Hi Jeff ,
Thanks for the turn around,changed it like this, -
funct_get_datafiles(){
-
#Get the list of datafiles
-
echo "Getting datafiles list " >> ${DATAFILES}
-
file_list='{ORACLE_BASE}/sqlplus -s <<EOF
-
/as sysdba
-
set heading off feedback off
-
select distinct file_id from dba_data_files order by file_id;
-
exit
-
EOF'
-
echo "####### DATE :" 'date' > ${RECOVER}
-
for datafile in 'echo $file_list'
-
do
-
${ORACLE_BASE}/sqlplus -s <<EOF
-
/as sysdba
-
set heading off feedback off
-
recover datafile ${file_list};
-
exit
-
EOF
-
}
-
Thanks & Redagrds,
Vinod Sadanandan
Oracle DBA
Hi Jeff ,
Thanks for the turn around,changed it like this, -
funct_get_datafiles(){
-
#Get the list of datafiles
-
echo "Getting datafiles list " >> ${DATAFILES}
-
file_list='{ORACLE_BASE}/sqlplus -s <<EOF
-
/as sysdba
-
set heading off feedback off
-
select distinct file_id from dba_data_files order by file_id;
-
exit
-
EOF'
-
echo "####### DATE :" 'date' > ${RECOVER}
-
for datafile in 'echo $file_list'
-
do
-
${ORACLE_BASE}/sqlplus -s <<EOF
-
/as sysdba
-
set heading off feedback off
-
recover datafile ${file_list};
-
exit
-
EOF
-
}
-
Thanks & Redagrds,
Vinod Sadanandan
Oracle DBA
Vinod,
I am glad that the solution worked for you. In the future, when you post code to the forums, please remember to place [code] [/code] tags around the code so the moderators don't have to follow up behind you and add them.
Thank you!
Regards,
Jeff
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Will Seay |
last post by:
At the end of this message I've pasted a script we're trying to modify
slightly. I don't believe it is VBscript or javascript but these are
the closest groups I could find with my limited...
|
by: Clay Beatty |
last post by:
When you create database diagrams in Enterprise Manager, the details
for constructing those diagrams is saved into the dtproperties table.
This table includes an image field which contains most of...
|
by: tshad |
last post by:
I am not sure why I am getting this error:
I have the following code I want to run from another include file that holds
all my functions.
functions.inc...
|
by: comp.lang.tcl |
last post by:
The TCL command I am using will do a command-line action on a PHP
script:
set cannotRunPHP
I have to do it this way as both the TCL script and the PHP script run
as CLI. However, "info.php"...
|
by: thisis |
last post by:
Hi All,
i have this.asp page:
<script type="text/vbscript">
Function myFunc(val1ok, val2ok)
' do something ok
myFunc = " return something ok"
End Function
</script>
|
by: Bjorn Sagbakken |
last post by:
Hello
I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0
I am at the end of debugging and fixing stuff. Now there is one error I just
cannot find a solution to:
On...
|
by: Lawrence Krubner |
last post by:
Does anything about this script look expensive, in terms of resources or
execution time? This script dies after processing about 20 or 25
numbers, yet it leaves no errors in the error logs. This is...
|
by: GazK |
last post by:
I have been using an xml parsing script to parse a number of rss feeds
and return relevant results to a database. The script has worked well
for a couple of years, despite having very crude...
|
by: KevinADC |
last post by:
Note: You may skip to the end of the article if all you want is the perl code.
Introduction
Many websites have a form or a link you can use to download a file. You click a form button or click...
|
by: jeddiki |
last post by:
Hi,
As I am in Turkey at present, I can not see vidoes on
youtube. So I have tried a few proxies but keep finding them slow or
not working.
So I have installed myphpProxy on my server under...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |