Showing posts with label runs. Show all posts
Showing posts with label runs. Show all posts

Tuesday, March 27, 2012

General network error

Hi,
I am working on sql server 2000.
We have a job that runs every 30 mins every day. It has
been behaving very well. The only time it failed was
yesterday at 10:00am. When I viewed the job history, it
showed the following message:
Executed as user: blahblah\sql_admin. ConnectionRead (recv
()). [SQLSTATE 01000] (Message 10054) General network
error. Check your network documentation. [SQLSTATE 08S01]
(Error 11). The step failed.
General network error usually indicate that there is a
network connection failure. But this specific job/stored
procedure is not pulling data from any other server but
from local table. (Message 10054) indicating BCP overflow
certain column definition, but we are not doing BCP
either.
Could this message mean that there are too many disk I/O
going on at that time, and this job was waiting too long
in idle and failed?
Or could that be a logon info issue?
Any suggestion will be greatly appreciated.
JJHi JJ,
You might want to check SQL errorrlog and make sure that there is no error
occurred during that time.
Sincerely,
Yih-Yoon Lee [Microsoft]
Microsoft SQL Server Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Wednesday, March 21, 2012

Fuzzy Group Updates?

Hi there,

Quick Background: I have an SSIS package that reads data from a flat file then runs it through a Fuzzy Grouping component. The result of this Fuzzy Group is put into a SQL server 2005 table.

Question: Over time, the flat file will be adding new records (some that should be added to existing groups) and so I'll need to update my Fuzzy Group table to include these new records. Is there anyway to simply add these new records to the existing Fuzzy Group without changing all of the _key_out values? If I completely regenerate the Fuzzy Group table that will potentially give me different _key_out values correct?

Does this make sense?

Any help would be greatly appreciated!

>>" If I completely regenerate the Fuzzy Group table that will potentially give me different _key_out values correct?"

Correct.

wenyang

|||

Thanks for the reply!

Anyway to preserve the _key_out while still adding records to the groups? Sounds like a complete rebuild of the Fuzzy group is out of the question. Anyway to do this incrementally?

|||

Hi,

Yes, each time you run Fuzzy Grouping with a different set of input rows (or with a different threshold), it is possible that different groupings will result.

If you have run FG once and would like to keep the existing groups, one alternative would be to use Fuzzy Lookup for the incremental input rows. You would basically perform a fuzzy lookup against the output of FG and return the _key_out of the best matching row. You have thus effectively found a group for the new input row. If no match is found above the FL match threshold, then just assign a new unique _key_out to the input row to create a new group.

A slight problem with this approach is that over time all the incremental rows may not be grouped as well as they could be, as the clustering algorithm that Fuzzy Grouping uses to globally pick groupings is not being employed. At that point you may want to just rerun FG and switch to the new groupings.

We are considering adding a feature in the next version that will allow you keep all the old groupings intact.

Let us know if you have any more questions.

Regards,

-Kris

|||Thanks Kris, that will probably suffice for now. Yeah put that in the next version, the FG component is great but it doesn't have much use after the initial run because of this limitation.

Monday, March 19, 2012

Funny error during runs

Can any one please help explain why this error has happened, it is not a normal error of SSIS,

"SSIS Debug host has encountered a problem and needs to close. We are sorry for the inconvenience"

It has 2 buttons Debug and Close, this error happened in the middle of a script task.

This is a classic Microsoft problem. I face this problem often.

These are the scenarios on which I usually get this probelm:

1. If there is less memory on the client system where VB studio is open, and trying lot of mouse clicks frequently.

2. It is observed more when in Debug mode, when you try to scroll using the middle wheel of the mouse.

After I upgraded my desktop RAM to 3GB, and often system restart at the start of the day, I observed this error is less.

Also always saving and building frequently of the packages will help to retain your work. Other than these, there is no real solution from what I observed.

Functions in Parameter Definitions

I have a pair of reports that are the same except that one takes date parameters and another runs for the calculated lst full month. Currently they run off of separate stored procedures, but I would like to combine them. I don't know if my reporting tool will handle it or not, but I want to test it, so I need to combine the 2 sp's into one. I thought the first thing to try would be to set the default values to the start and end date of the previous month, like so:

CREATE PROCEDURE [dbo].[usp_blahblah]

(

@.StartDate SmallDateTime = DateAdd(mm,-1,DateAdd(mm,DateDiff(mm,0,GetDate()),0)), -- 1st of Last Month

@.EndDate SmallDateTime = DateAdd(ms,-3,DateAdd(mm, DateDiff(mm,0,GetDate()),0)) -- End of Last Month

)

..but it won't parse ("Incorrect syntax near '('."). So I'm thinking that you can't use a function in the definition of a param, although I can't find any documentation.

I'm sure there are other approaches, but I thought this would be the most straight forward... Does anybody have a really elegant idea?

From the CREATE PROCEDURE documentation - "Is a default value for the parameter. If a default is defined, the procedure can be executed without specifying a value for that parameter. The default must be a constant or it can be NULL."

Just make the default value NULL, then test to see if the parameters are NULL and set them in the body of the proc. Like this

CREATE PROCEDURE [dbo].[usp_blahblah]
(
@.StartDate SmallDateTime = NULL,
@.EndDate SmallDateTime = NULL)
IF @.StartDate IS NULL AND @.EndDate IS NULL
BEGIN
SET @.StartDate = DateAdd(mm,-1,DateAdd(mm,DateDiff(mm,0,GetDate()),0)), -- 1st of Last Month
SET @.EndDate = DateAdd(ms,-3,DateAdd(mm, DateDiff(mm,0,GetDate()),0)) -- End of Last Month
END

|||That's slick. I'll give it a try and hope Crystal can handle it!|||

Be careful using the above approach though if you are using the variables further in a query. The query optimizer can do parameter sniffing to get optimal plan based on the parameter values but if you modify it within the SP then the sniffing cannot happen. So if you need to modify the parameter values then move the actual query into another SP and pass the modified parameters to that instead. See the link below for more details on how plan caching works.

http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx

Function works on SQLServer but not on MSDE

I have spent considerable time trying to debug this one without
success.
I have a database which runs on my client's SQLServer 2000. It
contains a scalar-valued text function which works fine.
Using the same function definition in the same way on MSDE it returns
the wrong result. I am baffled. Is there some incompatibility I
should know about?
The function (simplified) goes like this
ALTER FUNCTION dbo.fnDoseRate
(
@.ID Int,
@.WhichDoseRate Int
)
RETURNS Float
AS
BEGIN
DECLARE @.Dose Float
IF @.WhichDoseRate=1
SELECT @.Dose = 1.2
IF @.WhichDoseRate=2
SELECT @.Dose = 2.3
IF @.WhichDoseRate=3
SELECT @.Dose = 3.4
RETURN @.Dose
END
I call it from a query
SELECT X, Y, dbo.fnDoseRate(1,1), dbo.fnDoseRate(1,2),
dbo.fnDoseRate(2,3) FROM MyTable
and the query delivers the expected results
If I change the query to
SELECT X, Y, SUM(dbo.fnDoseRate(1,1)), SUM(dbo.fnDoseRate(1,2)),
SUM(dbo.fnDoseRate(2,3)) FROM MyTable GROUP BY X, Y
and the first 2 of the SUM fields return the same value (appropriate
only to 1,1). If I change the last call to 1,3 it gives the same wrong
value.
Any ideas?
Bill Manville
MVP - Microsoft Excel, Oxford, England
FWIW I should add that I created the function definition and the view
using an Access2002 ADP project.
Bill Manville
MVP - Microsoft Excel, Oxford, England
|||Are both engines at the same service pack level?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Bill Manville" <Bill-Manville@.msn.com> wrote in message
news:VA.000013fd.3da5fb80@.msn.com...
> FWIW I should add that I created the function definition and the view
> using an Access2002 ADP project.
> Bill Manville
> MVP - Microsoft Excel, Oxford, England
>
|||>Are both engines at the same service pack level?
Good question.
The client controls the remote server so I don't readily know about
that. Is there a way I could interrogate it to find out?
Nor am I sure how to find out the service pack level of my MSDE; I'm a
bit of an amateur in this area! Can you point me in the right
direction?
Looking at SysInfo > Loaded Modules, I see
sqlserver 2000.080.0194.00
Is that the correct place to look? And is that the most recent
version? If not, where should I go to update it?
(I run Microsoft Update regularly but I guess it might not reach MSDE)
Bill Manville
MVP - Microsoft Excel, Oxford, England
|||SELECT @.@.Version
returns:
Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52
Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows
NT 5.1 (Build 2600: Service Pack 2)
Ah, I'm running on XP which is reported (in this case) as NT 5.1.
It seems to me there is a Microsoft site that lists the versions and the
service packs etc. associated with each. I'm pretty sure I have SS 2005 SP2
installed here.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Bill Manville" <Bill-Manville@.msn.com> wrote in message
news:VA.000013fe.3fc7c2fb@.msn.com...
> Good question.
> The client controls the remote server so I don't readily know about
> that. Is there a way I could interrogate it to find out?
> Nor am I sure how to find out the service pack level of my MSDE; I'm a
> bit of an amateur in this area! Can you point me in the right
> direction?
> Looking at SysInfo > Loaded Modules, I see
> sqlserver 2000.080.0194.00
> Is that the correct place to look? And is that the most recent
> version? If not, where should I go to update it?
> (I run Microsoft Update regularly but I guess it might not reach MSDE)
>
> Bill Manville
> MVP - Microsoft Excel, Oxford, England
>
|||OK, so my MSDE is
Microsoft SQL Server 2000 - 8.00.194 (Intel X86)
Aug 6 2000
00:57:48
Copyright (c) 1988-2000 Microsoft Corporation
Personal
Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
and my client's server is
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005
23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Standard
Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
I guess that indicates my MSDE is a bit out of date.
Now to find out how to get it updated...
Bill Manville
MVP - Microsoft Excel, Oxford,
|||Ah, it's looks like it--perhaps dangerously so. It might still be prone to
the network attacks the pre SP2 versions faced years ago.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Bill Manville" <Bill-Manville@.msn.com> wrote in message
news:VA.000013ff.412751a3@.msn.com...
> OK, so my MSDE is
> Microsoft SQL Server 2000 - 8.00.194 (Intel X86)
> Aug 6 2000
> 00:57:48
> Copyright (c) 1988-2000 Microsoft Corporation
> Personal
> Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
>
> and my client's server is
> Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
> May 3 2005
> 23:18:38
> Copyright (c) 1988-2003 Microsoft Corporation
> Standard
> Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
>
> I guess that indicates my MSDE is a bit out of date.
> Now to find out how to get it updated...
> Bill Manville
> MVP - Microsoft Excel, Oxford,
>