Run the PLSQL Script from Batch file
I am trying to run a PL/SQL script in a batch file in sp1 Windows 7 Prof
N ° 1) I wrote a simple PL/SQL script:
--
-The scope of variables
--
DECLARE
v_sal number (7.2): = 50000;
v_comm number (7.2): = v_sal *. 20;
v_message varchar2 (100): = 'eligible for the commission;
BEGIN
declare
v_sal number (7.2): = 50000;
v_comm number (7.2): = 0;
v_total_comp number (7.2): = v_sal + v_comm;
Start
v_message: = "not committed not" | v_message;
dbms_output.put_line (' message of sub-block is ' | v_message);
dbms_output.put_line (' subblock v_comm is ' | v_comm);
end;
v_message: = 'seller '. v_message;
-dbms_output.put_line ('Main block v_total_comp' | v_total_comp); -Error: not visible in the main block
dbms_output.put_line ('Main block v_comm' | v_comm);
dbms_output.put_line (' main block message is ' | v_message);
END;
/
Step 2) then I wrote a simple batch TstBatch.bat file
sqlplus scott/tiger@orcl < PLSqlVarInputTst1.sql > > TstBatch.log
Step 3) in the BACK of cmd, I tried to run TstBatch.bat
C: > TstBatch.bat
The log file tells me that I have connected to Oracle Database 11 g Enterprise Edition Release...
Then a lot of SQL > SQL > SQL >... 26 times
Procedue of PL/SQL completed successfully.
Disconnected from Oracle database
I also tried running the PLSQL script in SQLPlus:
SQL: > @PLSqlVarInputTst1.sql
Tell me the procedure completed successfully.
QUESTION: So, where is the output of the PL/SQL script?
Hello
You must activate the output: Add the following line at the beginning of your PL/SQL script:
SET SERVEROUT ON
...
Tags: Database
Similar Questions
-
Is it possible to run the command script with user account administrator rights?
Is it possible to run the command script with administrator user account rights means please tell me how to...
I need to run it in windows 7 professional service pack 1.
There are a few myths that won't go away, for example
- You can perform administrative tasks when you are working from a command prompt.
- A script (batch file, VBScript, PowerShell) gives you administrative rights.
There is no substance to a myth. Your account has administrator privileges, or it does not. There is no backdoor.
-
I can't run the exe to my computer files.
I can't run the exe to my computer files. The exe extension does not appear in the options of folder of my c: drive so I tried to add, but it will not save I tried to do a system restore, and even that won't work. I think it's a virus, but I can't seem to run to anthing that might help to get rid of it. Very frustrating... Help!
I am running Windows XP with service pack 2 on a Dell computer
Have you tried restoring system from a command prompt?
Otherwise, restart the computer and start typing the key F8, select Safe mode with command option. If you are prompted to select an operating system, use the arrow keys to select the right pair and press ENTER. Log in as administrator or with an account that has administrator credentials.
At the command prompt, type % systemroot%\system32\restore\rstrui.exe, and then press ENTER. Follow the prompts to restore your computer to an earlier date.
-
How to run the powershell script of command with several parameters
Is there a way to run a powershell script from the dialog box run with several parameters? In addition, the path to the script contains spaces, for example, c:\powershell scripts\script.ps1.
Take a look at http://www.powershell.nu/2009/12/16/running-scripts-with-arguments-in-powershell/ which explains how to pass arguments to a script.
André
-
Keyboard shortcut to run the last Script?
Anyone know of a keyboard shortcut to run the last script that was executed? I'm editing an animation and wrote a script that writes code based on it, and I need a quick way to run it without the open file dialog box.
Thank you!
Method 1:
You can assign shortcut keys to the first 20 scripts listed under the file > Scripts menu via the file «Adobe after effects 10.5 shortcuts» Just search for "ExecuteScript' in the shortcuts file find the section.
Method 2:
You can use ft_ToolBar which allows to launch scripts with the click of a button. You can also create a new button and just paste your script code directly in the window provided without having to create a jsx/jsxbin file.
-
Elements 4.0: run the postflight script fails
I ALMOST built Elements 4.0 as root on Mac OS 10.5.6 successfully (CPU PPC G5). Towards the end of construction, I see 'missing file' then 'cannot run the postflight script.
Any ideas? Thank you.
-
Hello
If I run the calc script to aggregate a BSO cube, it blocks and release each block in a few seconds? Or is it keep held locked blocks even after aggregation for this block is over?
For example if I correct sparse dimensions Forecast, FY15, dec. and my accounts dimension is only dense, after calc has my senior level members in the accounts, it it will issue after updating (i.e. in fractions of seconds) or is agg keep it held in a lock?
I ask because I want to run scripts tot., but there is the update of our cube users. I never had a problem to start agg, while users are updating. But maybe I am lucky. If a user updates a closed block, they will receive an error message that I think. They may try to update again after a few seconds, I hope.
Thank you.
Locking behavior for BSO Essbase is described in the database administrator's Guide: http://docs.oracle.com/cd/E57185_01/epm.1112/essbase_db/dstinteg.html
It is certainly theoretically possible that a user can obtain a lock because of a calc, although I can't say I saw him be a problem in real-world applications (perhaps because access uncommitted is the default).
-
Batch file to run the MaxL script
Hi all
Can someone tell me please how to run a MaxL script by using a batch file in Windows (XP). I use Essbase 11.1.1.3.
It would be great if someone could send a .bat file, I'm not sure of the syntax.
See you soon,.
SahilJohn gives you the right way re the Ref Tech.
If you want the code, you can check my post (a bit old but still perfectly usable) here:
http://camerons-blog-for-Essbase-hackers.blogspot.com/2009/07/fixing-plannings-filters.htmlYou can download the code via this post as well.
Kind regards
Cameron Lackpour
-
Pushing scripts or batch files in Windows VM
I think I'm in the correct community, but if not let me know and I'll move on to the question in the correct forum.
We use vSphere 4.0 and I would push a batch file and scripts for all our virtual machines of Windows (instead of opening each Windows vm and manually run the batch/scripts)...is it anything in vSphere that would allow me to do it, or there at - it an addon or another program that would make this possible?)
I searched this forum, searched the help of vSphere and google than a few keywords, but I can't seem to find any information on this.
Thank you
Yes, VMware has an API called VIX which enables comments management, one of the features are the ability to upload or download files to and from the guestOS. VIX uses VMware Tools to perform these operations and you can run a specific command within a prompt OR download and run a script.
For more information, VIX, please take a look here - http://www.vmware.com/support/developer/vix-api/
There are some integration with PowerCLI cmdlets with VIX if you are more comfortable in Windows, there are PowerCLI forum you can ask your question - http://communities.vmware.com/community/vmtn/vsphere/automationtools/powercli
So according to the language of comfort, you can easily hang VIX API using vSphere SDK for Java, PowerCLI, Perl, etc.
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware scripts and resources at: http://www.virtuallyghetto.com/
Introduction to the vMA (tips/tricks)
Getting started with vSphere SDK for Perl
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
-
I have a MaxL script that exports data from different cubes Level0. I have a batch file to call this script at daily intervals.
I want to name something out of different every day (preferably NAMEmmdd type format). I know that I can add a rename or move the lot but wonder if there is a MaxL method that will allow me to export to another name?
Current MaxL is simply
export database APP. Level0 data_file DB database ' ' $Arborpath\am1119.txt "";
Ideas or direction to go learn the answer?
T,
JHello
You can enter variables in maxl, so you the calling batch file can pass in a variable that contains the name of the file with the current date...
For example, you have a batch file
essmsh c:\temp\export.mxl "C:\temp\output%DATE:~3,2%%DATE:~0,2%.txt".If that was run today it would pass in ' C:\temp\output1118.txt
Now in your maxl you just refer to the variable with
export data from database sample.basic Level0 to data_file $1;
$1 refers to the variable which has been adopted, the 1 being the position, in which it was adopted.
See you soon
John
http://John-Goodwin.blogspot.com/ -
Call script from a file of commands PowerCLI
Hi all
I'm fairly new to using PowerCLI, but have already seen the benefits of its use to manage and administer a large infrastructure, we have about 50 guests with esx4i, and it has been very helpful. I have a problem, but trying to run a health check, I want to create a batch file that calls a .ps1 script and then plan its like a task... However, here is the batch file code:
C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe - PSConsoleFile "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" - command '& {c:\scripts\myscript.ps1} '.
It comes up with this in the cmd prompt after executing the batch file:
Please specify a name server of VI, for example...
PowerShell.exe vCheck.ps1 MyvCenterHowever, I have Connect-Viserver connection code in the myscript.ps1... The script runs a lot of PowerCLI, anyone know what Miss me? Thanks for your help... any input would be appreciated.
Chris
I'm not much of a PowerCLI person, but you don't have to create a batch file. Just paste the line of text below in your scheduled task Windows OS. We usually define the run as: with an account that has rights to vCenter. Also, make sure that the box run only if connected is not checked.
C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" -command "&{c:\scripts\myscript.ps1}"
-
Windows 7 (32-bit), I have a batch file that prints on the printer network HP LaserJet Pro P1606dn via lpt1 mapped. I see that the printer gets the impression that the light will blink. The problem is that it is 3-4 minutes before the page is printed. Printing from a windows like Notepad is not slow. I used to do this from a Windows XP machine without problem. What is I found out is that if I include a jump (hex 0c) in the file, I print back then printing is fast. Any ideas on what I can do outside including a form feed?
Thank you
That being said, you could try to experiment the various settings of default data type in the part Print Processor of the tab Advanced of the dialog Properties of the Windows printer that uses your target LPT1: port.
for example, change from RAW to RAW [FF appended] or RAW [FF auto].
I have no idea if it will work.
-
Run the TCL Script to start the router
I'm using a router 5000 series incorporated later and try to get my TCL script to run at startup of the router, with little success.
It is the first time for me, when I went through the Cisco relevent documents, the official book on TCL script and many examples available online.
Obviously, I'm missing something somewhere and it left me speechless. I thought it would be a simple task.
Can anyone provide a step by step instruction/requirements for a TCL script to run on a Cisco router every time it starts?
Hi Kyle,.
With the adventerprisek9 image, you should not need to run this through an applet. You should be able to run it directly from a policy of Tcl.
Event Manager user Directorystrategie flash:
event handler political test.tcl authorization bypass
Mike
Edit: By the way, when you use puts, the output should go in the syslog. There were some bugs but where the output can go to various places or "stuck". So please check the output of 'see the log' and see if the output went from there.
-
Need to run the Calc Script in sequence in MAXL
Hello
I need a idea how to run calc in sequence through Maxl scripts. My requirement is to run calc script loads after the end of the last. I try to make the method below, but some how its not working. I'd appreciate any help.
Thank you
login password admin on ServerName.
spool to 'K:\test\MXLTest.log ';
/ * Calculate * /.
run the calculation App.db.Test;
function SIERREUR 'error ';
run the calculation App.db.Test2;
set the label 'error ';
spool off;
disconnection;
"exit";
Seems iferror works only with the batch/shell script. I was trying to run EAS.
-
How to close all windows after running the SaveAsPDF script?
I ran into the problem where I adjusted the SaveAsPDF script to backup my PDF files with a preset specific PDF I use. But after executing the script, all newly created PDF files are open in illustrator and I have to close it manually one by one, choose if I want to 'Save' or 'do not save' (even if they are already registered). I would like for them to close right after that the PDF is created.
I've added in the script:
if (myFile.open("w")) { myFile.close(SaveOptions.DONOTSAVECHANGES); }
Who's going to run the script and close the files, but for only 3 of the 10, I opened. The 7 remaining won't be saved or converted to PDF. Is there something wrong in my script or anything else that I can try to solve this problem?
Here is my complete script:
/** Saves every document open in Illustrator as a PDF file in a user specified folder. */ // Main Code [Execution of script begins here] try { // uncomment to suppress Illustrator warning dialogs //app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS; if (app.documents.length > 0 ) { // Get the folder to save the files into var destFolder = null; destFolder = Folder.selectDialog( 'Select folder for PDF files.', '~' ); if (destFolder != null) { var options, i, sourceDoc, targetFile; // Get the PDF options to be used options = this.getOptions(); // You can tune these by changing the code in the getOptions() function. for ( i = 0; i < app.documents.length; i++ ) { sourceDoc = app.documents[i]; // returns the document object // Get the file to save the document as pdf into targetFile = this.getTargetFile(sourceDoc.name, '.pdf', destFolder); // Save as pdf sourceDoc.saveAs( targetFile, options ); sourceDoc.close(); } alert( 'Documents saved as MarkPreset PDF' ); } } else{ throw new Error('There are no document open!'); } } catch(e) { alert( e.message, "Script Alert", true); } /** Returns the options to be used for the generated files. @return PDFSaveOptions object */ function getOptions() {var NamePreset = 'MarkPreset'; // Create the required options object var options = new PDFSaveOptions(); options.pDFPreset=NamePreset; // See PDFSaveOptions in the JavaScript Reference for available options // Set the options you want below: // For example, uncomment to set the compatibility of the generated pdf to Acrobat 7 (PDF 1.6) // options.compatibility = PDFCompatibility.ACROBAT7; // For example, uncomment to view the pdfs in Acrobat after conversion // options.viewAfterSaving = true; return options; } /** Returns the file to save or export the document into. @param docName the name of the document @param ext the extension the file extension to be applied @param destFolder the output folder @return File object */ function getTargetFile(docName, ext, destFolder) { var newName = ""; // if name has no dot (and hence no extension), // just append the extension if (docName.indexOf('.') < 0) { newName = docName + ext; } else { var dot = docName.lastIndexOf('.'); newName += docName.substring(0, dot); newName += ext; } // Create the file object to save to var myFile = new File( destFolder + '/' + newName ); // Preflight access rights if (myFile.open("w")) { myFile.close(SaveOptions.DONOTSAVECHANGES); } else { throw new Error('Access is denied'); } return myFile; }
Try this change
for (i = 0; i< app.documents.length;="" i++="" ) ="">
for (i = app.documents.length; i > 0; i--)
Maybe you are looking for
-
After I log on the first screen that appears has a list of about 12 items that made news in the last days.When I click to read the article further rises.This happens only the first time that I log on.
-
HP Officejet Pro 8600 scanning of multiple documents and registration
Hello I want to scan a stack of documents (say 20) and then save it maybe 3 in a single file 4 as another 1 as another... etc. See you soon
-
2.2 wireless wifi now unusable and other issues
Already with my DroidX and 2.1 update, I could use my wireless network. Now, after the 2.2 update. It continuously (every several seconds) says 'Detected connection' and then connects. Then the WiFi icon in the status bar goes away. Then I get a "con
-
BB10 Webworks packaging "interrupted (quit)" error of the emulator of the ripple
I am trying to build a BB10 webworks app using Sencha Touch 2.2 and packaging using ripple and get Interrupted errors (abandonment of the). Is anyone else seeing this? I noticed that I am able to clear this error if the .sass_cache is filled in/resou
-
Which series of hp officejet 100 mobile printer series l411-compatible smaphones
We recommend to buy hundreds of your portable printer HP Officejet 100 - L411 for mobile print from a smartphone via BlueTooth. Can you proviide me a list of BlackBerry, Nokia, Samsung etc from the end smartphones that you would recommend to give to