Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: usernames

Re: usernames

From: Ed Stevens <nospam_at_noway.nohow>
Date: Wed, 23 Feb 2005 07:24:20 -0600
Message-ID: <on0p119jv66cm0i4mirnpbmgup02d9ltbp@4ax.com>


On Tue, 22 Feb 2005 14:25:28 +0100, Cris Carampa <cris119_at_operamail.com> wrote:

>lambu999_at_yahoo.com wrote:
>
>> Is there a different script for Windows. Thanks
>
>If Windows don't support the '<<' mechanism, you can create a SQL file
>using notepad, e.g.:
>
>--- q.sql ---
>set pages 100
>set pause off
>set feedback off
>set head off
>select username from all_users ;
>quit
>-------------
>
>and then the sqlplus (not sqlplusw!) command would be:
>
>sqlplus -s un/pw_at_db @q.sql > usernames.txt
>
>Kind regards,

Even in Windows you could create the sql on the fly, just with a different technique:

rem ----- begin windows script ----
rem - create the sql script

echo set pages 100     > q.sql
echo set pause off      >> q.sql
echo set feedback off >> q.sql
echo set head off          >> q.sql
echo select username from all_users ;  >> q.sql
echo exit              >> q.sql

rem -- execute the sql script
sqlplus myuser/mypwd_at_mydb @q.sql
exit
rem --- end windows script ----

beware of security issues of having password hardcoded in a clear-text script.
Thanks.

Cohn's Law: The more time you spend in reporting on what you are doing, the less time you have to do anything. Stability is achieved when you spend all your time doing nothing but reporting on the nothing you are doing. Received on Wed Feb 23 2005 - 07:24:20 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US