Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

ct_init: attemp to load protocal failed

11 posts in Backup and Recovery Last posting was on 2001-05-18 19:29:59.0Z
MJH Posted on 2001-05-16 13:16:18.0Z
From: MJH
Date: Wed, 16 May 2001 09:16:18 -0400
Newsgroups: sybase.public.sqlserver.backup+recovery
Subject: ct_init: attemp to load protocal failed
Message-ID: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums>
Lines: 12
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:260
Article PK: 1060775

Okay, I'm running Sybase 12 on AIX 4.2. I have created scripts for dbcc's
of the databases and for dumps of the databases. Running them from a
command line they executed properly, write out to the correct directories,
and mail out the pertinent information. The problem I'm running into is,
when I set them up to run in a cron they error off with the following
message:

CS-LIBRARY error:
ct_init(): network packet layer: internal net library error:
Attempt to load protocol driver failed
Attempting to obtain a localized error message failed.

Any help would be appreciated.


Kent Posted on 2001-05-18 19:29:59.0Z
From: Kent
Date: Fri, 18 May 2001 15:29:59 -0400
Newsgroups: sybase.public.sqlserver.backup+recovery
Subject: Re: ct_init: attemp to load protocal failed
Message-ID: <7D61D016BCC6C23A006B1DA585256A50.004C399885256A4E@webforums>
References: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums>
Lines: 8
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:245
Article PK: 1060761

I'm assuming that when you say your running this from a command
line you're the sybase login. If the script works as Sybase but
not from cron, try executing Sybase's .profile in the script
that fires from cron. This should set all default environment
vars correctly. Don't set path in your script. I believe this
is what Milos was mentioning about the ASE-12_0.sh execution.

kent


PB Posted on 2001-05-18 14:45:34.0Z
Reply-To: "PB" <prasad@communicatorinc.com>
From: "PB" <prasad@communicatorinc.com>
References: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums>
Subject: Re: ct_init: attemp to load protocal failed
Date: Fri, 18 May 2001 10:45:34 -0400
Lines: 28
Organization: Communicator, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <lhX8Cw63AHA.164@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.backup+recovery
NNTP-Posting-Host: 63.236.129.10
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:251
Article PK: 1060769

Why don't you give full path?

We have set up like this.

0 23 * * * (. /opt/sybase/jobs/env/cronenv; /opt/sybase/jobs/dbcc.sh SERVER
> /opt/sybase//log/dbcc/dbcc.SERVER.log.$TODAY.$NOW 2>&1 )

Where our cronenv file defines all variable and values including SYBASE,
PATH, TODAY, NOW.

<MJH> wrote in message
news:6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums...
> Okay, I'm running Sybase 12 on AIX 4.2. I have created scripts for dbcc's
> of the databases and for dumps of the databases. Running them from a
> command line they executed properly, write out to the correct directories,
> and mail out the pertinent information. The problem I'm running into is,
> when I set them up to run in a cron they error off with the following
> message:
>
> CS-LIBRARY error:
> ct_init(): network packet layer: internal net library error:
> Attempt to load protocol driver failed
> Attempting to obtain a localized error message failed.
>
> Any help would be appreciated.


MJH Posted on 2001-05-18 18:28:12.0Z
From: MJH
Date: Fri, 18 May 2001 14:28:12 -0400
Newsgroups: sybase.public.sqlserver.backup+recovery
Subject: Re: ct_init: attemp to load protocal failed
Message-ID: <5E476C1E59E043D80065759C85256A50.00535EDF85256A50@webforums>
References: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums> <lhX8Cw63AHA.164@forums.sybase.com>
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:248
Article PK: 1060767

Is your cron set up as a root cron or sybase cron?


PB Posted on 2001-05-18 19:07:26.0Z
Reply-To: "PB" <prasad@communicatorinc.com>
From: "PB" <prasad@communicatorinc.com>
References: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums> <lhX8Cw63AHA.164@forums.sybase.com> <5E476C1E59E043D80065759C85256A50.00535EDF85256A50@webforums>
Subject: Re: ct_init: attemp to load protocal failed
Date: Fri, 18 May 2001 15:07:26 -0400
Lines: 7
Organization: Communicator, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <64E6WC93AHA.261@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.backup+recovery
NNTP-Posting-Host: 63.236.129.10
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:246
Article PK: 1060764

It is set up as sybase

<MJH> wrote in message
news:5E476C1E59E043D80065759C85256A50.00535EDF85256A50@webforums...
> Is your cron set up as a root cron or sybase cron?


MJH Posted on 2001-05-18 18:49:19.0Z
From: MJH
Date: Fri, 18 May 2001 14:49:19 -0400
Newsgroups: sybase.public.sqlserver.backup+recovery
Subject: Re: ct_init: attemp to load protocal failed
Message-ID: <5E2727E9D62F8DEB0067641885256A50.0065F35185256A50@webforums>
References: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums> <lhX8Cw63AHA.164@forums.sybase.com> <5E476C1E59E043D80065759C85256A50.00535EDF85256A50@webforums>
Lines: 6
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:247
Article PK: 1060765

PB,
One more thing. I have set up my variable and values in the actual dbcc
script. But I'm sure that I'm missing something in the PATH. It runs fine
from the command line but from the cron I get the ct_init error as stated
in the first msg. I have it set up in the sybase cron. I've tried all
previous suggestions and I'm still not doing something right.


Milos Dedecek Posted on 2001-05-16 14:38:14.0Z
From: "Milos Dedecek" <Milos.Dedecek@sybase.com>
References: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums>
Subject: Re: ct_init: attemp to load protocal failed
Date: Wed, 16 May 2001 15:38:14 +0100
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <MdctHBh3AHA.178@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.backup+recovery
NNTP-Posting-Host: mdedecek.sybase.com 158.76.45.254
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:259
Article PK: 1060776

Verify you're setting environmental variables when launching your scripts
from the cron. Perhaps PATH, SYBASE or ASE variables are not set correctly.
Try to include ~/.whatever.rs into your script to do it for you.

Milos.

<MJH> wrote in message
news:6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums...
> Okay, I'm running Sybase 12 on AIX 4.2. I have created scripts for dbcc's
> of the databases and for dumps of the databases. Running them from a
> command line they executed properly, write out to the correct directories,
> and mail out the pertinent information. The problem I'm running into is,
> when I set them up to run in a cron they error off with the following
> message:
>
> CS-LIBRARY error:
> ct_init(): network packet layer: internal net library error:
> Attempt to load protocol driver failed
> Attempting to obtain a localized error message failed.
>
> Any help would be appreciated.


MJH Posted on 2001-05-16 20:25:00.0Z
From: MJH
Date: Wed, 16 May 2001 16:25:00 -0400
Newsgroups: sybase.public.sqlserver.backup+recovery
Subject: Re: ct_init: attemp to load protocal failed
Message-ID: <C01684F986CD722F007026EE85256A4E.004F102B85256A4E@webforums>
References: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums> <MdctHBh3AHA.178@forums.sybase.com>
Lines: 13
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:255
Article PK: 1060773

Thanks for responding, I think the variable are set correctly, well
obviously they are not if it's not running. Any way, here is an shot at
what I have set:

PATH=/usr/ucb:/usr/sbin:/usr/bin:/etc:/sybase/bin:/sybase/install:/sybase/OCS-12_0/bin:/sybase/ASE-12_0/bin:/sybase/ASE-12_0/init:/sybase/ASE-12_0/install:.
SYBASE=/sybase
DSQUERY=/TEST_UNIX
HOME=/sybase
export PATH SYBASE DSQUERY HOME
SRVR=TEST_UNIX

If you would can you explain the ~/.whatever.rs. I don't know where to
find that or what it does. Keep in mind here that I'm new to this stuff.
Thanks.


Milos Dedecek Posted on 2001-05-17 09:00:57.0Z
From: "Milos Dedecek" <Milos.Dedecek@sybase.com>
References: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums> <MdctHBh3AHA.178@forums.sybase.com> <C01684F986CD722F007026EE85256A4E.004F102B85256A4E@webforums>
Subject: Re: ct_init: attemp to load protocal failed
Date: Thu, 17 May 2001 10:00:57 +0100
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <ibw4Vpq3AHA.164@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.backup+recovery
NNTP-Posting-Host: mdedecek.sybase.com 158.76.45.254
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:254
Article PK: 1060772

After instalation of ASE, there are 2 files generated in $SYBASE/ASE-12_0/
directory: ASE-12_0.csh and ASE-12_0.sh. They correctly set up all
environmental variables according to your instalation (which one you use
depends on login shell of 'sybase' user). The ~/.whatever.rs file I meant
copying one of those to your home directory and renaming it to a file, which
your login shell reads upon startup - that is one way to do it.

Also ensure you're running your script as a 'sybase' login. Cron runs under
'root' login! Use the 'su' command to change identity.

Sure DSQUERY=/TEST_UNIX is correct? The slash is suspicious.

Milos.

<MJH> wrote in message
news:C01684F986CD722F007026EE85256A4E.004F102B85256A4E@webforums...
> Thanks for responding, I think the variable are set correctly, well
> obviously they are not if it's not running. Any way, here is an shot at
> what I have set:
>
>

PATH=/usr/ucb:/usr/sbin:/usr/bin:/etc:/sybase/bin:/sybase/install:/sybase/OC
S-12_0/bin:/sybase/ASE-12_0/bin:/sybase/ASE-12_0/init:/sybase/ASE-12_0/insta
ll:.
> SYBASE=/sybase
> DSQUERY=/TEST_UNIX
> HOME=/sybase
> export PATH SYBASE DSQUERY HOME
> SRVR=TEST_UNIX
>
> If you would can you explain the ~/.whatever.rs. I don't know where to
> find that or what it does. Keep in mind here that I'm new to this stuff.
> Thanks.


MJH Posted on 2001-05-17 20:24:22.0Z
From: MJH
Date: Thu, 17 May 2001 16:24:22 -0400
Newsgroups: sybase.public.sqlserver.backup+recovery
Subject: Re: ct_init: attemp to load protocal failed
Message-ID: <EC4F08C76871CF560070185885256A4F.002EBE8D85256A4F@webforums>
References: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums> <MdctHBh3AHA.178@forums.sybase.com> <C01684F986CD722F007026EE85256A4E.004F102B85256A4E@webforums> <ibw4Vpq3AHA.164@forums.sybase.com>
Lines: 16
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:253
Article PK: 1060771

still haven't gotten it. I know it has something to do with the PATH set
up. Look at what I have for that:

#!/bin/sh
# -x
PATH=/usr/ucb:/usr/sbin:/usr/bin:/etc:/sybase/bin:/sybase/install:/sybase/OCS-12_0/bin:/sybase/ASE-12_0/bin:/sybase/ASE-12_0/init:/sybase/ASE-12_0/install:.
SYBASE=/sybase
DSQUERY=TEST_UNIX
HOME=/sybase
export PATH SYBASE DSQUERY HOME
SRVR=TEST_UNIX
USERID=operator
PASSWD=operator
SYBASE_DUMP=/sybase/backups/dbcc
dat=`date +%Y%m%d%H%M`


Milos Dedecek Posted on 2001-05-18 10:51:03.0Z
From: "Milos Dedecek" <Milos.Dedecek@sybase.com>
References: <6B41CE4C635A3DA50048E78285256A4E.0048E79185256A4E@webforums> <MdctHBh3AHA.178@forums.sybase.com> <C01684F986CD722F007026EE85256A4E.004F102B85256A4E@webforums> <ibw4Vpq3AHA.164@forums.sybase.com> <EC4F08C76871CF560070185885256A4F.002EBE8D85256A4F@webforums>
Subject: Re: ct_init: attemp to load protocal failed
Date: Fri, 18 May 2001 11:51:03 +0100
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <E7YajL43AHA.261@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.backup+recovery
NNTP-Posting-Host: mdedecek.sybase.com 158.76.45.254
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:252
Article PK: 1060770

Try running the following command from the cron:
su - sybase -c your_script

This will behave the same as way as from the command line. (Check man su for
details.)

Milos.