Unsolved

This post is more than 5 years old

5 Posts

4065

July 23rd, 2014 06:00

Database Restore failed from Networker for Sybase database

Dear Friends,

We take backup from networker solution of our Sybase database server , backup is happening on daily basis but when we try to restore the database from the mentioned command it give error "43394:nsrsybrc: Failed to open OCS library. Please ensure dynamic library path is set to appropriate OCS library path"

The command which i use to restore is nsrsybrc -Usapsa -Pxxx -snetworker.apg.com -d SYBASE:/SAPMPD/MPD SYBASE:/MTLDQ/MDV

Regards,

Islam

4 Operator

 • 

1.3K Posts

July 23rd, 2014 06:00

Can you ensure that all the SYBASE related environment variables are set correctly for the login that you are using to run the recover command.

5 Posts

July 23rd, 2014 10:00

Hi,

Thanks for the reply , please find the below env variable details below , i have user root , sybsid and sidadm ids to restore the db but could not done.

SAPMPD:~ # env

LESSKEY=/etc/lesskey.bin

NNTPSERVER=news

INFODIR=/usr/local/info:/usr/share/info:/usr/info

MANPATH=/usr/share/man:/usr/local/man

HOSTNAME=SAPMPD

XKEYSYMDB=/usr/share/X11/XKeysymDB

HOST=SAPMPD

SHELL=/bin/bash

TERM=xterm

PROFILEREAD=true

HISTSIZE=1000

MORE=-sl

LC_ALL=C

USER=root

LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:

XNLSPATH=/usr/share/X11/nls

ENV=/etc/bash.bashrc

HOSTTYPE=x86_64

FROM_HEADER=

PAGER=less

CSHEDIT=emacs

XDG_CONFIG_DIRS=/etc/xdg

MINICOM=-c on

MAIL=/var/spool/mail/root

PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin

CPU=x86_64

INPUTRC=/etc/inputrc

PWD=/root

LANG=C

PYTHONSTARTUP=/etc/pythonstart

QT_SYSTEM_DIR=/usr/share/desktop-data

SHLVL=1

HOME=/root

LESS_ADVANCED_PREPROCESSOR=no

OSTYPE=linux

LS_OPTIONS=-A -N --color=tty -T 0

XCURSOR_THEME=DMZ

WINDOWMANAGER=/usr/bin/gnome

LESS=-M -I

MACHTYPE=x86_64-suse-linux

LOGNAME=root

XDG_DATA_DIRS=/usr/share:/etc/opt/kde3/share:/opt/kde3/share

LESSOPEN=lessopen.sh %s

INFOPATH=/usr/local/info:/usr/share/info:/usr/info

LESSCLOSE=lessclose.sh %s %s

G_BROKEN_FILENAMES=1

COLORTERM=1

_=/usr/bin/env

SAPMPD:~ #

4 Operator

 • 

14.3K Posts

July 23rd, 2014 11:00

What about SYBASE_OCS variable?

See: SyBooks Online I do realize this is required on Windows, but it may do the trick here as well.

5 Posts

July 25th, 2014 02:00

Dear Friends,

Thanks for your valuable reply , my problem while running backup restore command is when i run command as root user its give the error as "43394:nsrsybrc: Failed to open OCS library. Please ensure dynamic library path is set to appropriate OCS library path" as it could not find the OCS library as i don't know how to set environment variable for root user also need to give db command support authorization to root.

Second issues when i run the backup restore command as Sybase user then sybase user doesn't have authorization to run the backup restore command exe file i.e nsrsybrc.

Please guide me to resolve the issue.

Regards,

Islam

4 Operator

 • 

14.3K Posts

July 25th, 2014 02:00

I think you should run restore as sybase user.  As for authorization of that user, are you talking about permissions on config file of some kind or access to index on server?  Later one is easy to fix by just adding user@box into DB admin group (or admin group - depending on your setup).  If you have shared the log/error, it would be easier to say what to do next.

5 Posts

August 11th, 2014 05:00

Hi,

I am running this command from root user below is the command with error . Tried running this command from sybase user but its giving below error

(nsrsybrc -Usapsa -Ppass1234 -snetworker.apg.com -d SYBASE:/SAPMPD/MPD SYBASE:/MTLDQ/MDV

nsrsybrc: Command not found)

Running command as root user

nsrsybrc -Usapsa -Ppass1234 -snetworker.apg.com -d SYBASE:/192.168.32.113/MPD SYBASE:/192.168.29.22/MDV

24148:nsrsybrc: CT-LIBRARY error:

        ct_connect(): directory service layer: internal directory control layer error: Requested server name not found.

75752:nsrsybrc: The login to the Sybase ASE server failed.

Below is the root Environment variable i have marked the sybase environment variable which i had added.

SAPMPD:/etc # env

LESSKEY=/etc/lesskey.bin

NNTPSERVER=news

INFODIR=/usr/local/info:/usr/share/info:/usr/info

MANPATH=/usr/share/man:/usr/local/man

HOSTNAME=SAPMPD

XKEYSYMDB=/usr/share/X11/XKeysymDB

HOST=SAPMPD

TERM=xterm

SHELL=/bin/bash

PROFILEREAD=true

HISTSIZE=1000

SSH_CLIENT=192.168.32.105 11829 22

MORE=-sl

OLDPWD=/root

SCROOT=/sybase/MPD/shared/sybcentral600

SSH_TTY=/dev/pts/0

LC_ALL=C

USER=root

LD_LIBRARY_PATH=/sybase/MPD/ASE-15_0/lib:/sybase/MPD/OCS-15_0/lib:/sybase/MPD/OCS-15_0/lib3p64:/sybase/MPD/OCS-15_0/lib3p:

LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:

SYBASE_OCS=OCS-15_0

XNLSPATH=/usr/share/X11/nls

LIB=/sybase/MPD/OCS-15_0/lib:

ENV=/etc/bash.bashrc

SYBROOT=/sybase/MPD

HOSTTYPE=x86_64

SYBASE=/sybase/MPD

FROM_HEADER=

PAGER=less

CSHEDIT=emacs

XDG_CONFIG_DIRS=/etc/xdg

MINICOM=-c on

MAIL=/var/mail/root

PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin

CPU=x86_64

SSH_SENDS_LOCALE=yes

INPUTRC=/etc/inputrc

PWD=/etc

LANG=C

PYTHONSTARTUP=/etc/pythonstart

SYBASE_JRE_RTDS=/sybase/MPD/shared/JRE-6_0_24_64BIT

QT_SYSTEM_DIR=/usr/share/desktop-data

SHLVL=1

HOME=/root

LESS_ADVANCED_PREPROCESSOR=no

OSTYPE=linux

LS_OPTIONS=-A -N --color=tty -T 0

XCURSOR_THEME=DMZ

WINDOWMANAGER=/usr/bin/gnome

LESS=-M -I

MACHTYPE=x86_64-suse-linux

LOGNAME=root

XDG_DATA_DIRS=/usr/share:/etc/opt/kde3/share:/opt/kde3/share

SSH_CONNECTION=192.168.32.XX 11829 192.168.32.XX 22

LESSOPEN=lessopen.sh %s

SYBASE_WS=WS-15_0

INFOPATH=/usr/local/info:/usr/share/info:/usr/info

INCLUDE=/sybase/MPD/OCS-15_0/include:

LESSCLOSE=lessclose.sh %s %s

G_BROKEN_FILENAMES=1

SYBASE_ASE=ASE-15_0

COLORTERM=1

_=/usr/bin/env

Regards,

Islam

4 Operator

 • 

14.3K Posts

August 11th, 2014 06:00

First error suggests that your path is not set to folder which contains binary.  Use full path to call command or reset PATH variable.  Second error (with root user) suggests DB auth does not allow connections from root (despite using user/pass from sa) or data used to connect is somewhat not what has been expected.

No Events found!

Top