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.

Hide login passwords for isql or bcp on NT?

4 posts in Windows NT Last posting was on 2000-09-18 22:26:26.0Z
Gary R. Morrison Posted on 2000-09-07 13:32:28.0Z
Message-ID: <39B798EC.81AEB617@cac.net>
Date: Thu, 07 Sep 2000 09:32:28 -0400
From: "Gary R. Morrison" <grmorrison@cac.net>
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Hide login passwords for isql or bcp on NT?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 11
NNTP-Posting-Host: 000-233.dsl.popsite.net 64.24.0.233
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1666
Article PK: 1089137

How can I hide the sybase login passwords when running batch jobs from
command prompt?

I'm new to NT. With UNIX, it is possible to store the password in a
.file, and then read the .file contents into a variable, then pass the
variable to the isql or bcp job.

I tried creating a system variable, but that can be displayed via echo.

Thoughts?

Thanks.

lritter@CreativeSolutions.com


mathias FATENE Posted on 2000-09-10 23:05:21.0Z
From: "mathias FATENE" <mohdoukali@aol.com>
Subject: Re: Hide login passwords for isql or bcp on NT?
References: <39B798EC.81AEB617@cac.net>
Message-ID: <01c01b78$c79610a0$759900c1@default>
X-Newsreader: Microsoft Internet News 4.70.1155
Newsgroups: sybase.public.sqlserver.nt
Date: Sun, 10 Sep 2000 19:05:21 -0400
Lines: 29
NNTP-Posting-Host: ACA3A8AD.ipt.aol.com 172.163.168.173
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1660
Article PK: 1089133

Hi,
I worked a long time with Solaris and Now i'm on NT. You can do a lot with
solaris which becomes difficult with NT, but there is always a solution.
You can create the same file on NT system, but name it as (say) CONFIG.cmd.
In this file you put :

set server=YOURSERVER
ser user=YOURUSER
set password=YOURPASSWORD

and put the good protection (read by the owner - you).

In the script batch (say batch.cmd), your type :

call CONFIG.cmd ## Now, your variables are known in the session
isql -U%user% -S.....

that's this.

Mathias FATENE
mohdoukali@aol.com


Gary R. Morrison <grmorrison@cac.net> a écrit dans l'article
<39B798EC.81AEB617@cac.net>...

> How can I hide the sybase login passwords when running batch jobs from
> command prompt?
>
> I'm new to NT. With UNIX, it is possible to store the password in a
> .file, and then read the .file contents into a variable, then pass the
> variable to the isql or bcp job.
>
> I tried creating a system variable, but that can be displayed via echo.
>
> Thoughts?
>
> Thanks.
>
> lritter@CreativeSolutions.com
>
>


Anonymous Posted on 2000-09-18 22:26:26.0Z
From: Anonymous@sybase.com
Date: Mon, 18 Sep 2000 18:26:26 -0400
Newsgroups: sybase.public.sqlserver.nt
Subject: Re: Hide login passwords for isql or bcp on NT?
Message-ID: <891E023EAEACDDE9007B45498525695E.008035D385256956@webforums>
References: <39B798EC.81AEB617@cac.net> <01c01b78$c79610a0$759900c1@default>
Lines: 10
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.nt:1626
Article PK: 1089101

hello,

with this approach, (using COFIG.cmd etc) i get an error message,
Msg 102, Level 15, State 1:
Server 'server', Line xxx:
Incorrect syntax near '%'.

any ideas ?

thanks !


David Owen Posted on 2000-09-07 16:19:40.0Z
Sender: dowen@kashka.midsomer.org
Subject: Re: Hide login passwords for isql or bcp on NT?
References: <39B798EC.81AEB617@cac.net>
From: David Owen <dowen@midsomer.org>
Organization: Midsomer Consultants Inc.
Date: 07 Sep 2000 10:19:40 -0600
Message-ID: <m2pumguqcj.fsf@kashka.midsomer.org>
Lines: 23
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: h24-70-23-180.cg.shawcable.net 24.70.23.180
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1664
Article PK: 1089141

>>>>> "Gary" == Gary R Morrison <grmorrison@cac.net> writes:

Gary> How can I hide the sybase login passwords when running batch jobs
Gary> from command prompt?

...

Gary> I tried creating a system variable, but that can be displayed via
Gary> echo.

How do you mean it can be displayed via echo? I did not think that you
could view NT variables outside of a scripts scope.

To be completely honest I think that you would be a million times better
off doing this using Sybperl (which runs the same on both Unix and NT). I
know that there is a bit more to type to get the results back and process
them, but it is not that much more using isql.

dowen

--
David Owen Midsomer Consultants Inc. dowen@midsomer.org
Maintainer of the Sybase FAQ: http://www.isug.com/Sybase_FAQ