Add_Server

Adds a new server to the set of printer servers that the monitoring application is set to monitor

Parameters
  • ClientId - The client this server is being added for
  • ServerName - The name of the server to add

CREATE PROCEDURE [Add_Server]
	(
        @ClientId uniqueidentifier,
		@ServerName varchar(255)
    )
AS
	SET NOCOUNT ON 
	
	IF NOT EXISTS (SELECT 'A' FROM [Print Servers]
	                WHERE Name = @ServerName
	               )
	               
	        INSERT INTO dbo.[Print Servers]
	            (
                [Client Id],
	            Name,
	            License,
	            [User name],
	            Timestamp
	            )
	        VALUES
	            (
                @ClientId,
	            @Servername,
	            NewId(),
	            suser_sname(),
	            getdate()
	            )
	
	RETURN 


Last edited Dec 4, 2009 at 6:52 AM by Merrion, version 3

Comments

No comments yet.