The easiest and fastest way to create ad hoc reports from SQL Server
Got a SQL Server or .NET question? Discuss it in the forums. (SQL Server Forums | Dot NET Forums)
First Time? You can support us by signing up. It takes only 5 seconds. Click here to sign up. If you already have an account, click here to login.
TSQL Challenge 30 – Data for Performance testing

We have created a basic draft of the performance test data for TSQL Challenge 30 - A Matrix Transposition challenge in TSQL. The test data is created by replicating the logic testing data. You can find the script here. If you have any suggestion to improve it or got a better script, let us know.

Posted: 09-01-2010 3:03 AM by JacobSebastian | with no comments
Filed under:

TSQL Challenge 30 – Results of Tricky Testing

We have completed the ‘tricky testing’ of TSQL Challenge 30 - A Matrix Transposition challenge in TSQL and the result is published here. The data used for the tricky testing is given here.


TSQL Challenge 30 – Tricky Data

We are about to start the logic testing of TSQL Challenge 30 - A Matrix Transposition challenge in TSQL. We have created a sandbox for the tricky testing and you can find it here.

Please take a look at the tricky data and expected results and let us know if you find anything incorrect.


Announcing Winners of TSQL Challenge 29

The evaluation of TSQL Challenge 29 is completed and here is the list of winners.

See this page to view the performance comparison of winning solutions.

Please join us to congratulate the winners!


TSQL Challenge 30 – Basic Testing Results
The basic testing results of TSQL Challenge 30 is published and you can find it here.
Posted: 08-26-2010 7:18 AM by JacobSebastian | with no comments
Filed under:

TSQL Challenge 37 - Calculate the downtime and duration of servers based on the monitoring log

This is a challenge to identify the downtime of servers from the log data generated by a monitoring application.

There is a monitoring application that keeps checking the status of several servers at 5 minute intervals. When the monitoring application finds that a particular server is down, it adds a record into the log table.

The Idera SQL toolbox is the official sponsor of this challenge. SQL toolbox includes tools for backup compression, instant data recovery, data and schema comparison, and 24 more daily tasks.

Sample Data
ServerName           DownTime
-------------------- --------------------
Server1              2010-01-03 10:00
Server1              2010-01-03 12:00
Server1              2010-01-03 12:05
Server1              2010-01-03 12:10
Server1              2010-01-03 14:05
Server1              2010-01-03 17:35
Server1              2010-01-03 17:45
Server1              2010-01-03 17:50
Server1              2010-01-03 17:55
Server2              2010-01-03 09:55
Server2              2010-01-03 10:00

Note that the monitoring application inserts a record only when the server is down. The polling takes place every 5 minutes. In the above example, "Server1" was down at 10:00. There is no entry for 10:05 which indicates that when the monitoring application checked at 10:05, the server was up. So the first down time is for 00:05 minutes at 10:00 am.

Here is the expected results

Server               DownTime             DownFor
-------------------- -------------------- --------------------
Server1              2010-01-03 10:00     00:05
Server1              2010-01-03 12:00     00:15
Server1              2010-01-03 14:05     00:05
Server1              2010-01-03 17:35     00:05
Server1              2010-01-03 17:45     00:15
Server2              2010-01-03 09:55     00:10
Scripts

Use the following script to generate the sample data

IF OBJECT_ID('TC37_Data','U') IS NOT NULL 
	DROP TABLE TC37_Data
GO

CREATE TABLE TC37_Data (
	ServerName VARCHAR(20),
	DownTime VARCHAR(20) 
)
GO

INSERT INTO TC37_Data (ServerName, DownTime)
SELECT 'Server1', '2010-01-03 10:00' UNION ALL
SELECT 'Server1', '2010-01-03 12:00' UNION ALL
SELECT 'Server1', '2010-01-03 12:05' UNION ALL
SELECT 'Server1', '2010-01-03 12:10' UNION ALL
SELECT 'Server1', '2010-01-03 14:05' UNION ALL
SELECT 'Server1', '2010-01-03 17:35' UNION ALL
SELECT 'Server1', '2010-01-03 17:45' UNION ALL
SELECT 'Server1', '2010-01-03 17:50' UNION ALL
SELECT 'Server1', '2010-01-03 17:55' UNION ALL
SELECT 'Server2', '2010-01-03 09:55' UNION ALL
SELECT 'Server2', '2010-01-03 10:00' 

SELECT * FROM TC37_Data 
Notes
  1. Assume that the current status of the server - after the last reading - is 'up'
  2. It is possible to have the server down for more than 99 hours and in such a case, the actual number of hours should be displayed.
  3. No order should be assumed in the input data.
  4. Output should be sorted by Server Name and Down Time columns
  5. There will be no duplicates in the input data.
  6. The solution should be a single query that starts with a "SELECT", "WITH" or ";WITH"
  7. If you would like to use a Tally Table, you can use the script given here. Your solution should not include the script to create and populate the tally table. You can assume that the tally table will be available in the database where the evaluation team will run your code.
  8. Read the Submission Guidelines and make sure that your solution follows them.
  9. Use this forum for any questions related to TSQL Challenge 37. You need to be a member of TSQL Challenge Group to be able to post questions. Click here to join the group if you are not already a member.
  10. Click here to submit your solution
Idera SQL toolbox just won the Best of TechEd 2010 award for the Database Administration category! SQL toolbox includes tools for:
  • Backup compression
  • Instant data recovery
  • Data and schema comparison
  • Plus 24 other daily tasks!
All for only $995. Download a free 14 day trial.
About the author

TSQL Challenge 29 – Data for Performance testing

We have created a basic draft of the performance test data for TSQL Challenge 29. The test data is created by replicating the logic testing data. You can find the script here. If you have any suggestion to improve it or got a better script, let us know.

Posted: 08-21-2010 7:52 AM by JacobSebastian | with no comments
Filed under:

TSQL Challenge 29 – Results of Tricky Testing

We have completed the ‘tricky testing’ of TSQL Challenge 29 and the result is published here. The data used for the tricky testing is given here.


TSQL Challenge 29 – Tricky Data

We are about to start the logic testing of TSQL Challenge 29. We have created a sandbox for the tricky testing and you can find it here.

Please take a look at the tricky data and expected results and let us know if you find anything incorrect. We will start the tricky testing by tomorrow.


Announcing Winners of TSQL Challenge 28

The evaluation of TSQL Challenge 28 is completed and here is the list of winners.

See this page to view the performance comparison of winning solutions.

Please join us to congratulate the winners!


TSQL Challenge 29 – Basic Testing Results
The basic testing results of TSQL Challenge 29 is published and you can find it here.
Posted: 08-12-2010 1:00 AM by JacobSebastian | with no comments
Filed under:

TSQL Challenge 28 – Data for Performance testing

We have created a basic draft of the performance test data for TSQL Challenge 28. The test data is created by replicating the basic testing data. You can find the script here. If you have any suggestion to improve it or got a better script, let us know.


TSQL Challenge 36 - Create a graph/Chart with TSQL

It is time for us to get 'graphical' and this challenge is to draw a graph using TSQL.

Izenda Reports is the official sponsor of this challenge. Izenda Reports and Dashboards is the easiest and fastest way to create ad hoc reports from SQL Server data bases.

Sample Data
Seq         Data
----------- -----------
1           2
2           3
3           4
4           4
5           5
6           4
7           3
8           4
9           4
10          4
11          3
12          2
13          2
14          3
15          3
16          4
17          4
18          5

Here is how your graph should look like.

5|
4|  _/\  __      _/
3| /   \/  \   _/
2|/         \_/
1|
0|__________________
 0123456789012345678
Scripts

Use the following script to generate the sample data

SET NOCOUNT ON
IF OBJECT_ID('TC36_Data','U') IS NOT NULL DROP TABLE TC36_Data
GO
CREATE TABLE TC36_Data (
	Seq INT,
	Data INT
)
INSERT INTO TC36_Data(Seq, Data) SELECT 1, 2
INSERT INTO TC36_Data(Seq, Data) SELECT 2, 3
INSERT INTO TC36_Data(Seq, Data) SELECT 3, 4
INSERT INTO TC36_Data(Seq, Data) SELECT 4, 4
INSERT INTO TC36_Data(Seq, Data) SELECT 5, 5
INSERT INTO TC36_Data(Seq, Data) SELECT 6, 4
INSERT INTO TC36_Data(Seq, Data) SELECT 7, 3
INSERT INTO TC36_Data(Seq, Data) SELECT 8, 4
INSERT INTO TC36_Data(Seq, Data) SELECT 9, 4
INSERT INTO TC36_Data(Seq, Data) SELECT 10, 4
INSERT INTO TC36_Data(Seq, Data) SELECT 11, 3
INSERT INTO TC36_Data(Seq, Data) SELECT 12, 2
INSERT INTO TC36_Data(Seq, Data) SELECT 13, 2
INSERT INTO TC36_Data(Seq, Data) SELECT 14, 3
INSERT INTO TC36_Data(Seq, Data) SELECT 15, 3
INSERT INTO TC36_Data(Seq, Data) SELECT 16, 4
INSERT INTO TC36_Data(Seq, Data) SELECT 17, 4
INSERT INTO TC36_Data(Seq, Data) SELECT 18, 5

SELECT * FROM TC36_Data 
Notes
  1. The "seq" column controls the flow of the graph. You should process the points in that order.
  2. Value of the "data" column should be used to build your graph representation. The graph could start with any value between 0 and 5.
  3. The difference between two contiguous readings will only ever be –1, 0 or 1
  4. The highest value the "data" column can hold is 5 and lowest value is 0
  5. There will be no upper limit on the number of rows in the source table
  6. There will be at least 2 rows in the source table
  7. The final result should consist of 7 rows of output consisting of a single VARCHAR column
  8. The solution should be a single query that starts with a "SELECT", "WITH" or ";WITH"
  9. If you would like to use a Tally Table, you can use the script given here. Your solution should not include the script to create and populate the tally table. You can assume that the tally table will be available in the database where the evaluation team will run your code.
  10. Read the Submission Guidelines and make sure that your solution follows them.
  11. Use this forum for any questions related to TSQL Challenge 36. You need to be a member of TSQL Challenge Group to be able to post questions. Click here to join the group if you are not already a member.
  12. Click here to submit your solution
Izenda Reports and Dashboards can be integrated into an ISV’s existing application or utilized by any department using SQL Server that needs to provide users a secure, easy-to-use reporting tool.

Our customers are blown away at how quickly they can have Izenda Reports integrated into their applications. And their end-users are thrilled how easily they can create ad-hoc reports – without “ruining” the templates or breaking any security.

Click here to attend a free webinar or click here to download a trial.

About the author

More Posts Next page »

Copyright © Beyondrelational.com