call ggsci using batch file from windows- get error - GoldenGate

i create a script to use ggsci, start manager, extract and replicat.
i have success doing this in my linux.
here is one of my script : start_ext1.sh
cd /u01/app/oracle/ggs
./ggsci <<EOF
start manager
start ext_s
exit
EOF
clear
i have an error when i do this using batch file from windows.
here is the batch file :
#echo off
cd C:\putty
plink.exe -ssh -2 -P 22 oraclegg#192.168.111.182 -pw oracle "./start_ext1.sh"
every time i try to enter ggsci when i run that batch file, i get this error :
./ggsci: error while loading shared libraries: libnnz10.so: cannot open shared object file: No such file or directory
i didn't get this error when i run the script in linux.
is there anybody can help me?
thanks a lot! 

problem solved!
add : . ./.bash_profile before enter ggsci.
it's worked! :)

Related

EPMA batch client

I am trying to run epma batch client using batch file. but it is not returnng anythinh. set EPMADrive=E:\EPMAStatusset EPMAbatchclient=E:\Oracle\Middleware\EPMSystem11R1\products\Foundation\BPMA\EPMABatchClient\ %EPMAbatchclient%epma-batch-client.bat -C"%EPMADrive%\EPMAScript.txt" -R"%EPMADrive%\EPMABatchCurrentStatus.txt IF ERRORLEVEL 0 goto COMPLETED_SUCCESSIF ERRORLEVEL 800 goto FAILED  :COMPLETED_SUCCESSCSCRIPT "E:\SendEmail.vbs" "Emailid" "E:\SendToList.txt" "%COMPUTERNAME% - EPMA Restarted Successfully" "Please Verify attached log file for status -- %Status%" "%EPMADrive%\EPMABatchCurrentStatus.txt" "EMAIL_SUCCESS" "smtp.Server.com" "" ""  :FAILEDCSCRIPT "E:\SendEmail.vbs" "Emailid" "E:\SendToList.txt" "%COMPUTERNAME% - EPMA Failed" "Please Verify attached log file for status -- %Status%" "%EPMADrive%\EPMABatchCurrentStatus.txt" "EMAIL_SUCCESS" "smtp.Server.com" "" "" when it is success it will execute completed_success otherwise it will execute failed . But none of them is executing even though it is success
Have you tried with %ERRORLEVEL% instead of ERRORLEVELAlso echo the %ERRORLEVEL% before the IF statement to make sure it is being capturedYou can also try using  CALL epma-batch-client.batCheers John

running setup.sql

I am getting the below error after i run setup.sh #C:\Users\may_har\Desktop\labs\labs\labs\setup_files\setup.sql Error starting at line : 9 File # C:\Users\may_har\Desktop\labs\labs\labs\setup_files\create_tables.sqlIn command -connect ora1/ora1#&pdbnameError report -Connection FailedCommit
Hi, Are you using the VM?Is your database up and running?Did you follow the steps given in the Getting Started Guide to run the Setup.sql?

strange KSH behavior

I am running ksh : ksh --version                                   version         sh (AT&T Research) 93u+ 2012-08-01 I have a file (b1) containing the following:AAABBBCCCC I have a second file (b2) containing the following12345432AAAA987 I run an interactive shell that goes like thiscat a2 | while read a ; dogrep $a b2done My output looks like thisAAAAgrep: grep: cannot execute [Exec format error]grep: grep: cannot execute [Exec format error]   This is not data related as i manually created the above file with an editor simulating what i do with real world data. This works for some users.  I am  trying to narrow down what in the environment may be different.  Any suggestions?
Check the process group id being set for your users. The most likely reason would be that the posix_spawn() for 'grep' failed because the process group id of the posix_spawn_attributes became invalid.The first invocation of the grep command in the pipe would had exited successfully while the remaining invocations would had incorrectly received anEPERM causing ksh to interpret it as a script causing the "Exec format" error. See more detailed info about posix_spawn: posix_spawn Check the differences between acls for the users.

not able to execute script

hi,
I have 2 questions
Ques1.) I have one script(profile.ksh) and I execting it by
# . ./profile.ksh
ksh: ./profile.ksh: not found
can any1 tell me why I am getting this error??
on the other side when I am executing it by
ksh profile.ksh
it is executing.
Ques2.) in profile.ksh I want to set some envirnment variable but I am not able to set it
I am writing some variables which I have to set
COMMON_USER_HOME=${HOME}
export COMMON_USER_HOME
echo COMMON_USER_HOME=$COMMON_USER_HOME
export P4USER="AbcdeF"
echo P4USER=$P4USER
but when I am running my file profile.ksh and echoing the variable then I am able to see the output of the variables:
# echo $SHELL
/bin/sh
COMMOM_USER_HOME=/home/User1
P4USER=AbcdeF
but not able to see it as exported when using set commond 
Sangyesh wrote:
hi,
I have 2 questions
Ques1.) I have one script(profile.ksh) and I execting it by
# . ./profile.ksh
ksh: ./profile.ksh: not found
can any1 tell me why I am getting this error??
on the other side when I am executing it by
ksh profile.ksh
it is executing.Why are you running the first one as "./profile.ksh" and the second one as "profile.ksh"?
Does the file exist in your current directory?
$ ls ./profile.ksh
Ques2.) in profile.ksh I want to set some envirnment variable but I am not able to set it
I am writing some variables which I have to set
COMMON_USER_HOME=${HOME}
export COMMON_USER_HOME
echo COMMON_USER_HOME=$COMMON_USER_HOME
export P4USER="AbcdeF"
echo P4USER=$P4USER
but when I am running my file profile.ksh and echoing the variable then I am able to see the output of the variables:
# echo $SHELL
/bin/sh
COMMOM_USER_HOME=/home/User1
P4USER=AbcdeF
but not able to see it as exported when using set commondIf you run the command as a separate process
$ profile.ksh
Then it does not chang your current shell's environment.
Sourcing the file with "." (as in your first example) runs the commands in your current shell, so they would take effect.
--
Darren

Permissions issues with Service

We are running Windows Server 2008 R2 sp 1 x64, the account I am using is in a group that is in the administrators group. I have installed Oracle Goldengate as a service and am having trouble starting from the ggsci.exe and command line "net start GGSMGR", I can only start the service from mmc.exe. I can stop the service with ggsci.exe but am not able to stop the service with the command line net stop GGSMGR. If you I us the run as administrator option to execute the command line net start/stop it will work. The error I am getting on the command line is "System error 5 has occurred. Access is denied." and the error message from the ggsci.exe when the start mgr command is run is "Process creation error: WIN32 API CALL CreateProcess failed 740 (The requested operation requires elevation.)".
I have an open ticket with Oracle SR 3-6406641351 but this seems to be a permissions issue with the OS, any help would be greatly appreciated.

Categories

Resources