This forum is currently locked. You can't register or post questions at this time. (read more)

force view

All posts relating to Oracle database administration.

Moderator: Tim...

mdsirajoddin
Member
Posts: 25
Joined: Mon Sep 09, 2013 4:30 am

force view

Postby mdsirajoddin » Thu Sep 19, 2013 10:28 am

Code: Select all

create view invalid_view as
select * from table_that_does_not_exist;
select * from table_that_does_not_exist
                  *
ERROR at line 2:
ORA-00942: table or view does not exist

SQL>
SQL>  create force view invalid_view as
  2      select * from table_that_does_not_exist;

Warning: View created with compilation errors.



I used this code as a sample. But the question is Can we create a force view without error or warnings..

actual scenario is:

I am importing a dump file into database and the dump contains force views. Now the import is ending with errors.. and not succeeding..

For that what I am asking is, Can we create force view without error or warnings..

Thanks in Advance..

Mohd Sirajoddin..

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: force view

Postby Tim... » Thu Sep 19, 2013 11:02 am

Hi.

Creating a view using FORCE should not give errors, provided the basic CREATE VIEW command is syntactically correct and the SQL of the view is syntactically correct. It will always give warnings if the objects it references do not exist. These warnings will not prevent the view creating, but they will always be present. That's how this stuff works.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

mdsirajoddin
Member
Posts: 25
Joined: Mon Sep 09, 2013 4:30 am

Re: force view

Postby mdsirajoddin » Thu Sep 19, 2013 11:28 am

Import is completing with warnings. however what I know is, it should not impact in creating objects or anything else..

But the issue is the "Force views under the dump are not available in Database" after the completion of import. For that I am expecting the force views without warnings, for future reference..

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: force view

Postby Tim... » Thu Sep 19, 2013 12:54 pm

Hi.

I think you have to flag this with Oracle support. I would not expect the view to be missing. I would expect them to be compiled with warnings though.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

mdsirajoddin
Member
Posts: 25
Joined: Mon Sep 09, 2013 4:30 am

Re: force view

Postby mdsirajoddin » Fri Sep 20, 2013 4:51 am

But the thing is problem of Version. My firm is using 8i version of Oracle still. Trust all know that there is no support for 8i.

In this case what can you suggest me to do..

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: force view

Postby Tim... » Fri Sep 20, 2013 1:56 pm

Hi.

Well, all I can suggest is you make sure you are on the latest patchset for Oracle 8i, as that will have the most bug fixes in.

Apart from that there is nothing more I can suggest. What you're experiencing is not what I would consider normal, but then you are using a very old version. :(

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

mdsirajoddin
Member
Posts: 25
Joined: Mon Sep 09, 2013 4:30 am

Re: force view

Postby mdsirajoddin » Mon Sep 23, 2013 4:13 am

Thanks alot ... Tim.

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: force view

Postby Tim... » Mon Sep 23, 2013 8:55 pm

:)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog


Return to “Oracle Database Administration”

Who is online

Users browsing this forum: No registered users and 6 guests

cron