Added logic to keep this script from running in the system databases.
Added warning messages if changes exist to fmtxml or promsfixes.sql.
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
if db_name() in('master','model','msdn','tempdb')
|
||||
begin
|
||||
DECLARE @ErrorMsg varchar(255)
|
||||
SET @ErrorMsg = 'Don''t add these procedures and functions to ' + db_name()
|
||||
PRINT '=========================================================================='
|
||||
PRINT ''
|
||||
PRINT @ErrorMsg
|
||||
PRINT ''
|
||||
PRINT 'You probably want to be in the VEPROMS database'
|
||||
PRINT ''
|
||||
PRINT '=========================================================================='
|
||||
RAISERROR (@ErrorMsg, 20, -1) with log
|
||||
RETURN
|
||||
end
|
||||
print 'Adding procedures and functions to ' + db_name()
|
||||
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[PasteItemReplace]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE [PasteItemReplace];
|
||||
GO
|
||||
|
Reference in New Issue
Block a user