Using Dbcc Upgrade_Object - Sybase Adaptive Server Enterprise 15.0.2 Installation Manual

Table of Contents

Advertisement

Determining whether
select * should be
changed in views

Using dbcc upgrade_object

Syntax
Installation Guide
If
dbcc upgrade_object
output of
syscolumns
determine whether columns have been added to or deleted from the table since
the view was created.
For example, suppose you have the following statement:
create view all_emps as select * from employees
Before upgrading the
number of columns in the original view and the number of columns in the
updated table:
select name from syscolumns
where id = object_id("all_emps")
select name from syscolumns
where id = object_id("employees")
Compare the output of the two queries. If the table contains more columns than
the view, and retaining the pre-upgrade results of the
important, change the
column names. If the view was created from multiple tables, check the columns
in all tables that comprise the view and rewrite the
Do not execute a
Warning!
upgrades the view and overwrites the information about the original column
information in
syscolumns
Another way to determine the difference between the columns in the view and
in the new tables is to run
the view.
This comparison works only for views, not for other compiled objects. To
determine whether
select *
revised, review the source text of each compiled object.
dbcc upgrade_object [ ( dbid | dbname
[, ['database.[owner].]compiled_object_name' |
'check' | 'default' | 'procedure' | 'rule' |
'trigger' | 'view'
[, 'force' ] ] ) ]
where:
reports the existence of
for the original view to the output of the table, to
view, use the following queries to determine the
all_emps
statement to a
select *
statement from the view. Doing so
select *
.
on both the view and the tables that comprise
sp_help
statements in other compiled objects need to be
CHAPTER 7
Troubleshooting
in a view, compare the
select *
statement is
select *
statement with specific
select
statement if necessary.
select
113

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents