How to execute SQOOP.cmd file from SSIS execute process task?
How to execute SQOOP.cmd file from SSIS execute process task?
What is argument need to be prefixed in the arguments property
Executable: C:\Hadoop\sqoop-1.4.2\bin\sqoop.cmd
Arguments: /C "sqoop import -connect "jdbc:sqlserver://mysystem:1433;database=test;username=myuser;password=mypwd;" -table emp -target-dir /user/emptable -m 1"
Thanks
Durga
Hi Durga,
SQOOP.cmd must be no different than any other .cmd/.bat I assume, your question is more about setting the parameters up I guessed.
So unless the arguments change dynamically you can call SQOOP.cmd from yet another .cmd that has its parameters passed to it and the former you simply set to run without the arguments in Execute Process Task.
Otherwise, in general to set a bat/cmd file to run in SSIS one needs to do this:
PS: It is a good idea to populate the working directory with the path to the .cmd
Arthur My Blog
Similar Messages
-
Execute a .cmd file from Java program on tomcat which is running as service
I have a .cmd/,.bat file which has to be executed depending on the parameters I pass through JSP page hosted on a tomcat instance.
Tomcat is running as a windows service.
I need my .cmd file to be opened in a cmd or DOS box so that user can interact with the dos window, which is mandatory.
When I run the program from eclipse it works well but on the tomcat , the server side the output of the command is written to my log file and it gives no chance for users to monitor and interact with the command.
Should I do something with log4j settings or is due to tomcat running as service?
Please help.
thanksthanks for the responses.
But the design is like that.Then it needs to be fixed.
I think this is why there's a shortage of people to write computer applications, they are all wasting their time struggling to implement bad designs.
its a scheduler to be run on tomcat where we interact
with the running batch files and can't be changed.A scheduler in Tomcat? Why run a scheduler in an application server?
any help is appreciated.
I tried to execute the batch file from servlet it
runs , but i see the cmd.exe in windows task manager
and need a dos box open.
Any ideas?If you need a DOS box open then you need a signed-on user. So here's my patch:
1. Write an application that listens for messages from this Tomcat scheduler, and when it receives those messages it does something in a DOS box.
2. Have somebody sign on to the server and run that application.
3. Change the Tomcat scheduler to send messages to that application instead of trying to actually run it.
It's up to you what kind of messages you should send. There are plenty of choices. -
How to generate an XML file from SSIS (based on an XSD)?
I have an XSD that describes an XML format. I also have a sample XML file as well from the XSD. I am trying to understand SSIS's capability to generate the XML file in an ETL process. I would need to create the XML file based on the XSD that
I have. It is safe to assume that all the data elements are in the DB that I am incorporating in the ETL and it is also safe to assume that the data in the XML may be from multiple different tables (so massaging is probably necessary).
Would this be a job for C#/VB or can I do this through an SSIS process/task? Please help me understand my options. Thanks.Dear All,
Indeed the post by RamJaddu did not answer the question. I am having the same issue: I have been provided an .xsd file which contains a data schema, and I have all of the necessary
data in a .mdf file in order to create the required .xml file. Having queried SQL Server and received my data in "myDataSet" I can use C# to create the .xml ignoring the schema using
string strSchemaFile = @"F:\Documents\UserCost\VictorianDataCollection\VCDCSchema_v2.xsd";
string strXmlFile = "testXmlExport.xml";
myDataSet.WriteXmlSchema(strSchemaFile);
myDataSet.WriteXml(strXmlFile, XmlWriteMode.IgnoreSchema);
but how do I export the .xml file so that is conforms with the .xsd format?
If any of you have worked this out the answer would be most appreciated.
All the best,
Nick
"Everything should be made as simple as possible, but not simpler" - Einstein -
How to create multiple pdf files from multiple batch processing
I have several file folders of jpeg images that I need to convert to separate multi-page pdf files. To give a visual explanation:
Folder 1 (contains 100 jpeg image files) converted to File 1 pdf (100 pages; 1 file)
Folder 2 (contains 100 jpeg image files) converted to File 2 pdf (100 pages; 1 file)
and so on.
I know I can convert each folder's content as a batch process, but I can only figure out how to do so one folder at a time. Is it at all possible to convert multiple folders (containing jpegs) to multiple pdf files? Put differently, does anyone know how to process a batch of folders into multiple (corresponding) pdf files?
Many thanks.There are two approaches to do this:
- First convert all JPG files to PDF files using a "blank" batch process. Then combine all PDF files in the same folder using another batch process and a folder-level script (to do the actual combining). I have developed this tool in the past and it's available here:
http://try67.blogspot.com/2010/10/acrobat-batch-combine-all-files-in.html
- The othe option is to do everything in a single process, but that requires an application outside of Acrobat, which I'm currently developing.
If you're interested in any of these tools, feel free to contact me personally. -
How do I open a file from a folder, process it, then open the next ?
I have a folder full of items. I want to open the first item which is a 3d file, process it with the 3d application -- by automating the mouse clicks, then save the file, then go do the same with the next file in the folder. I see an item called open folder contents and open finder items, but it just opens them all at once.
Thanks for any help.
DanHaving a little trouble with this as it only runs once even with the loop.
I open a folder full of files dispense them, then do a watchmedo action then loop at the end. But it only does the first file. Any hints?
Thanks,
Dan -
How to Execute a cmd file in my ps script?
Hi All,
I have a cmd file which calls an msi and passes paramters. I am calling this deploy.cmd file from a powershell script. How can i achive this? I am trying the following but it does not work.
Invoke-Command {&
"D:\deploy\ABC_Installed\ETRM
(QA)_1.0.7.2\en-us\ABC_QA.cmd"}
It tends to just print the contents of the cmd but does not execute it. So, is it possible to execute a cmd
from with in PS, if so, how?
Walk_Man... Share the joy... 'Propose as Answer' if the post helps.Hey mate,
I get the following error message when i run this,
$proc
=
[diagnostics.process]::Start("cmd.exe",
"/c"D:\deploy\ABC_Installed\ETRM
(QA)_1.0.7.2\en-us\ABC_QA.cmd")
Missing ')' in method call.
At :line:12 char:53
+ $proc = [diagnostics.process]::Start("cmd.exe", "/c"D <<<< :\deploy\ABC_Installed\ETRM (QA)_1.0.7.2\en-us\ABC_QA.cmd")
Walk_Man... Share the joy... 'Propose as Answer' if the post helps. -
How to execute a .sql file from a batch file
Hi all
I've to take backup of a database weekly twice on every wednesday & Friday @ 5pm IST. I've written a hot backup script, which works every well.
now i want to automate the script. ie i want this script to run on wednesday & friday @ 5pm without any human interfearance ie with out actually any1 executing this script.
i created a batch file prod.bak with the following lines
@echo off
set oracle_sid=testdb
set oracle_home=d:\oracle\ora92
sqlplus /nolog
connect sys as sysdba/oracletest@testdb
this batch file when eexecuted connects me to sql prompt.
Now i want to execute my backup script bkp.sql automatically when it is connected to sql prompt.
(i tried with these lines in the above batch file...
call bkp.sql---it just opens the bkp.sql file in notepad & displays the script
start bkp.sql---same as call
connect / as sysdba/pwd@[email protected] --- does not work simply remains a the sql prompt.
At 17:00 /Every:w,f "d:\bkp.sql"---does not work simply remains at the sql promt.)
Can any1 let me know what should i write in the batch file that will execute the bkp.sql file automatically after it gets connected to sql prompt. M using oracle 9i.
I'll manage he time through windows utility of scheduling task.. Let me know how to execute the .sql file from a batch file.
Thanks
TriptiTry
sqlplus "sys/oracletest as sysdba" @bpk.sql
Working locally, and having set the ORACLE_SID, you don't need to specify the SqlNet alias (@testdb).
Remember to put an exit at the end of the bpk.sql script. -
How can I execute a .bat file from inside a java application
I have a .bat file which contains an executable file(.exe) and some input and output file names. What commands can I use to execute this bat file from my java application.
After raeding tkleisas' reply; i am trying to invoke another application (which can be invoked from the command line) by using a batch file and trying Runtime.exec for executing a batch file.
My current code is:
Runtime runtime = Runtime.getRuntime();
Process trialProcess;
trialProcess = runtime.exec("cmd.exe /C start C:\\guns.bat /B");
And my guns.bat looks like:
cd C:\CALPUFF
echo trial
start calpuff.exe CALPUFF.INP
This is not working for me and i get the following in the error stream of the trialProcess:
Error :
The system cannot execute the specified program.
Process finished with exit code 1
Has anyone come across something like this and know what's wrong with this one??
thnx -
How to execute a .cmd file in Solaris server
Hi all , How to execute a .cmd file in Solaris server.
Thanks.Basically you should have the execution flag associated to this cmd file. Check first if this file is builded for Solaris and then you can add the "x" flag to the file permissions.
You can too run it like this, but you should also check if this file is Solaris compatible : # sh <path/cmd file> -
Execute a .cmd file?
Is it possible to execute a .cmd file using a button or some other means?
We have a .cmd file that executes sqlloader to reload a table with new data from a flat file and would like to run this .cmd file from an apex application.
TIA.Hi Pixie,
About all I know about java is that I hate it. However, this is actually one of those rare java apps that is actually useful and easy.
Just follows the steps on that web page, with a couple of small edits, and your done. You can then create the button i n your Apex app which performs the process and executes the shell script.
The only gotcha I've had with this was when I upgraded to ver 11 (maybe 10?). Oracle had changed the security for the database, so I needed to change how Oracle started, was owned, etc. so that I could define the proper environment variables for when the shell script executed. I did all the steps as the owner of the schema my Apex app uses, so all of the internal permissions were correct.
Bill Ferguson -
How can I read pdf files from LabVIEW with different versions of Acrobat reader?
How can I read pdf files from LabVIEW with different versions of Acrobat reader?
I have made a LabVIEW program where I have possibility to read a PDF document. When I made this LabVIEW program it was Acrobat Reader 5.0.5 that was installed on the PC. Lather when the Acrobat Reader was upgraded to version 6.0, there was an error when VI tries to launch the LabVIEW program. And Later again when we upgraded to Acrobat Reader 7.0.5 I must again do some changes and rebuild the EXE files again
It isn't so very big job to do the changes in one single LabVIEW program, but we have built a lot of LabVIEW programs so this take time to due changes every time vi update Acrobat Reader. (We have build EXE files.)
The job is to right click the ActiveX container and Click "Insert ActiveX Object", then I can brows the computer for the new version of acrobat Reader. After this I must rebuild all the "methods" in the Activex call to make the VI executable again.
Is there a way to build LabVIEW program so I don't have to do this job every time we update Acrobat Reader?
This LabVIEW program is written in LabVIEW 6.1, but I se the problem is the same in LabVIEW 8.2.
Jan Inge Gustavsen
Attachments:
Show PDF-file - Adobe Reader 7-0-5 - LV61.vi 43 KB
Read PDF file.jpg 201 KB
Show PDF-file - Adobe Reader 5-0-5 - LV61.vi 42 KBhi there
try the vi
..vi.lib\platform\browser.llb\Open Acrobat Document.vi
it uses DDE or the command line to run an external application (e.g. Adobe Acrobat)
Best regards
chris
CL(A)Dly bending G-Force with LabVIEW
famous last words: "oh my god, it is full of stars!" -
How to call a .bat file from java code?
How to call a .bat file from java code? and how can i pass parameters to that .bat file?
Thanks in advancethanks for ur reply
but still i am getting the same error.
I am trying to run a .bat file of together tool, my code looks like below
import java.lang.Runtime;
import java.lang.Process;
import java.io.File;
class SysCall{
public static void main(String args[]){
String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
//String path="D://Borland//Together6.2//bin//Together.bat ";
Runtime r= Runtime.getRuntime(); //Declare the system call
try{
System.out.println("Before batch is called");
Process p=r.exec(cmd);
System.out.println(" Exit value =" + p.exitValue());
System.out.println("After batch is called");
/*can produce errors which must be caught*/
catch(Exception e) {
e.printStackTrace();
System.out.println (e.toString());
I am getting the below exception
Before batch is called
java.lang.IllegalThreadStateException: process has not exited
at java.lang.Win32Process.exitValue(Native Method)
at SysCall.main(SysCall.java:17)
java.lang.IllegalThreadStateException: process has not exited -
Executing a .bat file from java code
Im writing a utility and i need to be able to create and execute a .bat file from my program. I can create the .bat file fine but when i try to execute it nothing happens. I tried to use the following line of code to try to execute the .bat file (called make.bat) :
try
String parameterString = "\"C:\\WINNT\\System32\\cmd.exe\" C:\\ITS_Test\\make.bat";
Runtime.getRuntime().exec(parameterString);
catch (Exception e)
System.out.println(e);
The Runtime.getRuntime()exec() method worked fine when trying to execute an excel file but for some reason it dosen't want to work for the DOS prompt. Any ideas?Thanks everyone for all the replies.
I have tried all the above with no luck. Im using netbeans, does anyone think that it could be a problem with the IDE.
I tired the following code :
String parameterString = "cmd.exe /C \"C:\\ITS_Test\\make.bat\"";
Process pr = Runtime.getRuntime().exec(parameterString);
pr.waitFor();
This code does not throw any exceptions but just hangs. I also tried:
String [] parameterString = {"cmd", "/c", "C:\\ITS_Test\\make.bat"};
Process pr = Runtime.getRuntime().exec(parameterString);
pr.waitFor();
and:
String parameterString = "\"C:\\WINNT\\System32\\cmd.exe\" \"C:\\ITS_Test\\make.bat\"";
Process pr = Runtime.getRuntime().exec(parameterString);
pr.waitFor();
with the same result. Does anyone know why it just hangs and nothing happens (no exceptions thrown)? -
How do i remove a file from my favorites list on my hard drive
how do i remove a file from my favorites list on my hard drive. i was trying to put a file in my documents, and it added it to my favorites. i have tried to drag it off but it won't disappear and it won't go into the trash either. any suggestions. i think it is simple because i have done it before, but can't remember what i did to correct it. thanks
Try Holding the CMD Key as you drag it off...
-
Need help, executing a SQL file from Forms
Hi everyone,
I don't know if this can be done. I want to execute a SQL file from a When-Button-Pressed trigger. I checked a couple of place but havent found anything yet on how to do this. If someone know of a way, please help.
Thanks
Ericprocedure p_call_sqlplus is
l_filename varchar2 (1000) := 'C:\abc\def\test.sql' ;
begin
host ('sqlplus /NOLOG @' || l_filename ) ;
end ;
rem ======== test.sql ========
connect scott/tiger
spool 'C:\abc\def\test'
select * from emp ;
spool off
exit
rem ======================working on the machine where forms is running
Maybe you are looking for
-
Post Author: dee7231 CA Forum: Data Connectivity and SQL We have an ODBC connection to an Oracle database. There are 7 views that are created. However when we try to pick the view from the table selection in crystal, we see the tables but not the v
-
Illegal characters in SOAP message
Hi I consistently get the following in the server log (I'm using JAX-WS 2.1): Couldn't create SOAP message due to exception: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: Content is not allowed in prolo
-
Translation of standard text urgent
Hi All, I need to translate standard text that I have created in English languague to other languagues. How can I do this. If I have to do this in transaction SE63 then please provide me complete steps to do this. Thanks, shravan G
-
I've read the thread about flaky wifi, but I think the following may be a different issue, as this is not purely wifi connectivity: I am using a year old MacBook Pro. It connects fine into my own wifi, and at friends' homes, hotels etc. However, it i
-
Black screen on HD monitor when using DVI cable
Hi there, I've recently purchased a Samsung P2270 monitor with the intention of playing HD content from my mac mini, however, it would appear that this isn't possible. Connecting it up with a 18pin DVI-D cable doesn't seem to yield anything on the sc