Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: usernames
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
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