How to run a korn script in linux
I have a dbup.ksh script and I cannot run it on my suse linux. Can someone pls explain how to change my bash shell to run this script? Or give any solution
ksh and bash are NOT 100% compatible. You can install pdksh and it should give you a /bin/ksh executable. Or if you think the script will run in bash change the first line...
~Jer
Similar Messages
-
How to run ZAC CDP from a Linux Bundle
Hi all,
I am trying to work out how to run "ZAC CDP" from a Linux bundle. We have 330 Satelites that I need to force the replication of the TFTP folder too in one staggered process.
Is there any reason why this would not work? would a script do it and anyone have a sample?
cheers,
Trev.I would imagine it's possible.
I'm assuming something (run as root user?)
#!/bin/bash
zac cdp
(you may have to put the absolute path in for the location of "zac")
I'm not a linux guru by any means, just that if you can script this via a cron job, I'm sure it can be done via ZCM Bundle. -
How to run the SQL Script in SQL Prompt?
Hi ExpertGroup,
I have written one SQL Script name called "MySQLSCript.SQL". I want to know how to run the SQL Script in SQL Prompt?.
Generally, I run SQL Script in PL/SQL Developer tool. But In this case, some SET command is not working/supporting in PL/SQL Developer Tool.
Let me know, How to Run in SQl Prompt.
Thanks & Regards,
Senthil K Kumar.This is my SQL Script....
SET COLSEP '|'
SET LINESIZE 32767
SET PAGESIZE 50000
/* SET LINESIZE 3000
SET PAGESIZE 50000
SET DEFINE OFF */
SET ECHO OFF
SET FEEDBACK OFF
--SET HEADING OFF
SET TRIMSPOOL ON
SET NEWPAGE NONE
SET UNDERLINE OFF
SPOOL &&EnterPath;
SELECT * FROM &&TableName;
SPOOL OFF
SET FEEDBACK ON
--SET DEFINE ON
PROMPT Done.
I am able to run this script in SQL Prompt....
Its executing fine...
But, If I am executing again it maynot asking for new set of data....
alternativily its taking old values only.....
how can i exeute with new set of data in the sql prompt..... -
How to run the open script code from eclipse?
Hi,
How to run the open script code from eclipse.
Please let me any soulutions on this.Hi Konda
I am not quite sure you can do that and it would even be not supported... Again, what is the purpose? Why do you want to run your openscript code in Eclipse?
What is the code you try to run?
As an example, even if you include al the jar files and so on. don't think the function "Launch Browser" could work because it isn't only java code orjar files.....
If you give us more background. maybe we can guide you to a better solution...
JB -
How to run unix shell script from java web applet
hi all
i have created one java applet. my apache web server is on unix server.
i have created one shell script in same directory where my .class and .htm files reside...
how to run this shell script from applet? it should search this .sh file on server and not on the client browser machine...
thanks in advanceI suppose you could make the shell script into a CGI, configure the server to execute CGIs, and then make the applet open the URL of that CGI.
-
How to run an Oracle Script File
Hi,
Please anybody tell me how to run an Oracle script file (*.sql file) from Query template.
In SQL*Plus we run a script file as @Script_file_name.sql
how do we do it in Query Template.Dave,
Please only post your question in one thread at a time....
[SAP xMII synchronus commincation|SAP xMII synchronus commincation]
Sam -
How to run a shell script from the GUI?
This is probably a dumb question...
How do I run a shell script from the GUI? I've been told to double click it but when I do, it opens as a text file.The behavior you describe is that used by the KDE and GNOME desktops of Linux.
Under OS X, if you make a script then mark it as executable, double-clicking on it in the Finder will not execute it. Actually, it uses a rather complex algorithm ([summarized here|http://arstechnica.com/reviews/2q00/macos-qna/macos-x-qa-2.html]) to determine what to do with it. This is implemented in Mac OS X' LaunchServices framework (incidentally, the associations are cached in /Library/Caches/com.apple.LaunchServices*.csstore and ~/Library/Caches/com.apple/LaunchServices*.csstore). You can read the details in the developer docs about LaunchServices.
Anyway, in short, the suffix '.command' is a built-in type in the LaunchServices network that identifies a shell script. If you run
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServic es.framework/Support/lsregister -dump
... it will tell you as much. -
How to run a sql script in oracle forms
Hi,
For me there is an sql script. I need to run that sql script in forms.
Actually we will run that sql file in pl/sql developer by giving @and the file name.
But how to run that file in forms.
Can any one help on these.Which book I have to look.
ThanksActually there is a script files which will drop all the indexes and tables.
DROP querry will be there for each index and each table.
So I run the script all the indexes and all the tables will be deleted. So using forms I have to run that script.
Thanks -
How to run the oracle form in linux system
Hello all,
My config is :-
Forms [32 Bit] Version 10.1.2.0.2 (Production)
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
I can easily run my on Windows and Linux platform untill i am not use java bean in my form. After using the getMacaddress JAVA BEAN. I am not able to run my form on linux platform. If i remove the java bean from my form than form will run on linux.
I am not familiar with linux so i am not able to trace the problem basicaly i don't know which version of jre is used by linux system and i don't know how to find it.
Please guide me.Now i install the jdk 1.6.0_20 and add into the jdeveloper 10.1.3.
and i change my code for get mac id is -
package demo;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
public class App{
public static void main(String[] args){
InetAddress ip;
try {
ip = InetAddress.getLocalHost();
System.out.println("Current IP address : " + ip.getHostAddress());
NetworkInterface network = NetworkInterface.getByInetAddress(ip);
byte[] mac = network.getHardwareAddress();
System.out.print("Current MAC address : ");
StringBuilder sb = new StringBuilder();
for (int i = 0; i < mac.length; i++) {
sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : ""));
System.out.println(sb.toString());
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (SocketException e){
e.printStackTrace();
in form i create one jave bean area and add the implement class is
demo.get_info.
and on B1 (button) when-button-pressed
:T1 :=GET_CUSTOM_PROPERTY('BEAN_MAC',1,'get_info');
No error comes and no out put comes. So please guide me how to use the getHardwareAddress to get mac id. -
How to run a unix script from oracle warehouse Builder
Hi,
can any one share the information about, running the unix script or scripts using oracle warehouse builder.
Regards,
AkOne way is define a workflow. Inside the workflow you put
1)an external process that "points to" the shell script and then
2)put the mapping
The external process must have the "COMMAND" parameter set to the name of the shell script. If the script has parameters you must put them in the "PARAMETERS LIST" separated by "?" (for example, ?par1?par2).
The path where OWB executes the external process I think is the ORACLE_HOME of the OWB.
f you don't use workflow, you can try with this more complex solution. I tried with 9i and OWB 9.2 and it's working well.
You create an autonomous procedure (within a package or not) :
CREATE PROCEDURE Extract_Email_List
DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
And use the sys.shell script that you need your dba/unix admin to install first of all, with a call like that.
sys.shell('sh ' || txt_dir_name || '/send_email_marketing.sh ' || txt_dir_name || ' ' || email_addr );
Then you import your procedure into OWB and use it in your mapping with the "pre-mapping" icon (you can set parameters for your proc with constants if you want).
To implement sys.shell, go to metalink and find "Note:168065.1" - "How to call a UNIX shell script from PL/SQL".
Once it's done once, it's not so bad. But I would still recommend the workflow approach also..
I hope this helps. -
How to run the perl script from java ?
Hi , I need to run the pearl script from the server and to get the result of the script thro' java using SSH
Is there any 3rd party SSH API in java ?
Please help me out
thanks in advance
karthikThis seems like a very strange thing to want to do.
What is the perl script doing?
Do other programs (not some shell script) access this server-side perl script from a different machine?
If so how do they do it?
What currently triggers the perl script to execute?
What currently handles the output from the perl script?
If you can answer these questions (and understand the answers) you should be able to come up with a different approach to this.
You do not really want to call a remote perl script from a Java program, you want to achieve the effect you think that would have if you could do it.
So find the answers to the above questions, write them on 3" x 5" cards and lay them out on your desk.
What flow of control needs to happen? Which piece of code needs to produce or consume which piece of data?
If that fails, ask you self or who ever is making you do this what are the use-cases?
If you do not know what use-cases are or do not understand them well enough try reading
Use Case Modeling (The Addison-Wesley Object Technology Series) by Kurt Bittner and Ian Spence (Paperback - Aug 30, 2002)
http://www.amazon.com/s/ref=nb_ss_gw/002-7908514-4043267?url=search-alias%3Dstripbooks&field-keywords=use+cases&x=0&y=0
It is a short and easy to read book on the subject and also one of the best.
You MUST understand WHAT you are trying to achieve before you can decide HOW you are going to achieve it. -
How to run a Python Script in Terminal ?
Hello,
how can you run a Python Script in Terminal ? (OS X 10.4.5 - not OS X Server)
It´s about this Sript:
http://www.macosxhints.com/article.php?story=20060225091102170
Thanks
iMac G5 20" Mac OS X (10.4.5)While this isn't really specific at all to OS X Server (please keep your questions in the "Mac OS X Server" topic area related to OS X Server, it helps you and everyone else
Now then:
Please note the comments of "robg" (the site-"mom"/host):
"You'll want to save the script without the .txt extension, and remember to make it executable with chmod a+x site2template.sh
Save the file to your Desktop, and remove the ".txt" from the name so it's named: site2template.sh
then in the Terminal, issue:
chmod +x ~/Desktop/site2template.sh
"~" is shortcut for "the current user's (my) home directory"
From there you can simply use:
~/Desktop/site2template.sh /your/site
But, far better to:
choose a location to save the script, typically /usr/local/bin:
make the directory if you don't have one:
sudo mkdir /usr/local/bin
sudo cp ~/Desktop/site2template.sh /usr/local/bin/
then adjust the permissions:
sudo chmod 755 /usr/local/bin/site2template.sh
You may want to add /usr/local/bin to your path.
cat /etc/profile
and if you don't see it, add:
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
export PATH
ie:
sudo cp /etc/profile /etc/profile.bak
(back it up to play safe)
sudo pico /etc/profile
and add
:/usr/local/bin
to the path info.
Save it (ctl w)
exit (ctl x)
then type: source /etc/profile
(start learning vi or emacs eventually)
and you'll be able to run:
site2template /path\ to/your/site/to\ convert -
How to run multiple Test Script versions at once
HI
How to Run different versions of Test Scripts ( TCD record & SAP GUI) continiously.
Thankyou>
d s wrote:
> HI
> How to Run different versions of Test Scripts ( TCD record & SAP GUI) continiously.
>
> Thankyou
Hi DS,
If I understand your question correctly,you want to execute different version of TCD and SAPGUI continously,then please find the steps below:
1)Create a new script.
2)Call the individual scripts created in TCD and SAPGUI in the new script using REF command in the pattern you want to execute.
3)eCATT will automatically choose the relevant version automatically suitable for the system.
4)Maintain the input and output paramters in the main script.
5)Paramterize the input and output values.
6)Once the script is without errors,you can execute the scripts and they run continously.
Hope this answers your query.
Regards,
SSN. -
How I run a shell script from the scheduler on 10.2.0.2.0 ?
Hello Oracle People,
I'd like to run a shell script from the Scheduler in my 10g database.
Right now it is a simple shell script.
Eventually it will wrap RMAN commands to back up my DB.
I wrote a simple pl/sql script to create a job:
-- cr_job10.sql
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'my_backup_job',
job_type => 'EXECUTABLE',
job_action => '/h/oracle/scripts/tst.sh',
start_date => '06-SEP-07 5.33.00PM US/Pacific',
repeat_interval => 'FREQ=DAILY',
end_date => '08-SEP-07 4.00.00PM US/Pacific',
enabled => TRUE,
comments => 'My Backup Job');
END;
I see no errors when I run the above procedure.
I checked DBA_SCHEDULER_JOBS and the job is in there.
The scheduler, though, errors out with an error which I see in a trace file:
/h/oracle/admin/orcl/bdump/orcl_j000_22396.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /h/oracle/product/10r2
System name: SunOS
Node name: sol
Release: 5.10
Version: Generic_118855-14
Machine: i86pc
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 15
Unix process pid: 22396, image: oracle@sol (J000)
*** ACTION NAME:(MY_BACKUP_JOB) 2007-09-06 17:33:00.175
*** MODULE NAME:(DBMS_SCHEDULER) 2007-09-06 17:33:00.175
*** SERVICE NAME:(SYS$USERS) 2007-09-06 17:33:00.175
*** CLIENT ID:() 2007-09-06 17:33:00.175
*** SESSION ID:(140.13520) 2007-09-06 17:33:00.175
*** 2007-09-06 17:33:00.175
ORA-12012: error on auto execute of job 53267
ORA-27369: job of type EXECUTABLE failed with exit code: 274662
I googled on this:
ORA-27369: job of type EXECUTABLE failed with exit code: 274662
Google returned only 1 hit.
There, I see some evidence that I need to configure something inside
of Oracle to run shell scripts from the scheduler, but possibly just
for machines running windows. I'm running Solaris.
Do any of you know what I need to configure inside of Oracle to
run shell scripts from the scheduler?
-OwenHello people,
I should have added this bit of information:
"The script runs fine from oracle's crontab."
"The script runs fine from a shell owned by oracle."
I'm getting responses telling me to check my env variables and permissions
which would be helpful to a UNIX novice.
I have a feeling that no one is using the scheduler to run RMAN scripts.
Tim Hall suggested I take a close look at these files:
$ORACLE_HOME/rdbms/admin/externaljob.ora
$ORACLE_HOME/bin/extJob
Currently I'm setup like this:
bash sol root /h/oracle/product/10r2/bin 31 #
bash sol root /h/oracle/product/10r2/bin 31 # ll $ORACLE_HOME/rdbms/admin/externaljob.ora
-rw-r--r-- 1 root dba 52 Sep 7 15:29 /h/oracle/product/10r2/rdbms/admin/externaljob.ora
bash sol root /h/oracle/product/10r2/bin 32 #
bash sol root /h/oracle/product/10r2/bin 32 # cat $ORACLE_HOME/rdbms/admin/externaljob.ora
# externaljob.ora
run_user = rman
run_group = rman
bash sol root /h/oracle/product/10r2/bin 33 #
bash sol root /h/oracle/product/10r2/bin 33 #
bash sol root /h/oracle/product/10r2/bin 33 #
bash sol root /h/oracle/product/10r2/bin 33 # ll $ORACLE_HOME/bin/ext*
-rwsr-x--- 1 rman dba 30388 Sep 21 2006 /h/oracle/product/10r2/bin/extjob*
-rwsr-x--- 1 rman dba 30392 Sep 21 2006 /h/oracle/product/10r2/bin/extjobo*
-rwsr-x--- 1 rman dba 34468 Sep 21 2006 /h/oracle/product/10r2/bin/extproc*
-rwxr-xr-x 1 oracle dba 300 Sep 21 2006 /h/oracle/product/10r2/bin/extusrupgrade*
bash sol root /h/oracle/product/10r2/bin 34 #
bash sol root /h/oracle/product/10r2/bin 34 #
bash sol root /h/oracle/product/10r2/bin 34 #
On my system, the user 'nobody' has no shell so I cannot use nobody.
I created a user named rman:
bash sol root /h/oracle/product/10r2/bin 34 #
bash sol root /h/oracle/product/10r2/bin 34 #
bash sol root /h/oracle/product/10r2/bin 34 # su - rman
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$
$ id
uid=220(rman) gid=220(rman)
$
$
$ date
Fri Sep 7 16:30:03 PDT 2007
$
$
Jared points out that rman needs access to extproc:
$ ls -la /h/oracle/product/10r2/bin/extproc
-rwsr-x--- 1 rman dba 34468 Sep 21 2006 /h/oracle/product/10r2/bin/extproc
$
$
Here is a demo of rman running his script:
bash sol root /h/oracle/product/10r2/bin 35 # su - rman
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$
$
$ ls
scripts
$
$
$ scripts/tst.sh
$
$
$ cat scripts/tst.sh
#! /bin/sh
/usr/bin/date > /tmp/tst.sh.out.txt 2>&1 &
exit 0
$
$
$ cat /tmp/tst.sh.out.txt
Fri Sep 7 16:31:23 PDT 2007
$
$ rm /tmp/tst.sh.out.txt
$
I am focused on this error:
ORA-27369: job of type EXECUTABLE failed with exit code: 274662
And I am focused on this exit code: 274662
What does 274662 mean?
If the Scheduler gives me an error like "274662" rather than some English,
it's obvious to me the Scheduler is a POS and I should not use it.
And of course,
If I cannot run RMAN from Oracle Scheduler, I'll use cron.
-Owen -
How to run an eCATT script in a cyclic mode?
Hi,
I want to run an eCATT script in a cyclic mode. i.e. It should be run for every 15 min.
Is there any option to do this?
Please revert back if you want any other info.
Thanks,
Nagarajan M,
9820586549Yes, java.lang.Runtime.exec().
Read this carefully before you do:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Don't write a line of code before you're reviewed and understood the article completely. - MOD
Maybe you are looking for
-
Error Message "No plugins are installed"
Hi I have download Oracle Migration Workbench 10.1.0.4 and unzipped I need to migrate from DB2 8.2 to Oracle 9i When i am trying to create database repository getting error message "No plugins are installed, please install the plugin for the database
-
Hi, I have a new Dell Desktop PC, running Windows 8.1. I have a fresh install of VS 2013 Professional, I created the simplest C++ console application. If I set the breakpoints before debug starts, everything is fine. but once inside a debug ses
-
BAPI_ACC_DOCUMENT_POST tax line items issue
Hi All, i am posting a document using BAPI_ACC_DOCUMENT_POST... Please find the below code: Populate BAPI item structures FORM fill_bapi_item . *Local data declarations DATA : lv_taxded TYPE bset-fwste, lv_taxtot TYPE bset-fwste,
-
I downloaded Mavericks and it won't install. I did re-set my password and when I click on Install for Mavericks, I still get a box for "administrator password" and it still won't accept my new password. Is there a difference between my Apple ID and t
-
Programs which are not being executed
Hi, We are planning to do the application upgrade in few months,with respectto that we would like to find out what all programs/transactions(standard or custom) which are not being executed for a specific period.What is the way to find this? Regards,