RE: Changing 100 table object owner names at once

From: Nigel Rivett (NigelRivett_at_discussions.microsoft.com)
Date: 06/26/04


Date: Sat, 26 Jun 2004 15:42:01 -0700

Well you can do an update on sysobjects but if you look at the sp it does a lot of checking and clearing up.

Better to code a loop to execute it on all the tables necessary.

"Smith" wrote:

> Is there any way I can change the object owner for over
> 100 tables in a single data base at once in SQL 7 without
> using the sp on each table?
>



Relevant Pages

  • Re: MSforeachdb question
    ... You can execute the script directly with a USE statemement rather than ... > c.xprec as prec, c.xscale as scale from syscolumns c, ... > sysobjects o, systypes t where o.id =c.id ...
    (microsoft.public.sqlserver.server)
  • Re: Stringing FOR XML EXPLICIT SPs Together?
    ... To add string together from stored procedure without cusor, ... IF EXISTS (SELECT name FROM sysobjects ... EXECUTE sp_test @TempStr OUTPUT ...
    (microsoft.public.sqlserver.xml)
  • RE: Weird Error on this SP
    ... SET QUOTED_IDENTIFIER is saved when you create the sp and sql server ... recreate it every time you execute the sp and do not respect the settings ... FROM sysobjects ... SET @filename = @prefix+'000660002506-'+@date+'.TXT' ...
    (microsoft.public.sqlserver.programming)
  • Re: Does stored procedure exist
    ... Stored procedures are _stored_ in your database. ... >You can execute a SELECT against the sysobjects table to determine if a SP ...
    (microsoft.public.vb.database)