[dba-SQLServer]sp_refreshview

Nicholson, Karen knicholson at gpsx.net
Wed Jul 9 09:41:02 CDT 2003


Thanks, been looking and looking for it.  Now that I have found it, I am
trying to figure out why this code bombs, apparently it is when it hits the
sp_refreshview because if I comment out the lines for sp_refreshview, I
receive the  Object 'alp_app_sequence' was successfully marked for
recompilation. ...(goes through all my stored procedures).

DECLARE @objName VARCHAR(50)
SET	@objName = ''

WHILE	@objName IS NOT NULL
	BEGIN
		SELECT @objName = MIN( Name )
		FROM	SysObjects
		WHERE	Type='P' AND
			Name > @objName

		IF	@objName IS NOT NULL
				exec sp_refreshview @objName		
END

SET	@objName = ''

WHILE	@objName IS NOT NULL
	BEGIN
		SELECT @objName = MIN( Name )
		FROM	SysObjects
		WHERE	Type='P' AND
			Name > @objName

		IF	@objName IS NOT NULL
				exec sp_recompile @objName		
END



> -----Original Message-----
> From:	Mark Boyd [SMTP:MarkBoyd at McBeeAssociates.com]
> Sent:	Wednesday, July 09, 2003 8:22 AM
> To:	dba-sqlserver at databaseadvisors.com
> Subject:	RE: [dba-SQLServer]sp_refreshview
> 
> Karen -
> This procedure is located in the master database, under Extended Stored
> Procedures.
> 
> Mark Boyd
> Sr. Systems Analyst
> McBee Associates, Inc
> 
> 
> -----Original Message-----
> From: Nicholson, Karen [mailto:knicholson at gpsx.net] 
> Sent: Wednesday, July 09, 2003 10:12 AM
> To: dba-sqlserver at databaseadvisors.com
> Subject: [dba-SQLServer]sp_refreshview
> 
> I do not have the stored procedure, sp_refreshview.  SQL 7 (still).
> Does
> anyone have the procedure out there?  Was this part of an upgrade?
> Thanks.
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 
> 
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com


More information about the dba-SQLServer mailing list