I need your help. I have an SQL file (Oracle DB) like:
drop user &1 cascade;
CREATE USER &1 IDENTIFIED BY &2
DEFAULT TABLESPACE Cmpny_USR TEMPORARY TABLESPACE TEMP;
grant alter session,
create cluster,
create database link,
create procedure,
create sequence,
create session,
create synonym,
create role,
create table,
create trigger,
create view
to &1;
alter user &1 quota unlimited on Cmpny_INDX;
alter user &1 quota unlimited on Cmpny_USR;
alter user &1 quota 0K on system;
With a batch or shell file, I want to automate the process to drop and create the same user. So if I pass a parameter to the batch file like "user1", I want that the input is passed to the sql file. The sql script should be executed with this parameter. My latest batch file looks like this:
@echo off
PUSHD \\%~P0
:ask
set /p portnr=Please select user to be deleted:
echo User with %portnr% will be deleted. To continue press j, else n.
set /p jodern=j or n:
timeout /t 3
if "%jodern%"=="n" goto ask
if "%jodern%"=="j" goto execute
:execute
???
jorn? for instance,J? Consider to usechoicerather thanset /P…