Find examples
for using dbcc upgrade_object.
-
Example 1 – Upgrades all compiled objects in the active database:
dbcc upgrade_object
-
Example 2 – Upgrades all stored procedures in the listdb database.
Single quotes are used around procedure because set
quoted identifiers is on:
dbcc upgrade_object(listdb, 'procedure')
-
Example 3 – Upgrades all rules and check constraints in the listdb database. Double
quotes are used around rule because set
quoted identifiers is off.
dbcc upgrade_object(listdb, "rule")
-
Example 4 – Upgrades all stored procedures named list_proc in
the listdb database.
dbcc upgrade_object(listdb, list_proc)
-
Example 5 – Upgrades the stored procedure list_proc,
which is owned by the login “jkarrik”.
dbcc upgrade_object(listdb,
"listdb.jkarrik.list_proc")
-
Example 6 – Returns an error because the value of dbname is master and
the value of database is listdb.
These values must match.
dbcc upgrade_object(master,
"listdb.jkarrik.list_proc")