I have as stored procedure that creates a ridiculous amount of overhead. The processor reaches its maximum due to a high DPC count. I visited Microsoft’s Tech Net site and it mentioned something about needing to check my network hardware or upgrade my processors on my SQL box.
The query...
When ever I run this stored proc my SQL servers processor immediately hits 100% usage and the proc runs for quite a while (The table this runs from has over 9.7 million rows with 4 indexes). The 4 indexes were created based on the fields called in the where clauses. Any suggestions for...
This might provide some light:
http://support.microsoft.com/support/kb/articles/Q197/1/76.ASP?LN=EN-US&SD=gn&FR=0&qry=Advanced%20INF%20Installer%20-%20Incorrect%20Setup%20Engine%20Installed&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=SQL
Hope this helps...
You can try setting up a cursor...Something like this:
DECLARE ActiveTable CURSOR
FOR SELECT TableName
FROM TableRoot.dbo.TablesTable
WHERE COLUMNPROPERTY( OBJECT_ID('' + TableName +
''),'CreateDate','AllowsNull') IS NOT NULL
Then delcare a var:
DECLARE @TblNm varchar(6)
Open the...
I got some interesting results:
First, the message window in the query analyzer would display this -
Column '[THE COLUMN NAME]' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
...........
[THE COLUMN NAME] = all of the objects...
I have the following query:
Select 'CATALOG' AS CatName, f.ProductID AS ParentSku, f.Name AS ParentSkuName, t.ProductID AS ChildSku, t.Name AS ChildSkuName, t.DisplayInd, t.oid AS ChildID, f.oid AS ParentID, getdate() AS DateGenerated, a.Name
FROM [CATALOG_CatalogRelationships] a INNER JOIN...
I have the following query:
Select 'TEST' AS CatName, f.ProductID AS ParentSku, f.Name AS PrntSkuNm, t.ProductID AS ChildSku, t.Name AS ChlSkuNm, t.DisplayInd, t.oid AS ChildID, f.oid AS ParentID, getdate() AS DateGenerated, a.Name
FROM [TEST_CatalogRelationships] a INNER JOIN...
Terry thx for the suggestion. I tried that when the localized variable did not work. The globals did not work until I made the adjustments below.
You got me thinking about the usage of those variables though....and this is how I fixed it:
-I used Global vars (##)
-I found that when you build...
I created a Stored Proc, which pulls data into a temp (named - #temp) table and then selects “all” from the #temp table. All of the data is returned as it should and the proc “runs” as it should – no exceptions or errors.
I then create a DTS package with a connection From SQL and a connection...
Terry:
You will have to forgive me - this is my first go @ a "real" SP... could you give me an idea on how the syntax might be laid out – I know that there is a certain way you create a temp table without crushing the resources on the server….but I have never actually done it…..any...
Below you will find the st proc – also, if you can think of one...is there a better way to wildcard the "like CrossSell____" comparison? I attempted a “*” splat – but it did not work as I though it would.
Thx in advance…
DECLARE ActiveCatalog CURSOR
READ_ONLY
FOR SELECT...
I created a cursor named CrossReport and a DTS package that has 3 elements
1.Standard connection to a data source
2. Transform Data Task
3. Connection to an Access Database
On the Transform Data Task “TDT” I used SQL query and used the statement – EXEC CrossReport. I then preview the data -...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.