Discussion:
19.3 - Hard Coded Schema Names Issue
Maxim
2021-03-18 19:43:38 UTC
Permalink
I can't reproduce your issue:

SQL> connect schemaname/schemaname
Connected.
SQL> select banner from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

SQL> CREATE VIEW TEST_VW AS SELECT * FROM schemaname.TEST;

View created.

I would probably enable 10046 to see, what happens.

Regards

Maxim
Hello all,
connect schemaname
CREATE VIEW TEST_VW AS SELECT * FROM schemaname.TEST;
will result in
ORA-02000: missing VIEW keyword
Removing the hard coded schema name removes the issue. I have
long had a policy of no hard coded schema names so this did not
affect us much, however, this seems a rather large change.
Or am I missing something, a configuration setting, documentation?
That is usually the case.
TIA
Dave
--
Dave Morgan
Senior Consultant, 1001111 Alberta Limited
403 399 2442
--
http://www.freelists.org/webpage/oracle-l
Mladen Gogala
2021-03-21 01:45:36 UTC
Permalink
Hi Dave.

I first tried from the DBA user and it worked like a charm:


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.10.0.0.0


SQL> create user scott1 identified by tiger default tablespace users;

User SCOTT1 created.

Elapsed: 00:00:00.222
SQL> grant create session,create view to scott1;

Grant succeeded.

Elapsed: 00:00:00.022
SQL> grant select on scott.emp to scott1;

Grant succeeded.

Elapsed: 00:00:00.053
SQL> create view scott1.emp as select * from scott.emp;

View SCOTT1.EMP created.

Elapsed: 00:00:00.026
SQL>

After that, I tried connecting to the user, just like you diid:

[***@umajor tns]$ sql scott1/***@ora19c

SQLcl: Release 20.4 Production on Sat Mar 20 21:39:32 2021

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.10.0.0.0


SQL> create view emp as select * from scott.emp;

View EMP created.

Long story short, I am unable to reproduce your problem on 19.10. You
may have an old version and that may be a bug. Cannot tell.

Regards
Hello all,
connect schemaname
CREATE VIEW TEST_VW AS SELECT * FROM schemaname.TEST;
will result in
ORA-02000: missing VIEW keyword
Removing the hard coded schema name removes the issue. I have
long had a policy of no hard coded schema names so this did not
affect us much, however, this seems a rather large change.
Or am I missing something,  a configuration setting, documentation?
That is usually the case.
TIA
Dave
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

--
http://www.freelists.org/webpage/oracle-l
Loading...