Showing posts with label sets. Show all posts
Showing posts with label sets. Show all posts

Thursday, March 8, 2012

Data Collector (Collection Sets)

I read the BOL, besides the "Disk Usage" collection set, are there other collection sets to be added? What are the various collections sets that we can add. Can we add performance collection sets? The sproc for adding collections sets

sp_syscollector_create_collection_set

didn't seem to indicate what we types of collections which could be added, unless that was the @.logging_level.

Thanks

The next SQL Server 2008 technology preview provides additional collection sets (System Data Collection Sets) as well as additional collector types. These new collection sets and collector types will expand your options for creating custom collections sets.

dan

|||

To expand a bit on the answer above:

In the current CTP you can create collection sets that use T-SQL collector type. To do that you need to create a collection set using sp_syscollector_create_collection_set and then add items to it using sp_collector_create_collection_item. If you look at BOL topics for those SPs you should see examples of how to do that. If you run into any issues, please reply to this thread.

Regards,

Maciek Sarnowicz

Data Collector (Collection Sets)

I read the BOL, besides the "Disk Usage" collection set, are there other collection sets to be added? What are the various collections sets that we can add. Can we add performance collection sets? The sproc for adding collections sets

sp_syscollector_create_collection_set

didn't seem to indicate what we types of collections which could be added, unless that was the @.logging_level.

Thanks

The next SQL Server 2008 technology preview provides additional collection sets (System Data Collection Sets) as well as additional collector types. These new collection sets and collector types will expand your options for creating custom collections sets.

dan

|||

To expand a bit on the answer above:

In the current CTP you can create collection sets that use T-SQL collector type. To do that you need to create a collection set using sp_syscollector_create_collection_set and then add items to it using sp_collector_create_collection_item. If you look at BOL topics for those SPs you should see examples of how to do that. If you run into any issues, please reply to this thread.

Regards,

Maciek Sarnowicz

Data Collector (Collection Sets)

I read the BOL, besides the "Disk Usage" collection set, are there other collection sets to be added? What are the various collections sets that we can add. Can we add performance collection sets? The sproc for adding collections sets

sp_syscollector_create_collection_set

didn't seem to indicate what we types of collections which could be added, unless that was the @.logging_level.

Thanks

The next SQL Server 2008 technology preview provides additional collection sets (System Data Collection Sets) as well as additional collector types. These new collection sets and collector types will expand your options for creating custom collections sets.

dan

|||

To expand a bit on the answer above:

In the current CTP you can create collection sets that use T-SQL collector type. To do that you need to create a collection set using sp_syscollector_create_collection_set and then add items to it using sp_collector_create_collection_item. If you look at BOL topics for those SPs you should see examples of how to do that. If you run into any issues, please reply to this thread.

Regards,

Maciek Sarnowicz

Data binding to a stored procedure that returns two result sets

Hi there everyone. I have a stored procedure called "PagingTable" that I use for performing searches and specifying how many results to show per 'page' and which page I want to see. This allows me to do my paging on the server-side (the database tier) and only the results that actually get shown on the webpage fly across from my database server to my web server. The code might look something like this:

strSQL = "EXECUTE PagingTable " & _

"@.ItemsPerPage = 10, " & _

"@.CurrentPage = " &CStr(intCurrentPage) &", " & _

"@.TableName = 'Products', " & _

"@.UniqueColumn = 'ItemNumber', " & _

"@.Columns = 'ItemNumber, Description, ListPrice, QtyOnHand', " & _

"@.WhereClause = '" & strSQLWhere &"'"

The problem is the stored procedure actually returns two result sets. The first result set contains information regarding the total number of results founds, the number of pages and the current page. The second result set contains the data to be shown (the columns specified). In 'classic' ASP I did this like this.

'Open the recordset

rsItems.Open strSQL, conn, 0, 1

'Get the values required for drawing the paging table

intCurrentPage = rsItems.Fields("CurrentPage").Value

intTotalPages = rsItems.Fields("TotalPages").Value

intTotalRows = rsItems.Fields("TotalRows").Value

'Advance to the next recordset

Set rsItems = rsItems.NextRecordset

I am trying to do this now in ASP.NET 2.0 using the datasource control and the repeater control. Any idea how I can accomplish two things:

A) Bind the repeater control to the second resultset

B) Build a "pager" of some sort using the values from the first resultset

Hi,

have you tried setting the DataMember property of the repeater ?

|||

Thanks for the quick reply.

I was thinking about that but I don't know what the second result set would be "called". The results come back as if you executed two SELECT statements one after another without a UNION statement in between.

So what would I set the repeater's DataMember property to? Can I use an integer like

repItems.DataMember = 1 (assuming 0 is the first result set)

|||

If you don't specify a name...:

Table1

Table2

...

TableN