ST Work with db optimised

This commit is contained in:
vfedosevich 2014-12-16 09:06:35 -08:00
parent 20c474a8a7
commit d618fb5f64
5 changed files with 113 additions and 43 deletions

View file

@ -6587,6 +6587,24 @@ SELECT
WHERE [DomainId] = @DomainId AND [RecordType] = @RecordType
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetDomainAllDnsRecords')
DROP PROCEDURE GetDomainAllDnsRecords
GO
CREATE PROCEDURE [dbo].GetDomainAllDnsRecords
(
@DomainId INT
)
AS
SELECT
ID,
DomainId,
DnsServer,
RecordType,
Value,
Date
FROM [dbo].[DomainDnsRecords]
WHERE [DomainId] = @DomainId
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddDomainDnsRecord')
@ -6674,6 +6692,20 @@ AS
UPDATE [dbo].[Domains] SET [LastUpdateDate] = @Date WHERE [DomainID] = @DomainId
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateDomainDates')
DROP PROCEDURE UpdateDomainDates
GO
CREATE PROCEDURE [dbo].UpdateDomainDates
(
@DomainId INT,
@DomainCreationDate DateTime,
@DomainExpirationDate DateTime,
@DomainLastUpdateDate DateTime
)
AS
UPDATE [dbo].[Domains] SET [CreationDate] = @DomainCreationDate, [ExpirationDate] = @DomainExpirationDate, [LastUpdateDate] = @DomainLastUpdateDate WHERE [DomainID] = @DomainId
GO
--Updating Domain procedures