0

Hi there I got a little problem with a small bit of code am unfamiliar with orcale database the scripts I have were done by a other person for version 6/7 am currently using version 8i for compatibley reasons with the server software I am currently setting up.

the script am using generates the following error's

Enter value for 1: old   1: CREATE ROLE &1._role
new   1: CREATE ROLE   GRANT CONNECT    TO &1._role;_role
CREATE ROLE   GRANT CONNECT    TO &1._role;_role
              *
ERROR at line 1:
ORA-01937: missing or invalid role name


Enter value for 1: old   1:   GRANT RESOURCE  TO &1._role
new   1:   GRANT RESOURCE  TO   GRANT EXP_FULL_DATABASE TO &1._role;_role
  GRANT RESOURCE  TO   GRANT EXP_FULL_DATABASE TO &1._role;_role
                                                     *
ERROR at line 1:
ORA-00911: invalid character


Enter value for 1: old   1:   GRANT IMP_FULL_DATABASE TO &1._role
new   1:   GRANT IMP_FULL_DATABASE TO   GRANT CREATE ANY SYNONYM TO &1._role;  _role
  GRANT IMP_FULL_DATABASE TO   GRANT CREATE ANY SYNONYM TO &1._role;  _role
                                                              *
ERROR at line 1:
ORA-00911: invalid character


Enter value for 1: old   1:   GRANT DROP ANY SYNONYM TO &1._role
new   1:   GRANT DROP ANY SYNONYM TO _role
  GRANT DROP ANY SYNONYM TO _role
                            *
ERROR at line 1:
ORA-00911: invalid character


Enter value for 1: Enter value for 2: old   1: CREATE USER &1  IDENTIFIED BY &2
new   1: CREATE USER   IDENTIFIED BY GRANT &1._role TO &1;
CREATE USER   IDENTIFIED BY GRANT &1._role TO &1;
              *
ERROR at line 1:
ORA-01935: missing user or role name

here is the code am using

REM USAGE: @ous <USERNAME> <PASSWORD>
REM Creates a <USERNAME> identified by <PASSWORD>

CREATE ROLE &1._role;
  GRANT CONNECT         TO &1._role;
  GRANT RESOURCE        TO &1._role;
  GRANT EXP_FULL_DATABASE   TO &1._role;
  GRANT IMP_FULL_DATABASE   TO &1._role;
  GRANT CREATE ANY SYNONYM  TO &1._role;  
  GRANT DROP ANY SYNONYM    TO &1._role;  

CREATE USER &1      IDENTIFIED BY &2
    QUOTA UNLIMITED ON gam_lgtab
    QUOTA UNLIMITED ON gam_bintab
    QUOTA UNLIMITED ON gam_tab
    QUOTA UNLIMITED ON gam_ind
    TEMPORARY TABLESPACE temp;

GRANT &1._role TO &1; 

can anyone help me fix this thank you a working example would be great due to my lack of knowledge with this database system.

thanks alot :)

Edited by Simon180

2
Contributors
1
Reply
11
Views
3 Years
Discussion Span
Last Post by pritaeas
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.