Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open SQL Management Studio and connect to database
  2. Open New Query
  3. Run the sql below to create a store procedure
  4. Determine server you wish to delete 
    1. Select * from config.t_server
  5. Run [model].[deleteServer] "ServerID to delete" 
Infocode
languagesql
titleDelete Script
linenumberstrue
USE [iQSonarSE]

GO
/****** Object: StoredProcedure [jobs].[Job_Create] Script Date: 15.03.2017 13:19:48 ******/
SET

GO
SET ANSI_NULLS ON


GO


SET QUOTED_IDENTIFIER ON


GO


CREATE PROCEDURE [model].[deleteServer]


@ServerID INT


AS


BEGIN


SET NOCOUNT ON;


SET XACT_ABORT ON;


-- delete server


update jobs.t_Job set ServerID =(select max(ServerID) from config.t_Server where ServerID !=@serverId)


update config.t__Location_Server set ServerID =(select max(ServerID) from config.t_Server where ServerID !=@serverId)


delete from config.t_ServerMetric where ServerID=@serverId


delete from config.t_LinkedConnectionConfigurationPort where LinkedConnectionConfigurationID in(select LinkedConnectionConfigurationID from config.t_LinkedConnectionConfiguration where ServerID =@serverId)


delete from config.t_LinkedConnectionConfigurationOption where LinkedConnectionConfigurationID in(select LinkedConnectionConfigurationID from config.t_LinkedConnectionConfiguration where ServerID =@serverId)
delete from config.t_LinkedProductAdapterConfigurationOption where LinkedProductAdapterConfigurationID in ( select LinkedProductAdapterConfigurationID from config.t_LinkedProductAdapterConfiguration where ServerID =@serverId)

delete from

delete from config.t_LinkedProductAdapterConfiguration where ServerID =@serverId
delete from config.t__Server_ProductAdapterConfiguration where ServerID =@serverId


delete from config.t_LinkedConnectionConfiguration where ServerID =@serverId


delete from config.t_Server where ServerID =@serverId

END
END


Info


Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@1fb5c7
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "iqsonar_v4" and type = "page" and space = "CSKB"
labelsiqsonar_v4

...

Page Properties
hiddentrue


Related issues