Cfexecute not executing CVS commands ina bat file
We are running CF 7.0 on Windows server.
I am creating a bat file containing both DOS commands and CVS
commands.
When executing the bat file via <CFexecute> the DOS
commands execute, but the CVS commands do not.
When running the bat file from the DOS command prompt, all
commands (DOS and CVS) run as expected.
Anyone have any ideas?
Thanks
On Wed, 24 Jan 2007 23:03:48 +0000 (UTC), JRoccaforte wrote:
> That could be an issue. I am however using my login and
password in the commands
Ian didn't mean the CVS permissions, he meant the filesystem
/ OS
permissions. The a/c that ColdFusion uses to access the file
system and
other system resources is very limited, by default.
You need to login (to the OS) as the a/c CF is using, and see
if you can
execute your batch file.
Adam
Similar Messages
-
How to execute sqlplus command in bat file ?
Hello
I have a simple script file that looks like this:
"sqlplus admin/admin as sysdba
shutdown immediate"
But.. when i start this file.bat my system logs but do not make any script. Sqlplus just waiting for command, and when i write "exit" i logout from sqlplus, and then system execute next command, that is "shutdown immediate" but beyond sqlplus (so my base is still working). Is it at all possible to log on and execute commands from file.bat or some other way ?
I'm using oracle 11g, windows 7x64
Regards and thx for help
Edited by: 879529 on 2011-11-27 04:52969970 wrote:
Thank you that worked for me.But I fear you don't really understand WHY it worked, and WHY your first attempts did not work.
So let me explain
Given this .bat file
sqlplus / as sysdba
shutdown immediateWhat happens when you execute the file? The windows command processor reads the file line by line and processes the command on each line. What is the first lilne?
sqlplus / as sysdbaSo what would you expect to happen when Windows processes that line? Remember, it's exactly as if you had entered that command yourself at the command prompt .... Answer: The OS locates an executable file named 'sqlplus', loads it into memory and passes control to it, along with a pointer to the rest of the command line ('/ as sysdba'). At that point, the executable sqlplus has control and will do whatever it wants with the command line it was passed ('/ as sysdba') and then waits for user input for more commands, including an 'exit' command. Where are those commands going to come from? They are NOT going to come from the next line in the bat file. They can't. The command processor that is running the bat file is still waiting for sqlplus to finish and return control. So you are stuck. The only way out is to break out of sqlplus with a 'ctl-break'. Once that happens, the command processor moves on to the next line in the bat file:
shutdown immediateSo now the os tries to locate an executable file named 'shutdown' .... you probably don't have an executable by that name (let's hope not!) so you then get an error message from the OS informing you that
'shutdown' is not recognized as an internal or external command,
operable program or batch file.Now, if you were using a real OS, you could achieve what you wanted by using input redirection, but unfortunately, Windows just has a toy for a command processor. -
Runtime.exec not executing the command !
Hi all,
I'm connecting to Progress Db thru JDBC trying to execute a stored procedure
which has a statement
Runtime.exec("ksh -c aa") where aa is aunix script which i'm trying to run from java snippet .
when i run this code as a seperate java program it executes the script
"aa" but thru JDBC connection it does not execute the command
what could be the reason ???
thanx in advance,
Nagu.Hi Rick,
"aa" is the shell script which is lying in the user DIR .
It is returning a non-zero value. what kind of permissions be there for to execute the Shell command?
Regards,
Nagarathna. -
Executing commands within .bat file sequentially within the same cmd window
We have a .bat file that contains several commands. Each command invokes an .exe with arguments.
When I invoke the .bat file programatically using the command "cmd.exe /c myfile.bat", the commands are running parallelly.
Within the .bat file, I also tried using start "" /wait /b "myprocess.exe" instead of just
"myprocess.exe", but both gives the same result.
Any solution to this?
Note:
We use Windows 7 environment.I am invoking the batch programatically in c#.
As per your suggestion, I modified the code as below to execute bat file directly instead of using cmd.exe.
Process proc = new
Process();
proc.StartInfo.FileName
= "c:\\myfile.bat";
proc.Start();
But still I could see the parallel execution of commands within the bat file.
I was not able to use Call command as I have to invoke programatically.
Is there a way to invoke Call command from c#? -
I have read many threads on this, tried all recommended
solutions, still a 'no go'.
On windows server 2003, using cfexecute trying to run a .exe
(which runs nicley from command prompt,
same login) as a user with admin perms. CF throws no errors,
just sits as a running process but does not run the .exe.
However, I can execute a .bat file that does basic "dir"
directory listing and other commands. But critical I get the
.exe running.
What gives ? Help !While reading through people's various experiences with
CFEXECUTE not performing as expected in this thread and others, I
noted someone indicated that in his trials he could get .bat files
to execute but not .exe files. We have had a working CF application
for years using CFEXECUTE with a Windows utility (fc.exe) to
compare files and capture the output in the CFEXECUTE VARIABLE
attribute. Very recently, I tried using CFEXECUTE with a .exe file
compiled by one of our faculty (written in C++) to process some
student-submitted data on our physical server, and it initially
appeared to me that CFEXECUTE simply was not executing.
During one of my tests and recalling the information stated
above, I encompassed (out of desperation more than anything else)
my executable within a command file (see code immediately
following).
Contents of wine.cmd:
wine.exe
I then executed the above command file from within my
CFEXECUTE tag and was startled to see on the subsequent Web page
the following response:
C:\Program Files\CFServer\runtime\bin>wine.exe
Our entire Web server root and all our Web server documents
including the relevant CF application are stored on a different--D
I F F E R E N T--logical drive so why in heaven is CF trying to run
wine.exe on the C: drive? I still have no idea, but suspect some
bug within the CF server itself since some .exe files execute
completely as expected while other .exe files result in the odd
behavior just described.
My solution was to alter my command file so that wine.exe
executed from the local directory (local to my Web application).
See adjusted command file below.
Adjusted contents of wine.cmd:
D:
cd \WebRoot\depts\mss\EA\FWR\
wine.exe
Now by executing the adjusted wine.cmd file within CFEXECUTE,
everything works as expected. I will post this response to at least
one other thread on this topic. -
Can not run business rule with bat file
Hi all,
I've problem with using *.bat file to run business rule. My Essbase version is 11.1.1.3 and the syntax within
*.bat is simple, but I always got the Usage message and can not execute the rule.
The error result as blow(I already execute the syntax in command panel directly):
C:\Hyperion\products\Essbase\eas\console\bin>CmdLnLauncher -SWILSON -Usynadmin -P111111 -r0004_COPYDATA
Usage: CmdLineLauncher [-p:<passwordFile>] -Sservername -Uusername [-rBusiness R
ule Name | -sSequence Name] [-fRun Time Prompts file] [-validate]
My *.bat file content as below:
cd c:\Hyperion\products\Essbase\eas\console\bin
call CmdLnLauncher -SWILSON -Usynadmin -P1111111 -r0004_COPYDATA
Is there something wrong? If anyone know about this problem, please help,thanks!!Hi,
Here is a brief overview on how to use the command line launcher.
You can create a file and put the following information into it filling in the servername,app name and db name
ExecDB::"Planning/servername/appname/dbname"
Save it as .xml file (don’t think it has to be an xml, could be .txt), so something like connect.xml
Then when you run your command line do exactly like before Cmdlnlauncher -Sservername -Uusername -p:password.txt -rrule -fconnect.xml
If you have variables in your rule you can
In EAS right click over the rule and select "Automate Launch Variables", fill in the details and then save it is as an xml.
You just need to reference the xml in the batch script as described above using the -f parameter, for sequences remove -rrule and use –sSequence
update password.txt to the name of your password file.
Cheers
John
http://john-goodwin.blogspot.com/
Edited by: JohnGoodwin on Apr 30, 2010 8:17 AM -
SQL Server Maintenance Plan does not run DEL command in .BAT
Hello,
I have a T-SQL Statement task in my Maintenance Plan that runs a .BAT file and it runs OK when manually executed. The .BAT file has a del d:\backups\*.* command in it. However, when the plan runs automatically at a scheduled time, the .BAT file does
not delete files. Could this be a permissions issue?
PaulHi Paul,
This looks like a permission issue. Make sure the account SQL instance is running has delete permissions on the folder from which you are trying to delete and also make sure the account has execute permission on that batch file.
Thanks,
Bhanu -
Using cfexecute to execute dos command in windows.
Hi!
Well i have a requirement where i need to check status of
particular service in windows from time to time.
I inferred that we can use cfexecute for this. Well i tried
to use the same but i was not successful in achieving the desired
result.
The following is the code i have written for the above
purpose.
<cfexecute name="sc query Internet Information Services"
arguments="y"
outputfile="d:\Temp\Output.txt"
timeout="90" />
I get the following message:
oldfusion.tagext.lang.ExecuteTag$TimeoutException: Timeout
period expired without completion of sc query Internet Information
Services
at
coldfusion.tagext.lang.ExecuteTag.doStartTag(ExecuteTag.java:170)
at
cfserverchecking2ecfm748178803.runPage(D:\Test\serverchecking.cfm:3)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147)
at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:357)
well i have tried using different timeout periods but it dint
work for me.i have gone crazy with it.
Please advice on this.
Many thanks.In addition to Mr Black's suggestions, take a look at these
two entries about using cfexecute on Ben Forta's blog
http://www.forta.com/blog/index.cfm/2006/7/31/Using-CFEXECUTE-To-Execute-Command-Line-Util ities
http://www.forta.com/blog/index.cfm/2006/9/11/A-Couple-Of-CFEXECUTE-Gotchas -
Problem to execute cvs command using Runtime.exec method
Hello,
I want execute this cvs command, with this options:
cvs -d :pserver:[email protected]:/home/cvs/cvsroot rlog -S -d "2007/05/01<now" Project
I tried to execute with Runtime.exec() :
Runtime.exec("cvs -d :pserver:[email protected]:/home/cvs/cvsroot rlog -S -d \"2007/05/01<now\" Project");
But I have an error because the smaller character is interpretate as a redirection, no as a smaller symbol.
How I can do to use this command with Runtime.exec ?
Thanks.
Regards.Sorry,
I had a typing mistake.
I want say:
Runtime.exec("cvs -d :pserver:[email protected]:/home/cvs/cvsroot rlog -S -d \"2007/05/01<now\" Project");
Regards. -
How to execute sql statement under bat file?
I want to execute following statement
C:\>sqlplus /nolog
SQL> conn scott/tiger
SQL> select * from tab;
I know I can realize it as following test.bat and testdb.sql file
test.bat is follows:
sqlplus /nolog @testdb.sql
testdb.sql is follows:
conn scott/tiger
select * from tab;
Now I don't want to use sql file,I only want to use bat file,like follows:
test.bat is follows:
sqlplus /nolog
conn scott/tiger
select * from tab;
when I run test.bat,I find only sqlplus /nolog statement execute,the other statements don't execute.
1)I want to know whether there is a method to execute sql statement only by bat file without a sql file? How to realize it?
2)If I call sql file,how to hide passord of user? Because I don't want to other persons know scott password,if I use conn scott/tiger in testdb.sql,other person can see testdb.sql and know the password. Is there a good method to avoid?
Thanks!I'm running *NIX, but works the same on Windows
bcm@bcm-laptop:~$ cat here.sh
sqlplus dbadmin/admindb << EOF
select count(*) from user_objects;
exit
EOF
bcm@bcm-laptop:~$ sh here.sh
SQL*Plus: Release 11.2.0.1.0 Production on Mon May 17 18:14:09 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
COUNT(*)
9
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
bcm@bcm-laptop:~$ Edited by: sb92075 on May 17, 2010 6:15 PM -
Receiver File Adapter Not Executing OS Command
Hello All!
We are currently running PI 7.1 and wish to use a Receiver File Adapter to FTP a file to a mainframe and override the FTP system defaults.
Tried using the 'quote site recfm=fb lrecl=80' OS command but discovered that this would not work as the Adapter Engine is NOT on the mainframe.
Regrouped a bit and made a second attempt which involved writing a Unix script to ftp a file and override rthe system defaults. The idea was to use the File Adapter to FTP the data to the server, invoke the script and get the file to the mainframe with the proper attributes. The script when executed on the server works perfectly.
However, when the IDoc comes thru PI, the File Adapter ftp's the file ok but the script is never executed.
Any ideas why this is so or any suggestions?
Thank you.Hi Ken,
Script only executes at Network File sharing (NFS) only. It dont work at FTP level.
So you can better write the file on NFS and then within the script to connect to ftp and do your processing.
Regards,
---Satish -
Seek help and critique on Oracle expdp Windows command or bat file
I tried to create a windows shell script to execute data dump work on daily basis. However, the command seems didn't work because it even didn't generate log file for me to identify the problem. Please give me a hand to solve this problem. Here is the windows command file and expdp parameter file.
1. windows command file
@echo off
rem -----------------------------------------------------------------------
rem Filename: My_Expdp.bat
rem Purpose: Export tables of My database
rem Date: 08-Jan-2010
rem Author:
rem -----------------------------------------------------------------------
rem -- Set parameters --
set EXPNAME=DB_Daily
set PATH=F:\ORACLE\PRODUCT\10.2.0\ADMIN\MYDB\DPDUMP
rem -- Keep 5 versions of the expdp log file --
if exist %PATH%%EXPNAME%_4.log copy %PATH%%EXPNAME%.log %PATH%%EXPNAME%_5.log >NUL:
if exist %PATH%%EXPNAME%_3.log copy %PATH%%EXPNAME%.log %PATH%%EXPNAME%_4.log >NUL:
if exist %PATH%%EXPNAME%_2.log copy %PATH%%EXPNAME%.log %PATH%%EXPNAME%_3.log >NUL:
if exist %PATH%%EXPNAME%_1.log copy %PATH%%EXPNAME%.log %PATH%%EXPNAME%_2.log >NUL:
if exist %PATH%%EXPNAME%.log copy %PATH%%EXPNAME%.log %PATH%%EXPNAME%_1.log >NUL:
rem -- Keep 5 versions of the expdp dump file --
if exist %PATH%%EXPNAME%_4.dmp copy %PATH%%EXPNAME%.dmp %PATH%%EXPNAME%_5.dmp >NUL:
if exist %PATH%%EXPNAME%_3.dmp copy %PATH%%EXPNAME%.dmp %PATH%%EXPNAME%_4.dmp >NUL:
if exist %PATH%%EXPNAME%_2.dmp copy %PATH%%EXPNAME%.dmp %PATH%%EXPNAME%_3.dmp >NUL:
if exist %PATH%%EXPNAME%_1.dmp copy %PATH%%EXPNAME%.dmp %PATH%%EXPNAME%_2.dmp >NUL:
if exist %PATH%%EXPNAME%.dmp copy %PATH%%EXPNAME%.dmp %PATH%%EXPNAME%_1.dmp >NUL:
rem -- Do the data pump --
expdp sys/syspassword@db parfile=%PATH%my_expdp.par
rem -- Add timestamp to top of export log file --
date /T >timestamp.tmp
copy timestamp.tmp + %PATH%%EXPNAME%.log %PATH%%EXPNAME%.tmp
copy %PATH%%EXPNAME%.tmp %PATH%%EXPNAME%.log
rem -- Cleanup temporary files --
del %PATH%%EXPNAME%.tmp
del timestamp.tmp
---parameter file
DUMPFILE=My_DB.DMP
LOGFILE=My_DB.LOG
DIRECTORY=Mydb_DIR
TABLE=My_table1, My_table2, My_table3
CONTENT=DATA_ONLY
JOB_NAME=My_DB_1Perhaps, this would help
HTH
-Anantha -
Bash script run via cron not executing MYSQL command
I have a bash script which is run from a cron,
It is executing as I have it write to a log file which it does correctly.
I am wanting the bash script to restore a mysqldump file.
When I run the bash script manually the dump file gets loaded fine. But when I run it through the cron the mysql command appears to be ignored.
The mysqldump file is 54MB and I have checked to make sure that MYSQL is included in the global users path in /etc/profile
Does anyone know why this maybe??
Here is the bash file
#!/bin/bash
date >> /home/user/crons/crons.log
echo "Started loadbackup" >> /home/user/crons/crons.log
cd /home/user
dbuser=root
dbpass=password
dbname=databasename
filename=backup
mysql -hlocalhost -u"$dbuser" -p"$dbpass" "$dbname" < " >> /home/user/crons/crons.log
My crontab looks like
02 17 * * * /home/user/crons/loadbackup.sh
Many thanks
RichardHi Richard,
Have you tried redirecting the script output in the cron to see if an error is being reported?
I.e.
02 17 * * * /home/user/crons/loadbackup.sh > /tmp/loadbackup.log 2>&1 -
Executing oracle form using .BAT file
I have written one batch file to run oracle form
FILE START.BAT :
ifrun60 D:\DEPLOY\USER_INPUT.fmx scott/tiger@HOSTDB
when I give command on DOS prompt.
D:\deploy>start and press ENTER
it doesn't work. Would you please suggest any solution to this?
Thanks in advance.
Shaileshhi dear
user this code ur batch file
@echo off
:: COMPILE_FRM.BAT
cls
ECHO Compiling forms
FOR %%f IN (*.fmb) DO ifcmp60 userid=scott/tiger@db module=%%f
ECHO Finished compiling
M Rizwan -
Crontab not execute cp command
Good day,
I try with any succesful this sentence at crontab:
0 8 * * * root cp -rv /home /bk/home.
What's wrong?
Thanks for your time,
Regards,
Ing. Juan L. Mera
ConexGrumer Asesores
Divisin Sistemas
www.grupomera.netJuan Mera wrote:
> Good day,
>
> I try with any succesful this sentence at crontab:
> 0 8 * * * root cp -rv /home /bk/home.
>
> What's wrong?
>
Check the path in /etc/crontab. Mine looks like this:
PATH=/sbin:/bin:/usr/sbin:/usr/bin
If yours is missing the path to cp that would be the problem.
Maybe you are looking for
-
How to delete a file from application server?
Hi gurus, i want delete a file from application server . can any one tell me the BAPI/Fm . thanks in advance
-
Save Attachments of Activity also on the Customer?
Hello Friends, Is it possible to store the Attachments of an Activity (created in WebUi) also to the Customer (for whom we create the Activity?) Thanks for helping... PS: I know the function for "helpful answers" here in SDN... (if you create a helpf
-
Can 2 people with different apple id's share an iTunes library
We have 2 apple id's and one laptop. Can we shre our iTunes library?
-
Is there a way to see free space on an iPod in iTunes 11?
In iTunes 11 I can't find a way to see Remaining Space on a connected iPod. The graphical bar (which oddly only shows useful information when you mouse over it) shows space used, the Summary tab shows Capacity but nothing seems to show Free Space Rem
-
I have RAC 11gR1 (11.1.6.0.1) and I want to upgrade the database only (to 11gR2). I have that upgrade the ASM to (11gR2) obligatorily???? How i do it? thanks so muchhhhh