-- Stored Procedure: dbo.SrvConfigUpdate -- Bill Wunder use admin GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SrvConfigUpdate]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[SrvConfigUpdate] GO CREATE PROCEDURE dbo.SrvConfigUpdate ( @IncludeAlerts varchar(5), @IncludeBackupDevices varchar(5), @IncludeJobs varchar(5), @IncludeLocalDTSPackages varchar(5), @IncludeLogins varchar(5), @IncludeLinkedServers varchar(5), @IncludeOperators varchar(5), @IncludeRepositoryDTSPackages varchar(5), @IncludeServerConfiguration varchar(5), @IncludeServerRoles varchar(5), @VSSShare nvarchar(255), @VSSRootProject nvarchar(255), @VSSUserName nvarchar(128), @VSSPassword nvarchar(128), @LocalWorkingFolder nvarchar(128), @LicensedCompany nvarchar(128), @LicensedUser nvarchar(128), @LicenseCode nvarchar(128), @SQLServerName nvarchar(50)) AS /****************************************************************************** ** File: dbo.SrvConfigUpdate.PRC ** Name: admin.dbo.SrvConfigUpdate ** Desc: apply any changes made to the server archive config ** ** Auth: Bill Wunder ** Date: 7-25-2003 ******************************************************************************* ** Change History ******************************************************************************* ** Date: Author: Description: ** -------- -------- --------------------------------------- ** *******************************************************************************/ SET NOCOUNT OFF UPDATE admin.dbo.ArchUtilSrvConfig SET IncludeAlerts = @IncludeAlerts , IncludeBackupDevices = @IncludeBackupDevices , IncludeJobs = @IncludeJobs , IncludeLocalDTSPackages = @IncludeLocalDTSPackages , IncludeLogins = @IncludeLogins , IncludeLinkedServers = @IncludeLinkedServers , IncludeOperators = @IncludeOperators , IncludeRepositoryDTSPackages = @IncludeRepositoryDTSPackages , IncludeServerConfiguration = @IncludeServerConfiguration , IncludeServerRoles = @IncludeServerRoles , VSSShare = @VSSShare , VSSRootProject = @VSSRootProject , VSSUserName = @VSSUserName , VSSPassword = @VSSPassword , LocalWorkingFolder = @LocalWorkingFolder , LicensedCompany = @LicensedCompany , LicensedUser = @LicensedUser , LicenseCode = @LicenseCode , SQLServerName = @SQLServerName WHERE SQLServerName = @@servername -- seed new installation if @@rowcount = 0 and @SQLServerName = @@servername begin insert admin.dbo.ArchUtilSrvConfig (SQLServerName , IncludeAlerts , IncludeBackupDevices , IncludeJobs , IncludeLinkedServers , IncludeLocalDTSPackages , IncludeLogins , IncludeOperators , IncludeRepositoryDTSPackages , IncludeServerConfiguration , IncludeServerRoles , LicenseCode , LicensedCompany , LicensedUser , LocalWorkingFolder , VSSPassword , VSSRootProject , VSSShare , VSSUserName) values (@SQLServerName , @IncludeAlerts , @IncludeBackupDevices , @IncludeJobs , @IncludeLinkedServers , @IncludeLocalDTSPackages , @IncludeLogins , @IncludeOperators , @IncludeRepositoryDTSPackages , @IncludeServerConfiguration , @IncludeServerRoles , @LicenseCode , @LicensedCompany , @LicensedUser , @LocalWorkingFolder , @VSSPassword , @VSSRootProject , @VSSShare , @VSSUserName) insert admin.dbo.ArchUtilChanges (SQLServerName , VSSItem , VSSParent , VSSItemType , DatabaseName , ChangeAction) values (@@servername , '' , '' , '' , '' , 'Initialize Server Archive Configuration') end GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO