Issuing tmadmin commands from an NT batch file
Hi
We have much experience running tmadmin commands in UNIX using a "here file" like this
tmadmin << ENDOFCMDS
psr
pq
quit
ENDOFCMDS
But now we want to deliver an applictaion on NT. Is there a comparable technique on NT?
--Tom Hogan
Hi,
Try this:
String output = new String();
try {
Process proc = Runtime.getRuntime().exec ("cmd /c <your_command>");
BufferedReader in = new BufferedReader(new InputStreamReader(proc.getInputStream()));
output = in.readLine();
catch (Exception ex) {}Hope this helps,
Kurt.
Similar Messages
-
Sqlplus commands from withing the batch files
Hi,
Oracle9.2
need to execute the sqlplus commands from withing the batch files without calling the .sql file separately . How it can be done ?
With RegardsHi,
I agree with you...but as per your solution, after all you are calling the .sql file while connecting the sqlplus which I know already and I don't want to execute the sql commands like that as shown below.
For example:
for shut down the database and starting it again .sql files will be called as shown below
Note: shutdown.sql file will contain simple database shutdown command.
sqlplus -s "sys/%password%@%tnsname% as sysdba" @D:\shutdown_db.sql
and again for restarting the db i will perform as below
sqlplus -s "sys/%password%@%tnsname% as sysdba" @D:\start_db.sql
But I want to get it executed directly from the DOS batch file.
The thing is I want to execute this both the above database commands from the batch file itself without calling the .sql files separately as shown above.
is it possible, so how it can be done ?
Regards
Edited by: user640001 on Feb 9, 2011 9:53 PM -
Adobe AIR - java is not recognized as an internal or external command operable program or batch file
Hi,
I've done everything as in the HelloWorld tutorial but when i run this cmd: adt
it gives me the following error java is not recognized as an internal or external command operable program or batch file
I've installed the AIR runtime v2
Downloaded the SDK v2 and placed in D:\Www\air
Modified the path variable with D:\Www\air\bin
And then i open a new cmd console and simply write adt and gives me that error.
I've updated to the latest version of Java, but it did solve it.
But what's strage it's that the adl command work, but i'm not being able to pack my application.
I'm running Windows 7 on x64 platform.
Sincerely,
AlexI think the 32bit version will work, but it sounds like you'll need to add the Java bin folder to your system path. This is usually done by the Java installer, so I'm not sure what failed, did you run the installer located at www.java.com? Either way, this document might be able to help you out:
How do I set or change the PATH system variable
Add the Java "bin" folder to your path, you might also need to add the CLASSPATH.
Please let me know how it goes! -
Issueing unix command from java
I am using FTPConnection.java by Bret Taylor, for uploading files to remote linux portal. But i cannot issue any unix command from it . please anyone help me in this case?
Read this:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
It'll explain it all. - MOD -
Execute a sql command in a DOS batch file
hi
can anyone help let me know if there is any way to
achieve this objective.
objective is as below
There will be a batch file run from a DOS prompt
This will generate a CSV file for a SQL query
and dump it on the local machine.
thanks and regards
Ashishhi Ashish,
try using this
at the command prompt:
sqlplus username/password@connect_string @scriptfile
and the contents of the scriptfile should be
spool file.csv
sql select statement;
spool off
exit
HTH
Naveen -
Problem using Host command to call a batch file
Hi all,
I am trying to call a batch file with the Host command:
host c:\test\u.bat
where u.bat calls unix2dos.exe with a parameter of d_unix.txt.
Bat file looks like this:
C:\test\unix2dos.exe d_unix.txt
PAUSE
The bat file gets called fine, but the following error occurs (in the cmd prompt):
T:\globals\ORACLE8\bin>C:\test\unix2dos.exe d_unix.txt
d_unix.txt:
Can't open file
T:\globals\ORACLE8\bin>PAUSE
Press any key to continue . . .
Running the batch file directly in windows works fine. The batch file also runs fine from the Host command if I remove the d_unix.txt parameter.
The file d_unix.txt file is in the same directory as the batch file and as unix2dos.exe.
Running from Sql Plus in a windows environment.
Any thoughts?
Edited by: dgouin on Aug 19, 2009 11:41 AM
Edited by: dgouin on Aug 19, 2009 11:42 AM
Edited by: dgouin on Aug 19, 2009 11:42 AMI always understood that it worked with whatever directory you were in when you launched the SQL*Plus binary:
D:\>SQLPLUS dbuser@testdb
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Aug 19 15:26:35 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
dbuser@testdb > HOST ECHO %CD%
D:\
dbuser@testdb > exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
D:\>H:
H:\>SQLPLUS dbuser@testdb
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Aug 19 15:27:03 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
dbuser@testdb > HOST ECHO %CD%
H:\
dbuser@testdb > exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options -
Passing parameters from JSP to Batch file
hi,
i had a small problem regarding passing parameter from JSP to a batch file.
My program is like this..........
I wrote a batch file which opens and pings a remote system. Code looks like this......
ping %1 -t
which takes one argument and named this as "a.bat"
The corresponding JSP page has lot of links which contains IP Addressess. From JSP page, i am calling "a.bat" so that it will open and start pinging corresponding IP Address. So i want to know how can i pass the corresponding IP from a JSP to batch file so that it start pinging remote machine........... can any body help me in this regard??
Thanks in Advance.
cheers,
Sudhakar.it might be a permissions problem for the process itself. i once fought for some time with a java app that would mysteriously exit (no exceptions or any VM vomit) i finally discovered that the application was killed when the screen saver came on. just a regular screen saver mind you.
at any rate i did see this issue and other strange ones like it reported here and there, i think i once say a bug report here on it but I can't seem to find it now. i believe this is fixed in 1.4.
this of course may not be of much help to you.
the two workarounds i found were 1) to turn off my screen-saver, 2) set up the program as an NT service. for the NT service i used this stuff http://www.kcmultimedia.com/
so my suggestion for weird process permission problems on NT would be to try and make it into a service. -
Run SQL Script from a a Batch File
I'm trying to schedulling a SQL Script by Windows Scheduler:
START
"C:\Program Files\Microsoft SQL Server\100\DTS\Binn\dtexec.exe" /FILE "C:\Users\tstjs\TESTESTESTES.sql" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI
PAUSE
However, when I run the batch file it giving the error below:
...sql" due to error 0xC00CE556 "Invalid at the top level of the document. Line 1, Column 1". This happens when loading a package and the file cannot be opened o r loaded correctly into an XML document. This can be the result of either provid
ing an incorrect file name to the LoadPackage method or the XML file specified h aving an incorrect format. End Error
How can I solve that problem?
Thanks!Hi SaQvl,
As Scott metioned, you shall use sqlcmd to execute a tsql script. You can reference the below link
Use the sqlcmd Utility
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
How to issue print command from report/form server to client printer on web
1) We have a client server application which is to be deployed on the web environment. The reports generated in our application are having a destination type as File. These reports are printed after applying some print format (escape sequences) which are passed on to the printer programmatically at runtime while printing.
Now when this application is shifted on to the Application server (Forms server & Reports Server )in web environment ,the report outputs would be generated in the application server as against the client in client server environment as the report server is on the application server.
Now while printing/accessing the report the output file will not be available to the client unless it is pushed on to the client side from the server . I am able to see reports in pdf/html output but in this case layout of my reports gets changed and I dont want to change my layouts or reformat my report layouts.
How do I redirect the report output from the application server on to the client within the D2k context and then execute print commands?
Note: In this case we want to use both DMT and Laser printing. Also note that we use escape sequences to adjust reports in desired printing papers.
2) We have second set of reports which we call as document because these are printed after capturing data from 'Form' using text_io utility (please note that for these documents we are not using any Report 6i functionality)and we print it from file using printing mechanism as mentioned above. These are working well in client server application. We adopted this methodology for getting better performance (in terms of speed as database server and network traffic is not involved) of printing. But now we are converting our application for web, we are finding it difficult how to capture Form's data from browser to client's machine and then executing printing commands which are stored in our application liabrary.
If you help me out by giving some suggestions, I shall be grateful to you.
nullHello
I wonder if you ever solved this problem.
I have a very similar problem with Photoshop CS5 on Mac OSX 10.6 + HP Photosmart C7180.
If I choose "Photoshop Manages Colors" the results are lousy.
If I choose "Printer Manages Colors" the results are OK. not necessarily great.
I believe I have all the correct settings after going through books and web advice (and wasted a lot of paper and ink).
As far as I can see, "ColorSync" is the internal Mac management which is the only option available with "Photoshop Manages Colors" and "Vendor Matching" appears to mean the printer vendor (ie HP) will provide the matching. Either can be selected if "Printer Manages Colors" is used. It seems the type of paper can be set in three different places. if That's all a bit academic as the results are poor regardless.
My wife suggests I buy a new printer - Epson's looking good.
Any words of wisdom would be appreciated. -
Issuing JavaScript commands from an applet
Does anybody know how I can do this ?
Yes, you can get a handle on the browser's object model using Netscape's JSObject: Look at http://developer.netscape.com/docs/manuals/js/client/jsref/lcjsobj.htm but be aware that, perversely, this will not work in Netscape 6. It works fine in post v4 versions of IE and Netscape 5 & 7.
Hope this helps... -
Issuing Linux commands from within C++ in XCode
Friends:
I understand C++ and Linux on OS X are very united. I'm using C++ inside XCode.
Can you post a small C++ program which, say runs the list function ls?
I'd like to see how it is done.
Thanks, -MigsThe output was this, not quite the unix like directory listing I expected (a listing of the directory):
(I do remain grateful for your input though !!!!!! -Migs)
[Session started at 2008-11-19 11:14:47 -0400.]
DoWhileLoop fibonacci
DoWhileLoop.dSYM fibonacci.dSYM
ForLoop for_loop
ForLoop.dSYM for_loop.dSYM
HelloWorld functionall_inparams
HelloWorld.dSYM functionall_inparams.dSYM
If functionreturnsnumber
If.dSYM functionreturnsnumber.dSYM
LinearConguential_Rand_NumGen function_simple
LinearConguential_Rand_NumGen.dSYM function_simple.dSYM
ListingToLinux functionsimple2
ListingToLinux.dSYM functionsimple2.dSYM
OutOfMemory hello
OutOfMemory.dSYM hello.dSYM
Printing kevinsexample
Printing.dSYM kevinsexample.dSYM
count2 lpt1
count2.dSYM random_numbers
decreasingforloop random_numbers.dSYM
decreasingforloop.dSYM while_loop
dowhileloop while_loop.dSYM
dowhileloop.dSYM
The Debugger has exited with status 0. -
URGENT:- Running a batch file from java program
Author: pkanury
I am trying to execute a batch file from my java program using RunTime and Process . It can execute any dos command except for a batch file. Can anyone throw
some light ?? My code looks like this .....
cmd = "command.com /c X:\\grits\\scripts\\test.bat"; Runtime rt = Runtime.getRuntime(); Process p = rt.exec(cmd);
The weird part is that p.waitFor() returns a status of 0 implying that the cmd has been executed successfully. But that is not the case. And my batch file is as simple as - type "ADADA" > junk.txt
Any help would be appreciated.I think it should work when you use a String[] array
instead of a single String:
String[] cmd = { "command.com", "/C", "D:\\batch\\do.bat" };
Note: If the batchfile creates any output (i.e. files),
they will be stored in the directory of the application
which calls the batch file, not in d:\batch\... -
Pass exit code from batch file to MDT 2012?
So i have batch file that creates some directories, sets up the path for log files before i install an application ( msi installer).
It goes something like this :
MD C:\mylogfolders
Set logfilename = C:\mylogfolders\appl1-date.log
msiexec /i app1.msi /qb REBOOT="ReallySuppress" /l*e "%logfilename%"
exit /B %errorlevel%
This batch file was imported into MDT along with the msi files, and the silent command is running this batch file.
The installation works fine, the log produced also indicates it is successfully installed, with error code 0. I double confirmed the errorlevel variable is 0 by echoing it.
But at the summary pane, it always shows warning with error code 255 for this application. Is there any other way to pass the error code to MDT??The "exit /B %errorlevel%" line seems redundant. Why have the last line return the errorcode from the previous line?
if this is an application run though ZTIApplications I would use the following:
msiexec.exe /q app1.msi /qb reboot=ReallySuppress /l*e %logpath%\app1.msi
http://keithga.wordpress.com/2013/09/04/application-installation-and-packaging-via-mdt-and-sccm/
Keith Garner - keithga.wordpress.com -
Installing Oracle 11gR2 client from a batch file and it returns before done
Hello,
While installing Oracle 11gR2 client on XP and 7 from a batch file. When it launches the OUI from the batch file, it returns to the batch file before the installer finishes. So, there is no way for my script to know when the installer is done, or to glean a return code to test for success. This is particularly annoying...
I've also used the "call" command to force my batch file to wait, to no avail. Anyone have any clues about this one?
Thanks in advance!
--RobertSrini,
Awesome! Worked like a charm.
Many thanks!
--Robert -
Need example commands to control an SX6000. Need to send them via a Win7 batch file.
We need to turn our project on in the morning and off in the afternoon. We have done this in the past for other projectors by sending commands via a Win7 batch file. The documentation has no examples, just a rather cryptic syntax.
The only way to get that data is either via the Outlook com object or using EWS. None of the commands in the Exchange shell look inside of a folder, the most you can get with those is email addresses for mail-enabled Public folders. Here is a link that can
get you started with how to connect to public folders via EWS, then its just enumerating the folders and looping through the items in the folders for the details of the items.
http://gsexdev.blogspot.com/2013/08/public-folder-ews-how-to-rollup-part-1.html
DJ Grijalva | MCITP: EMA 2007/2010 SPA 2010 | www.persistentcerebro.com
Maybe you are looking for
-
Getting error in dependent LOV
jdev version: 10.1.3.3 I have a dependent LOV in a page. It works fine except in one scenario. When I enter partial value in dependent LOV field and click torch icon, it gives following error: Exception Details. oracle.apps.fnd.framework.OAException:
-
Function module for getting the text.
Hi , Is there any funcion module to get the message text if i pass the message no and message class as the exporting parameter. Useful answers will be rewarded. Regards, neslin.
-
Read data from transactional cube in version SEM 6.40
Hi, In an exit function of the transaction BPS0, I want to read transaction datas in a transactional cube. In version BW 2.1C - SEM 3.0A, I used the function RSDPL_CUBE_DATA_READ. Now the system is in version BW 3.5 - SEM 6.40 and the function just r
-
Nokia lumia black 520 Windows 3 upgrade
I recently downloaded Windows phone 3 upgrade. When I connect to the internet, in the upper left hand corner beside the icon that shows the strength of connection is 4g. There is not an option in the cellular settings for 4g. I asked a Microsoft mode
-
Can anyone help me? I have got a reminder from 11th November 2005 that keeps on popping up on my screen, even though I have cancelled it months ago. When I hit the cancel button, the reminder disappears, but will then re-appear 24 hours later. This h