PrepAway - Latest Free Exam Questions & Answers

which order should the four actions be performed?

DRAG DROP
You need to recommend the actions that are required to partition a table.
In which order should the four actions be performed?
To answer, move the actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:
Create a partitioned table using the AdventureWorks2012 database:
CREATE PARTITION FUNCTION TransactionRangePF1 (DATETIME)
AS RANGE RIGHT FOR VALUES
(
‘20071001’, ‘20071101’, ‘20071201’, ‘20080101’,
‘20080201’, ‘20080301’, ‘20080401’, ‘20080501’,
‘20080601’, ‘20080701’, ‘20080801’
);
GO
CREATE PARTITION SCHEME TransactionsPS1 AS PARTITION TransactionRangePF1 TO
(
[PRIMARY], [PRIMARY], [PRIMARY], [PRIMARY], [PRIMARY],
[PRIMARY], [PRIMARY], [PRIMARY], [PRIMARY], [PRIMARY],
[PRIMARY], [PRIMARY], [PRIMARY]
);
GO
CREATE TABLE dbo.TransactionHistory
(
TransactionID INT NOT NULL, — not bothering with IDENTITY here
ProductID INT NOT NULL,ReferenceOrderID INT NOT NULL,
OrderLineID INT NOT NULL DEFAULT (0),
TransactionDate DATETIME NOT NULL DEFAULT (GETDATE()),
TransactionType NCHAR(1) NOT NULL,
Quantity INT NOT NULL,
ActualCost MONEY NOT NULL,
ModifiedDate DATETIME NOT NULL DEFAULT (GETDATE()),
CONSTRAINT CK_TransactionType
CHECK (UPPER(TransactionType) IN (N’W’, N’S’, N’P’))
)
ON TransactionsPS1 (TransactionDate);
GO
Create Partitioned Tables and Indexes


Leave a Reply