Dbassist: save to shell script fails
I'm trying to create the database creation scripts from dbassist, rather than creating the database using the java GUI. Every time I choose the save to script option, I run into an error and dbassist crashes. Has anyone else run into this? Anyone have any reccomendations on how to avoid this problem (besides using the Java GUI)?
Thanks,
Jamie
See Section 3.7 of my help pages:
http://homepages.tig.com.au/~jmsalvo/linux/oracle8i.html
Similar Messages
-
Intermittent "Power Shell Script failed to run" after installing SQL MP 6.5.4.0
We recently installed the SQL MP. One thing I am struggling with is this "Power Shell Script failed to run" that occasionally comes up, but, not always on the same server, and not always at the same time.
It says it ran past the configured timeout of 300 seconds.
The post that seemed to have me on the right track was
https://social.technet.microsoft.com/Forums/en-US/c539a55d-dd48-438f-b7d5-06ed2cecf6e9/powershell-script-failed-to-run-alerts-from-sql-management-pack-6410?forum=operationsmanagergeneral
However, even after getting one of the several scripts that have been generating the error, out of the extract management pack, it has parameters that need to be fed to it that I have no idea what they are....
Example. ActiveRequestsDataSource.ps1 requires $computername, $connectionstring, $tcpport, $sql_wmi_namespace, and $servicename.
The computername is easy enough... so is tcpport. but, the others... not so much.
I am fairly certain I will be able to run these manually, if I just knew the parameters... I am also fairly certain we are getting these because at the time of the check, resources on that server are tied up for one reason or another.
Can someone please help? This is killing me.Hi,
As this issue happens after you installing SQL MP, so from my point of view, it seems like caused by the runas account for the SQL MP is not configured well, I would like to suggest you follow the article below to configure runas account for the management
pack:
Configuring Run As Accounts and Profiles in OpsMgr – A SQL Management Pack Example
http://blogs.technet.com/b/kevinholman/archive/2010/09/08/configuring-run-as-accounts-and-profiles-in-r2-a-sql-management-pack-example.aspx
Regards,
Yan Li
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
Power Shell Script failed to run - GetMGAlertsCount.ps1
Our SCOM 2012 R2 is getting the following script error every 45 minutes...
The PowerShell script failed with below exception
System.Management.Automation.PropertyNotFoundException: The property 'Name' cannot be found on this object. Verify that the property exists.At line:57 char:3
+ $firstLvlClass = Get-SCOMClass -Id $firstLvlMember.Name
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at CallSite.Target(Closure , CallSite , Object )
at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Script Name: GetMGAlertsCount.ps1
One or more workflows were affected by this.
Workflow name: ManagementGroupCollectionAlertsCountRule
Instance name: All Management Servers Resource Pool
Instance ID: {4932D8F0-C8E2-2F4B-288E-3ED98A340B9F}
Management group: NCA2
On the management server seeing corresponding 22406 errors
System
Provider
[ Name]
Health Service Modules
EventID
22406
[ Qualifiers]
49152
Level
2
Task
0
Keywords
0x80000000000000
TimeCreated
[ SystemTime]
2015-04-21T18:44:03.000000000Z
EventRecordID
1303964
Channel
Operations Manager
Computer
PKSWSM001.ad.nca.com
Security
EventData
NCA2
ManagementGroupCollectionAlertsCountRule
All Management Servers Resource Pool
{4932D8F0-C8E2-2F4B-288E-3ED98A340B9F}
GetMGAlertsCount.ps1
300
System.Management.Automation.PropertyNotFoundException: The property 'Name' cannot be found on this object. Verify that the property exists.At line:57 char:3 + $firstLvlClass = Get-SCOMClass -Id $firstLvlMember.Name
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at CallSite.Target(Closure , CallSite , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at CallSite.Target(Closure , CallSite , Object ) at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame
frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
System.Management.Automation.PropertyNotFoundException
I'm at a bit of a loss to troubleshoot this error. I cannot find the "GetMGAlertsCount.ps1" script to execute manually and don't have much else I can find to troubleshoot.
Thanks for your help!1) Please check Event Log on the management server and see if there are any related errors.
Nothing
interesting found
2) On the management server, please ensure the following key exists:
HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\12\Setup\Powershell\V2
Two entries found underneath this key;
(Default) (value not set)
InstallDirectory C:\Program Files\Microsoft System Center 2012 R2\Operations Manager\Powershell\
3) Action Account has access to the resources used by the PowerShell script.
is LocalSystem
4) Make sure that the computer is not over utilized.
No indication of overutilization
Thank you for the suggestions! Do you know of anything else to check? -
Query v$ views from shell script fail
Hi everybody,
the query below is runing well with a SQL*PLUS (database is mounted and not open)
SQL> SELECT member FROM v$logfile;
MEMBER
+DATA/testgfi/onlinelog/group_1.298.773871647
+DATA/testgfi/onlinelog/group_2.294.773871647
+DATA/testgfi/onlinelog/group_3.295.773871647
But Giving error if I run it from Shell script ???
$ sqlplus -s '/ as sysdba' << EOF
SELECT member FROM v$logfile;
EOFSELECT member FROM v
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only..
Please help..
Thanks..
AljaroAljaro wrote:
Hi everybody,
the query below is runing well with a SQL*PLUS (database is mounted and not open)
SQL> SELECT member FROM v$logfile;
MEMBER
+DATA/testgfi/onlinelog/group_1.298.773871647
+DATA/testgfi/onlinelog/group_2.294.773871647
+DATA/testgfi/onlinelog/group_3.295.773871647
But Giving error if I run it from Shell script ???
$ sqlplus -s '/ as sysdba' << EOF
SELECT member FROM v$logfile;
modify as below
SELECT member FROM v\$logfile; -
Power shell script failed to run - reasons for it and some background?
Hi there
I have been receiving some alerts with high repeat count that Powershell script failed to run.
All of them are coming from one server and all of them are related to SQL2012 installation. The following scripts generate alerts:
CPUUsagePercentDataSource.ps1
StolenServerMemory2012.ps1
DBDiskLatencyDataSource.ps1
I am quite new to SCOM and still trying to find my way around conveniently - I would appreciate your help if you could explain me one thing: are these scripts executed locally or through remote PSSession to the target? The point is I couldn't find any of
these scripts on my server to re-run them (and possibly catch exceptions).
The repeat count for past two months is quite high, for 8 alerts between 25 / 80.
Thanks in advance!
AlexPThe agent downloads the script and it is run locally on the agent machine, in your case the SQL Server. Usually most of these type scripts are held in the Agent folder under scritp/downloads, (sorry dont have the full path in front of me or I would give
it to you).
These errors are probably due to the fact that SQL 2012 does not give any rights to the Local System Account which is the context in which the SCOM agent runs scripts as, and is unable to access SQL information due to this fact. The easiest way to fix this
is to setup a run as account, which would be an account on your domain that has local admin access to the SQL box and has SA rights to the instance of SqL running on that box. See the following blog posts on how to fix this.
http://blogs.technet.com/b/kevinholman/archive/2010/09/08/configuring-run-as-accounts-and-profiles-in-r2-a-sql-management-pack-example.aspx
Hope this helps! this will probably create more questions...
Scott Moss MVP (Operations Manager) President - System Center Virtual Users Group |Vice President - Atlanta Southeast Management Users Group (ATL SMUG)
Please remember to click “Mark as Answer” on the post that helps you!
my new blog om2012.wordpress.com -
Power Shell Script failed to run
Hi
I think this alert is due to a faulty management pack, specifically in the module mentioned. I'm trying to investigate further. We have this on multiple
servers and across different roles.
How do I get access to this script so I can find out what it is timing out on? Where's the output of this script kept?
I'm still new to SCOM2012 and think while its and improvement its still got bugs left over from 2007.
Alert description: Forced to terminate the following PowerShell script because it ran past the configured timeout 300 seconds.
Script Name: CheckMaxConcurrentAPI.ps1
One or more workflows were affected by this.
Workflow name: Microsoft.Windows.Server.2008.MaxConcurrentAPI.Monitor
Instance name: Microsoft Windows Server 2008 R2 Enterprise
Instance ID: {81CDE473-D76E-3459-58B1-5DB67AC6B574}
Management group: OM2012This workflow came from Windows Server 2008 Max Concurrent API Monitor.
The most likey cause of tmeout is due to permission issue.
Please make sure that your default action account has the following right on local mcahine
• Member of the local users group
• Member of the local Performance Monitor Users group
• Granted Log On Locally rights
Beside, you can find the script on
SCOM 2012 R2
c:\Program Files\Micosoft Monitoring Agent\Agent\Health Service state
SCOM 2012
c:\program Files\System Center Operations Manager\Agent\Health Service state
Roger -
Brand new SCOM 2012 SP1 install with Update Rollup 1 applied
Single server, local SQL install, SQL Server 2012 SP1
Hyper-V VM running on Server 2012. VM has 8GB Ram, single vCPU
Going through initial management pack importing and configuration, at this point I have the Windows Server 2012 and SQL 2012 MP's installed.
See screenshot
http://i.imgur.com/l0Molh1.png
I am getting the following alerts in my SCOM console and cannot find a resolution to fix the issue. I don't want to set an override, as an override will prevent the PowerShell alert in other instances, where I might want to receive an alert.
Looking at the alert description, it states "The Data Access service is either not running or not yet initialized"
The SCOM Console launches and responds fine, and I get no other errors. I check the Data Access service and it is online. I have left the system alone for a couple of hours and no other errors. I then closed those alerts and restarted the
server, and they came right back in, so I know that this is something that is happening at either server startup of during the start of the SCOM services.
Is it possible that SCOM is trying to execute these scripts and the Data Access service has not come online yet?
Has anyone else come across this before?Please try the method in the following thread:
Note: As there is operations related to Registry, please perform a backup before doing this.
OpsMgr 2012 - Power Shell Script failed to run
http://social.technet.microsoft.com/Forums/de-DE/systemcenterde/thread/4be37f8d-1e7b-450c-8cb9-f1e95f3b2bd0/
Thanks.
Nicholas Li
TechNet Community Support -
I'm looking for a logical place to save Unix shell scripts. ~/Documents doesn't sound right, nor would ~/bin because the scripts aren't binaries. I know it comes down to personal preference, but what makes the most sense, ~/Library/Scripts? and /Library/Scripts for all users?
I've been using Unix since '85, and here is what I do:
~/local/bin # for my personal scripts and executables
/usr/local/bin # for my shared scripts and executables
And I also create a symlink ~/bin that points to ~/local/bin
cd ~
ln -s local/bin bin
Many open source applications are stored by default in /usr/local/bin, but from time to time, I'm on a Unix system I do not own, and I want to install a personal open source program, so I use
./configure --prefix=$HOME/local
which will configure the open source software so it is setup to store things in my home directory, including any support files, man files etc... associated with the program. For example a personal copy of Vim. -
Hi! I have installed the SQL MP 6.5.1.0 for SQL2005,SQL2008,SQL2012 and SQL2014. I know that I need to use one SQL RunAsAccount and add that account in the SQL RunAsProfiles to have the correct access to run the SCOM SQL scripts and get the correct
monitoring. We have give this SQL RunAsAccount the "Local Administrator" and "sysadmin" rights on all instances through a group. This SQL servers also use UAC, then we tested to add this SQL RunAsAccount directly with sysadmin
rights on one SQL servers instances instead through a group. But still the same problem... I haven't test the new SQL MP version 6.5.4.0 yet and I know that there is one fix for "Fixed
Timeout error in CPU utilization monitoring scenario"
The SQL RunAsAccount use "More Secure" and we are running the SQL RunAsProfiles target type against a Group with "Windows Computers" for all the SQL servers that we want to run this RunAsAccount against. We have the same problem
when we tested to change the target type to "SQL Computers"
At most of our customer it works fine but at one customer we still get all this SQL monitor related errors:
Power Shell Script failed to run (timeout 200 sec)
- scriptname=CPUUsagePercentDataSource.ps1
- workflow=Microsoft.SQLServer.2008DBEngine.ThreadsCountMonitor
Operations Manager failed to start a process
- command=GetSQL2008DBWinServStat.js
- workflow=Microsoft.SQLServer.2008.Database.ServiceMonitor
Operations Manager failed to start a process due to lack of Resources
- command=GetSQL2012DBFreeSpace.vbs
Operations Manager failed to run a WMI Query
- workflow=Microsoft.SQLServer.2012.Database.ServiceMonitor
Someone with any idea what's the problem can be?Hi,
>At most of our customer it works fine but at one customer we still get all this SQL monitor related errors
Do you mean only one SQL server has this error message poped out? If that is the case, then you may check whether the runas account configured has proper permissions on that server. You may add the account to local admin group.
Please also go through the link below:
http://blogs.technet.com/b/kevinholman/archive/2013/10/24/opsmgr-sql-mp-version-6-4-1-0-capabilities-and-configuration.aspx
Regards,
Yan Li
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
Trouble using Run Shell Script with python in Automator
Hi. I have a python script I want to run in Automator (update_puzzles.py). All it does is check, rearrange and update files and there is not supposed to be any input. I can get the script to run outside of Automator, in Terminal, by navigating to the right directory and typing "python update_puzzles.py"
I must not be setting up Run Shell Script correctly. I have it set to /bin/bash and Pass Input to stdin. The command line simply reads python /pathname/update_puzzles.py (where pathname is the path to the .py file, which I got by dragging the file onto the Run Shell Script command window). There are no actions before this in my workflow and the action after is View Results.
The log says Run Shell Script failed, and the error is "Traceback (most recent call last):"
Any suggestions?
Thanks so much.If the script is expecting to do stuff with files in the same directory as the executable, you will probably need to add a statement to change to the appropriate working directory. The shell used in the Automator *Run Shell Script* action is a generic one that does not share any of the environment variables that the Terminal uses.
-
Shell Script Adapter - what kind of sudo privilege needed?
Hi All,
I have a requirement in my project where I need to manage unix user provisioning and de-provisioning by using shell scripts in AIX servers. For this purpose, I selected Shellscript adapter as it allows us to execute scripts that run on the resource.
1. while I have account in the AIX server, I need to know what kind of sudo privilege is needed. Will I need sudo access to root? if yes, does it mean, I (or my account) should be added to root? please let me know.
2. also, I tried configuring the adapter using the login id, host, password, login shell prompt, port and SSH. When i tried to test the configuration, it gave the following error,
Test connection failed for resource(s):
Shell Script: Failed to find 'useradd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'usermod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'userdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupadd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupmod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin'
I am wondering why should it search for these commands? please let me know.
thanks.Hi All,
I got this issue resolved after a fine-grained sudo setting to the account that is used for provisioning.
The revised sudo setting was able to do all the provisioning tasks without having a root access.
This is what I set on my service account
(root) /bin/awk, /bin/cat, /bin/cp, /bin/cut, /bin/grep, /bin/login, /bin/mv, /bin/rm, /usr/bin/auths, /usr/bin/cat, /usr/bin/chgroup, /usr/bin/chgrpmem, /usr/bin/chsec, /usr/bin/chsh, /usr/bin/chuser, /usr/bin/cp, /usr/bin/last, /usr/bin/lastlog, /usr/bin/listusers, /usr/bin/logins, /usr/bin/lssec, /usr/bin/mkgroup, /usr/bin/mkuser, /usr/bin/mv, /usr/bin/passwd, /usr/bin/profiles, /usr/bin/pwdadm, /usr/bin/rm, /usr/bin/roles, /usr/sbin/groupadd, /usr/sbin/groupdel, /usr/sbin/groupmod, /usr/sbin/lsgroup, /usr/sbin/lsuser, /usr/sbin/rmgroup, /usr/sbin/rmuser, /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod, /usr/sbin/logins
(root) NOPASSWD: /usr/bin/chgrp, /usr/bin/chmod, /usr/bin/chown, /usr/bin/chpasswd, /usr/bin/cp
In this way, you need not have to be a root user to perform provisioning using AIX.
Hope this helps!!
thanks. -
Error executing shell script using dbms_scheduler
I have a job running which executes a shell script,which fails with following error :
SQL> SELECT additional_info
2 FROM user_scheduler_job_run_details
3 WHERE log_date = (SELECT MAX (log_date)
4 FROM user_scheduler_job_run_details);
ADDITIONAL_INFO
ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
STANDARD_ERROR="mkdir: Failed to make directory "/export/home/bwsolaris/abc"; Permission denied"
This are contents of my shell script
#!/bin/ksh
/bin/mkdir /export/home/bwsolaris/abc
Can anyone suggest me some way out of it?
Thanks in advance!!!Does oracle still creates a user nobody"nobody" is a "standard" Unix/Linux lowly privileged user, which is used by DBMS_SCHEDULER by default.
You should change permissions on /export/home/bwsolaris, e.g.
$ chmod 777 /export/home/bwsolaris
or use a different directory, where everyone has access, for example /tmp.
Or take a look at Metalink Note:391820.1 - Scheduled Job Running Shell Script Fails With ORA-27369 -
Shell Script Adapter - getting errors while configuring
Hi,
I am trying to configure a shell script adapter for one of my AIX resource.
the following are the values I gave to test the configuration
1. host
2. tcp port (22)
3. login user
4. password
5. login shell prompt (#)
6. connection type SSH
with these values, I tried to test the configuration, I get the following errors,
Test connection failed for resource(s):
Shell Script: Failed to find 'useradd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'usermod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'userdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupadd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupmod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin'
is this a privilege issue?
please let me know so that I can get the appropriate privilege from my sysadm to proceed further.
thanks.Hi, thanks for your response.
I got sudo access as root to the AIX resource.
Initially, NOPASSWD was set for my sudo privilege. using that I tried configuring the adapter, but I got errors like "Script failed waiting for "ASSWORD:" in response ",)#+(:" . I looked at the forums and was informed that I would need to 'UN-SET' the NOPASSWD attribute. I got that attribute un-set . but now I get the error
WLP_SmartScript_Original: Failed to find 'groupadd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' WLP_SmartScript_Original: Failed to find 'groupmod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' WLP_SmartScript_Original: Failed to find 'groupdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin'
Not sure why Sun should check this. these commands are not part of AIX. right? can you please tell me where I am going wrong? -
Unix master shell script to run jobs in parallel with dependency
I need a master shell script which would call the following shell scripts as per below order. Kindly note that if any shell script fails then the master shell script should abort.
Level 1 PRODUCTS
SP_ROST_DLY_STG_lD
SP_ROST_DLY_ITG_lD
After Level 1 completes run below two shell scripts in parallel:
Level 2 SP_IDL_EDGE_CON_POSTN_STG_Ld , SP_IDL_EDGE_ACCT_POSTN_STG_LD
After Level 2 completes run below shell scripts as per the seqeunce and in parallel:
Level 3 SP_IDL_EDGE_ACCT_STG_LD , SP_IDL_EDGE_CONT_STG_LD
SP_IDL_EDGE_ACCT_STG_VAL , SP_IDL_EDGE_CONT_STG_VAL
SP_IDL_EDGE_ACCT_ITG_Ld , SP_IDL_EDGE_CON_ITG_Ld
After Level 3 completes run below shell scripts as per the seqeunce and in parallel:
Level 4 SP_IDL_EDGE_CONT_POSTN_ITG_LD , SP_IDL_EDGE_VISITS_LD
SP_IDL_EDGE_ACCT_POSTN_ITG_LD , SP_IDL_EDGE_VISITS_DTL_LDcan i avoid using set -e and use some other method so that if there is an error in previous job then the next job is not triggered.Sure, but it is ugly.
The below is not the only way to do this...
Wrap every place you start another script with:
$ if ! MYSCRIPT; then
echo Script MYSCRIPT failed. >&2
exit 1
fibut the wrapper for parallel scripts is even worse:
$ MYSCRIPT &
$ MYSCRIPT_JOBNO=$!
$ MYSCRIPT2 &
$ MYSCRIPT2_JOBNO=$!
$ MYSCRIPT_STATUS=`wait ${MYSCRIPT_JOBNO}`
$ if [ ${MYSCRIPT_STATUS} -ne 0 ]; then
echo Script MYSCRIPT failed. >&2
exit 1
fi
$ MYSCRIPT2_STATUS=`wait ${MYSCRIPT2_JOBNO}`
$ if [ ${MYSCRIPT2_STATUS} -ne 0 ]; then
echo Script MYSCRIPT2 failed. >&2
exit 1
fi
...Now, doesn't a simple 'set -e' look much better? -
FTP log file generation failed in shell script
Hi ALL,
I am doing FTP file transfer in shell script and able to FTP the files in to corresponding directory , But when i am trying to check the FTP status through the log files then its giving problem . please check the below code.
for file in $FILENAME1
do
echo "FTP File......$file"
echo 'FTP the file to AR1 down stream system'
ret_val=`ftp -n> $file.log <<E
#ret_val=`ftp -n << !
open $ar1_server
user $ar1_uname $ar1_pwd
hash
verbose
cd /var/tmp
put $file
bye
E`
if [ -f $DATA_OUT/$file.log ]
then
grep -i "Transfer complete." $DATA_OUT/$file.log
if [ $? -eq 0 ]; then
#mv ${file.log} ${DATA_OUT}/../archive/$file.log.log_`date +"%m%d%y%H%M%S"`
echo 'Log file archived to archive directory'
#mv $file ${DATA_OUT}/../archive/$FILENAME1.log_`date +"%m%d%y%H%M%S"`
echo 'Data file archived to archived directory'
else
echo 'FTP process is not successful'
fi
else
echo 'log file generation failed'
fi
its giving syntax error end of file not giving the exact line number , please help me on thsi
Regards
DebThanks for ur reply
Actually i did a mistake in the code i wrote the following piece of code below
ret_val=`ftp -n> $file.log <<E
#ret_val=`ftp -n << !
so after the tilde symbol it as again taking the '# ' as a special character so it was giving error, so i removed the second line now its working fine.
Maybe you are looking for
-
My iphone 4 started displaying a message box with the following message: "This accessory is not optimized for this phone. You may experience noise and loss of battery." My question is: Why is this happening and how do I fix it? (I'm losing battery p
-
When i save a photo from Safari i cant fined it in my Iphone Photos.
Before it was working and i have currently 454 photo but recently i cant see the photos i save from Safari in my iphone photos I don't know what happened please help.
-
Iphone (not so) black screen of death?!?! :(
heyall, my battery was almost dead on my iphone and it shut off. now it wont turn back on completely. the screen is on but it's just a dim black screen and i cant do anything with it... help?
-
Where do i see if i have 5 GB disk space
where do i check if i have 5GB disk space
-
PS CS3 responding to Pen Pressure instead of Pen Tilt, Cintiq 21ux
Hi, I'm using a cintiq 21ux with PS CS3. When I choose to have brush size controlled by pen tilt, it instead responds to pen pressure (but still lists the control as pen tilt). Corel does recognize pen tilt appropriately, however. Is there a problem