Unknown,LazyWriter: Warning

Aug 23, 2007

I don€™t know if this is the case but I need some help. We have itanium server with Microsoft SQL Server 2005 - 9.00.3054.00 (Intel IA-64) Mar 23 2007 18:42:19 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2).


We has had lot of problem with that the sqlserver.exe process hangs 100% cpu. It€™s totally non responsive I€™m not even able to contact the server with DAC. The general solution has been just kill the process. Not nice.


https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=440746&SiteID=17


The log is full of those
Date,Source,Severity,Message
08/16/2007 09:00:38,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
08/16/2007 08:55:17,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
08/15/2007 13:06:09,spid4s,Unknown,LazyWriter: warning<c/> no free buffers found.
08/14/2007 10:07:08,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
08/09/2007 11:07:29,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
08/06/2007 09:41:13,spid2s,Unknown,LazyWriter: warning<c/> no free buffers found.
08/06/2007 09:14:50,spid2s,Unknown,LazyWriter: warning<c/> no free buffers found.
08/06/2007 08:54:38,spid2s,Unknown,LazyWriter: warning<c/> no free buffers found.
08/06/2007 08:24:59,spid2s,Unknown,LazyWriter: warning<c/> no free buffers found.
08/03/2007 11:09:54,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
08/01/2007 12:30:56,spid2s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/31/2007 10:16:45,spid2s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/30/2007 10:44:22,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/24/2007 01:03:36,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/23/2007 01:02:33,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/16/2007 12:27:52,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/16/2007 12:25:12,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/16/2007 11:54:07,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/16/2007 11:44:16,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/14/2007 01:04:15,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/12/2007 06:18:51,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/12/2007 06:06:49,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/10/2007 13:20:08,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/10/2007 13:10:43,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/09/2007 10:36:27,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/09/2007 10:28:46,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/06/2007 10:12:20,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/06/2007 10:09:39,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/06/2007 10:06:19,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/06/2007 10:01:28,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/06/2007 01:17:08,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/06/2007 01:13:47,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/04/2007 10:41:06,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/03/2007 10:24:24,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
07/03/2007 01:22:44,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.
06/28/2007 01:03:03,spid3s,Unknown,LazyWriter: warning<c/> no free buffers found.


LazyWriter: warning, no free buffers found.



We used to solution to set a fixed as told in the post above and after that the problem went away. At least for the last 4 days.


Is this LazyWriter not fixed in SP2 for itanium or what?

View 5 Replies


ADVERTISEMENT

SQL Server 2005 SP2 X64 Crashes...LazyWriter: Warning, No Free Buffers Found.

Jun 15, 2007

While waiting for the fax of instructions to contact MS Support, I thought I would post here (tried several times and no fax...)



We get this message in the log file and then all hell breaks loose until it resets memory. The SQL Service continues working but nobody can connect for about 5 minutes and then is seems to reset itself. This has happened three times over the past two weeks. Only one time it did create the SQLDUMP files but all three occurences have practically the same entries.



We are running SQL Server 2005 x64 SP2 under Windows 2003 x64 SP1. We have 4GB RAM and SQL is configured to use 2GB of it. We have a large number of databases (about 400) on this one instance that experiences this problem. The server itself is not under a tremendous load. All of the databases were recently upgraded from SQL 2000 SP4 32 bit instance. The first occurence happened just days after the migration.





----- Log Entries -----



LazyWriter: warning, no free buffers found.



2007-06-14 14:15:56.18 spid3s
Memory Manager
VM Reserved = 4415288 KB
VM Committed = 4398048 KB
AWE Allocated = 0 KB
Reserved Memory = 1024 KB
Reserved Memory In Use = 0 KB

2007-06-14 14:15:56.18 spid3s
Memory node Id = 0
VM Reserved = 4409528 KB
VM Committed = 4392376 KB
AWE Allocated = 0 KB
SinglePage Allocator = 1951840 KB
MultiPage Allocator = 81680 KB

2007-06-14 14:15:56.18 spid3s
MEMORYCLERK_SQLGENERAL (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 39264 KB
MultiPage Allocator = 21944 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLBUFFERPOOL (Total)
VM Reserved = 4214784 KB
VM Committed = 4198400 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 0 KB
MultiPage Allocator = 8 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLQUERYEXEC (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 264 KB
MultiPage Allocator = 104 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLOPTIMIZER (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 26816 KB
MultiPage Allocator = 96 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLUTILITIES (Total)
VM Reserved = 120 KB
VM Committed = 120 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 4728 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLSTORENG (Total)
VM Reserved = 96768 KB
VM Committed = 96768 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 62192 KB
MultiPage Allocator = 27624 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLCONNECTIONPOOL (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 4392 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLCLR (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLSERVICEBROKER (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 624 KB
MultiPage Allocator = 320 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLHTTP (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SNI (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 568 KB
MultiPage Allocator = 16 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_FULLTEXT (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 16 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLXP (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 16 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_BHF (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 336 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLQERESERVATIONS (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8192 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_HOST (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 24 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SOSNODE (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 42376 KB
MultiPage Allocator = 27392 KB

2007-06-14 14:15:56.20 spid3s
MEMORYCLERK_SQLSERVICEBROKERTRANSPORT (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 48 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_OBJCP (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 352016 KB
MultiPage Allocator = 432 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_SQLCP (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 953192 KB
MultiPage Allocator = 3088 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_PHDR (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 308728 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_XPROC (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 56 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_TEMPTABLES (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 128 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_NOTIF (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 16 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_VIEWDEFINITIONS (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 16 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_XMLDBTYPE (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_XMLDBELEMENT (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_XMLDBATTRIBUTE (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_STACKFRAMES (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 0 KB
MultiPage Allocator = 8 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_BROKERTBLACS (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 96 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_BROKERKEK (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_BROKERDSH (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_BROKERUSERCERTLOOKUP (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_BROKERRSB (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_BROKERREADONLY (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 32 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_BROKERTO (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 8 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_EVENTS (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 16 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
CACHESTORE_SYSTEMROWSET (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 43744 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
USERSTORE_SCHEMAMGR (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 30632 KB
MultiPage Allocator = 16 KB

2007-06-14 14:15:56.20 spid3s
USERSTORE_DBMETADATA (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 39856 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
USERSTORE_TOKENPERM (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 14536 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
USERSTORE_OBJPERM (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 14904 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
USERSTORE_SXC (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 936 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
OBJECTSTORE_LBSS (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 64 KB
MultiPage Allocator = 400 KB

2007-06-14 14:15:56.20 spid3s
OBJECTSTORE_SNI_PACKET (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 6584 KB
MultiPage Allocator = 48 KB

2007-06-14 14:15:56.20 spid3s
OBJECTSTORE_SERVICE_BROKER (Total)
VM Reserved = 0 KB
VM Committed = 0 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 272 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.20 spid3s
OBJECTSTORE_LOCK_MANAGER (Total)
VM Reserved = 8192 KB
VM Committed = 8192 KB
AWE Allocated = 0 KB
SM Reserved = 0 KB
SM Committed = 0 KB
SinglePage Allocator = 4232 KB
MultiPage Allocator = 0 KB

2007-06-14 14:15:56.21 spid3s Buffer Distribution: Stolen=22764 Free=0 Cached=221235
Database (clean)=268686 Database (dirty)=3406
I/O=0, Latched=5

2007-06-14 14:15:56.21 spid3s Buffer Counts: Committed=516096 Target=523990 Hashed=272097
Internal Reservation=104798 External Reservation=1022
Stolen Potential=252769
Min Free=128 Visible=523990
Available Paging File=4634734592
2007-06-14 14:15:56.21 spid3s Procedure Cache: TotalProcs=11768 TotalPages=202189 InUsePages=950

2007-06-14 14:15:56.21 spid3s Process physical/virtual memory pressure: 0/0 System physical memory pressure: 0

2007-06-14 14:15:56.23 spid3s Global Memory Objects:
Resource= 2880
Locks= 532
SE Schema Mgr= 3653
SQLCache= 1622
Replication= 3
ServerGlobal= 49
XPGlobal= 2
Xact= 165
SETLS= 4
DatasetMemObjs= 8
SubpDescPmos= 4
SortTables= 2

2007-06-14 14:15:56.23 spid3s Query Memory Objects: Grants=8 Waiting=0 Maximum=226034 Available=225010 Limit=226048

2007-06-14 14:15:56.23 spid3s Query Memory Objects: Next Request=0 Waiting For=0 Cost=0 Timeout=0 Wait Time=0 Last Target=237945

2007-06-14 14:15:56.23 spid3s Small Query Memory Objects: Grants=0 Waiting=0 Maximum=11895 Available=11895 Limit=11895

2007-06-14 14:15:56.24 spid3s
Optimization Queue
Overall Memory = 3440517120 Target Memory = 1485357056 Last Notification = GROW Timeout = 6 Early Termination Factor = 5
2007-06-14 14:15:56.24 spid3s
Small Gateway
Configured Units = 16 Available Units = 16 Acquires = 0
Waiters = 0 Threshold Factor = 380000 Threshold = 380000
2007-06-14 14:15:56.24 spid3s
Medium Gateway
Configured Units = 4 Available Units = 4 Acquires = 0
Waiters = 0 Threshold Factor = 12 Threshold = -1
2007-06-14 14:15:56.24 spid3s
Big Gateway
Configured Units = 1 Available Units = 1 Acquires = 0
Waiters = 0 Threshold Factor = 8 Threshold = -1
2007-06-14 14:15:56.24 spid3s
MEMORYBROKER_FOR_CACHE
Allocations = 221239
Rate = 0
Target Allocations = 379816
Future Allocations = 0
Last Notification = GROW

2007-06-14 14:15:56.24 spid3s
MEMORYBROKER_FOR_STEAL
Allocations = 22741
Rate = 0
Target Allocations = 181318
Future Allocations = 0
Last Notification = GROW

2007-06-14 14:15:56.24 spid3s
MEMORYBROKER_FOR_RESERVE
Allocations = 1024
Rate = 0
Target Allocations = 253810
Future Allocations = 95233
Last Notification = GROW

2007-06-14 14:39:56.82 Server Resource Monitor (0x1180) Worker 0x000000008000C1C0 appears to be non-yielding on Node 0. Memory freed: 148160 KB. Approx CPU Used: kernel 125 ms, user 62 ms, Interval: 65000.
2007-06-14 14:40:56.84 Server Resource Monitor (0x1180) Worker 0x000000008000C1C0 appears to be non-yielding on Node 0. Memory freed: 218536 KB. Approx CPU Used: kernel 328 ms, user 93 ms, Interval: 125046.
2007-06-14 14:41:56.84 Server Resource Monitor (0x1180) Worker 0x000000008000C1C0 appears to be non-yielding on Node 0. Memory freed: 288960 KB. Approx CPU Used: kernel 515 ms, user 125 ms, Interval: 185046.
2007-06-14 14:42:56.84 Server Resource Monitor (0x1180) Worker 0x000000008000C1C0 appears to be non-yielding on Node 0. Memory freed: 366008 KB. Approx CPU Used: kernel 718 ms, user 171 ms, Interval: 245046.
2007-06-14 14:43:56.84 Server Resource Monitor (0x1180) Worker 0x000000008000C1C0 appears to be non-yielding on Node 0. Memory freed: 435992 KB. Approx CPU Used: kernel 968 ms, user 296 ms, Interval: 305046.
2007-06-14 14:44:56.84 Server Resource Monitor (0x1180) Worker 0x000000008000C1C0 appears to be non-yielding on Node 0. Memory freed: 505160 KB. Approx CPU Used: kernel 1203 ms, user 390 ms, Interval: 365046.
2007-06-14 14:45:56.84 Server Resource Monitor (0x1180) Worker 0x000000008000C1C0 appears to be non-yielding on Node 0. Memory freed: 572488 KB. Approx CPU Used: kernel 1468 ms, user 468 ms, Interval: 425046.
2007-06-14 14:46:56.84 Server Resource Monitor (0x1180) Worker 0x000000008000C1C0 appears to be non-yielding on Node 0. Memory freed: 639056 KB. Approx CPU Used: kernel 1703 ms, user 500 ms, Interval: 485046.

View 12 Replies View Related

Unknown Members In Report Parameter Causes CONSTRAINED Flag Error In STRTOSET Function When NullProcessing Unknown Member

May 1, 2007

Hi,



I'm using MS Report Designer 2005 and have created a report that uses a cube, with a dimension set up to convert null values to unknown (nullProcessing = UnknownMember).



When I create a parameter using the checkbox in the graphical design mode's filter pane, Report Designer automatically sets the constrained flag, eg:

STRTOMEMBER(@DimOrganisationBUSADDRSTATE, CONSTRAINED).



When running the report and selecting the 'Unkown' value from the parameter list, the error 'the restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated' occurrs.



How can I prevent the constrained flag from being used, or am I doing something wrong with converting null values to 'Unknown'?



Thanks



View 10 Replies View Related

Drop Tables With Unknown Names And Unknown Quantity

Jul 20, 2005

This is what I want to do:1. Delete all tables in database with table names that ends with anumber.2. Leave all other tables in tact.3. Table names are unknown.4. Numbers attached to table names are unknown.5. Unknown number of tables in database.For example:(Tables in database)AccountAccount1Account2BinderBinder1Binder2Binder3.......I want to delete all the tables in the database with the exceptionof Account and Binder.I know that there are no wildcards in the "Drop Table tablename"syntax. Does anyone have any suggestions on how to write this sqlstatement?Note: I am executing this statement in MS Access with the"DoCmd.RunSQL sql_statement" command.Thanks for any help!

View 2 Replies View Related

LazyWriter

Aug 10, 1999

One of my clients has received the following message:

"99/08/10 10:40:15.38 spid2 Lazywriter: WARNING, LRU list is empty (408 free bufs, 3025 total bufs)"

I understand that it has something to do with the caching of data, but how can I fix this error message? Do I need to change the allocation of cache or just add more memory?

View 2 Replies View Related

Lazywriter Error In 6.5

Jun 5, 2001

2001/06/04 10:14:05.90 spid2 Lazywriter: WARNING, couldn't find slot, 8/8, scanned 8

Did a check on a NT4 server with RIAD 5, this error message is appearing on numorous occasions, any ideas welcome.
Sean

View 1 Replies View Related

Error Mesg 17308 : Lazywriter:....

Dec 28, 2000

Guys,

Is there a list somewhere of error messages that can explain event log message?

Mesg 17308 : lazywriter: Process 13 generated access violation; SQL Server is terminating this process

View 1 Replies View Related

SQL Cls Failed LazyWriter: No Free Buffers Found.

Jun 20, 2008

hi
We have use SQL Server 2005 on 64bit windows 2003 server Cluster. SQL instance stop responding for some leaving application interrupted.
In the Sql Err log I noticed the following information memory errors just before cluster issued stop command to SQlsrvres. Lazywriter gave warning that no free buffers found .

6/20/08 11:02 AMWarning[098] SQLServerAgent terminated (forcefully)
6/20/08 11:02 AMError[382] Logon to server '(local)' failed (DisableAgentXPs)
6/20/08 11:02 AMError[298] SQLServer Error: 258<c/> Unable to complete login process due to delay in prelogin response [SQLSTATE 08001]
6/20/08 11:02 AMError[165] ODBC Error: 0<c/> Login timeout expired [SQLSTATE HYT00]
6/20/08 11:02 AMError[298] SQLServer Error: 258<c/> TCP Provider: Timeout error [258]. [SQLSTATE 08001]
6/20/08 11:02 AMError[311] Thread 'AlertEngine' (ID 3812) is still running
6/20/08 11:02 AMError[311] Thread 'JobInvocationEngine' (ID 860) is still running
6/20/08 11:02 AMError[240] 2 engine thread(s) failed to stop after 30 seconds of waiting
6/20/08 11:01 AMInformation[131] SQLSERVERAGENT service stopping due to a stop request from a user<c/> process<c/> or the OS...
6/20/08 10:58 AMspid2sUnknownMEMORYBROKER_FOR_RESERVE <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYBROKER_FOR_STEAL <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYBROKER_FOR_CACHE <nl/>
6/20/08 10:58 AMspid2sUnknownBig Gateway <nl/>
6/20/08 10:58 AMspid2sUnknownMedium Gateway <nl/>
6/20/08 10:58 AMspid2sUnknownSmall Gateway <nl/>
6/20/08 10:58 AMspid2sUnknownOptimization Queue <nl/>
6/20/08 10:58 AMspid2sUnknownSmall Query Memory Objects: Grants=0 Waiting=0 Maximum=12800 Available=12800 Limit=12800
6/20/08 10:58 AMspid2sUnknownQuery Memory Objects: Next Request=0 Waiting For=0 Cost=0 Timeout=0 Wait Time=0 Last Target=787875
6/20/08 10:58 AMspid2sUnknownQuery Memory Objects: Grants=3 Waiting=0 Maximum=775075 Available=774691 Limit=775075
6/20/08 10:58 AMspid2sUnknownGlobal Memory Objects: <nl/>
6/20/08 10:58 AMspid2sUnknownProcess physical/virtual memory pressure: 0/0 System physical memory pressure: 0
6/20/08 10:58 AMspid2sUnknownProcedure Cache: TotalProcs=10446 TotalPages=117316 InUsePages=6442
6/20/08 10:58 AMspid2sUnknownBuffer Counts: Committed=1032192 Target=1048458 Hashed=895536<nl/>
6/20/08 10:58 AMspid2sUnknownBuffer Distribution: Stolen=10949 Free=0 Cached=125707<nl/>
6/20/08 10:58 AMspid2sUnknownOBJECTSTORE_LOCK_MANAGER (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownOBJECTSTORE_SERVICE_BROKER (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownOBJECTSTORE_SNI_PACKET (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownOBJECTSTORE_LBSS (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownUSERSTORE_SXC (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownUSERSTORE_OBJPERM (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownUSERSTORE_TOKENPERM (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownUSERSTORE_DBMETADATA (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownUSERSTORE_SCHEMAMGR (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_SYSTEMROWSET (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_EVENTS (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_BROKERTO (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_BROKERREADONLY (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_BROKERRSB (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_BROKERUSERCERTLOOKUP (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_BROKERDSH (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_BROKERKEK (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_BROKERTBLACS (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_STACKFRAMES (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_XMLDBATTRIBUTE (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_XMLDBELEMENT (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_XMLDBTYPE (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_VIEWDEFINITIONS (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_NOTIF (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_TEMPTABLES (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_XPROC (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_PHDR (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_SQLCP (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownCACHESTORE_OBJCP (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLSERVICEBROKERTRANSPORT (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SOSNODE (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_HOST (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLQERESERVATIONS (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_BHF (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLXP (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_FULLTEXT (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SNI (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLHTTP (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLSERVICEBROKER (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLCLR (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLCONNECTIONPOOL (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLSTORENG (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLUTILITIES (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLOPTIMIZER (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLQUERYEXEC (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLBUFFERPOOL (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMEMORYCLERK_SQLGENERAL (Total) <nl/>
6/20/08 10:58 AMspid2sUnknownMemory node Id = 0 <nl/>
6/20/08 10:58 AMspid2sUnknownMemory Manager <nl/>
6/20/08 10:58 AMspid2sUnknownLazyWriter: warning<c/> no free buffers found.

View 2 Replies View Related

Unknown Column Name?

Jan 17, 2008

Hello,
I need to perform an update to one of my columns in my gridView.  Is it possible to pass in the "column name" during runtime as a parameter to a stored procedure.  I tried doing that but it doesn't seem to work?  I might be doing something wrong of course. 
Can anyone give me some advice on how to do this?

View 9 Replies View Related

Unknown Exceptions

Jan 22, 2008

I'm sure that the try part of following code are all executedand the session("isLogin") has set to Truebut it always catch a exceptionand redirect to error1.aspx can't figure it out 1 Try
2 mySqlCon = New SqlConnection(strMySqlCon)
3 mySqlCmd = New SqlCommand(strMySqlCmd, mySqlCon)
4
5 mySqlCon.Open()
6 myDataReader = mySqlCmd.ExecuteReader()
7
8 If myDataReader.Read() = True Then
9
10
11 webPwdMd5 = System.Web.Security.FormsAuthentication. _
12 HashPasswordForStoringInConfigFile(Me.TextBox1.Text, "MD5")
13
14 If webPwdMd5 = myDataReader.Item("password") Then
15 Session("isLogin") = True
16 'Me.TextBox1.Text = "ppp"
17 Response.Redirect("main.aspx")
18 Else
19 Session("islogin") = False
20 Me.Label1.Visible = True
21 End If
22 Else
23 Session("isLogin") = False
24 Me.Label1.Visible = True
25 End If
26
27 mySqlCon.Close()
28
29 Catch Myexception As Exception
30 Session("isLogin") = False
31 Response.Redirect("error1.aspx")
32
33 Finally
34
35 End Try
 

View 2 Replies View Related

Unknown - \ - MSSQLServer

Jan 2, 2004

The Microsoft SQL Server icon is showing on my task bar but with a white (blank) circle "stamped" over the bottom right of the icon.

To me it seems that the implication is that somehow the server is not being recognized as (local)etSDK.

Resting the mouse arrow on the Server icon displays: unknown - \ - MSSQLServer

Needless to say something is quite wrong and I cannot open nor create ANY DATA while on WebMatrix.

If I right-click on the server icon and select "Start" I get the following error: "Invalid handle" which apparently is error number 6.

Previously, after many try-outs I managed to at least put the server icon on the task bar by making use of a setup.ini file that reads as shown below (and then typing from the MSDE sub directory while in MSDOS "setup.exe").

[Options]
INSTANCENAME=CADComputing
SECURITYMODE=SQL
SAPWD=myPassword539

Is there a way out of this mess?????

View 1 Replies View Related

Unknown .mdf And .ldf File??????

Jul 7, 2000

Hello!!!

I have installed sql 7.0 with sp1. when I check the files I saw to more file extra i.e. distmdl.mdf and distmdl.ldf along with system and pubs and northwind database files.

Can any one tell me what are these(distmdl.mdf and distmdl.ldf ) files.
Thank you!!!!!

Dindu

View 1 Replies View Related

Unknown Error

Jun 16, 2008

protected void Button4_Click(object sender, EventArgs e)
{
string selectedItem = DropDownList1.SelectedItem.Text;
if (selectedItem == "zezo")
{


string connectionString2 = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
SqlConnection connection2 = new SqlConnection(connectionString2);
connection2.Open();
SqlCommand command2 = new SqlCommand("finde", connection2);
command2.CommandType = CommandType.StoredProcedure;
command2.Parameters.Add("@columen_name", SqlDbType.NVarChar).Value = "taher";
command2.ExecuteNonQuery();
}

and this is the stored procedure

ALTER PROCEDURE dbo.finde @columen_name nvarchar(50)
/*
(
@parameter1 int = 5,
@parameter2 datatype OUTPUT
)
*/
AS
declare
@maxcount int,@sql varchar(8000)
set @maxcount=(select max(taher)+1 from counter)

set @sql='insert into counter (' + @columen_name +')
values ( @maxcount )'
exec (@sql)

************************
and this is the error

Server Error in '/NTSOLUTIONS' Application.
--------------------------------------------------------------------------------

Must declare the scalar variable "@maxcount".
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Must declare the scalar variable "@maxcount".

Source Error:


*********************************************
so i can not find where is the exact point

zezo

View 12 Replies View Related

NULL Vs. Unknown Value

Jul 20, 2005

I'm running into a situation that has me adding a value of "Unknown" toa reference table. I am being pulled between two trains of thought, andwas curious to get other's input on in. I give an example below.1-) Adding "Unknown" to a reference table is bad. Doing so effectivelychanges the Nullability option of every FK that references the table toa NULLable FK relation.2-) Simply adding a "Not Known/Undetermined" value to the referencetable greatly simplifies things. No schema changes are required, andprograms that use the reference table to populate their drop-downs willautomatically see the new value.Perhaps both approaches are good, but it would all depend of thecontext, the criticality of other FKs that reference the table, how/whenthe data is being used?==============================================EXAMPLE==============================================Assume two tables. Employee & EyeColor, as described below.+===================================+|Employee |+----------------+------------------+|EmployeeId(PK) | EyeColorId (FK) ||NOT NULL | NOT NULL |+----------------+------------------+|marc | 1 ||dan | 2 ||sonya | 1 |+================+==================++================================================= ===+|EyeColor |+---------------+------------------+-----------------+|EyeColorId(PK) | EnglishName(AK1) | FrenchName(AK2) ||NOT NULL | NOT NULL | NOT NULL |+---------------+------------------+-----------------+| 1 | Brown | Brun || 2 | Bloodshot | Rouge || 3 | Blue | Bleue |+===============+==================+============== ===+And let's say that an automated process is being built to import EyeColors from central database. In this process EyeColor may no longer beavailable.With solution #1, new (or existing) data is changed as follows:+----------------+------------------+|EmployeeId(PK) | EyeColorId (FK) ||NOT NULL | NULL |+----------------+------------------+|marc | 1 ||dan | 2 ||sonya | 1 ||newemp | NULL |+================+==================++================================================= ===+|EyeColor |+---------------+------------------+-----------------+|EyeColorId(PK) | EnglishName(AK1) | FrenchName(AK2) ||NOT NULL | NOT NULL | NOT NULL |+---------------+------------------+-----------------+| 1 | Brown | Brun || 2 | Bloodshot | Rouge || 3 | Blue | Bleue |+===============+==================+============== ===+With solution #2, new (or existing) data is changed as follows:+----------------+------------------+|EmployeeId(PK) | EyeColorId (FK) ||NOT NULL | NULL |+----------------+------------------+|marc | 1 ||dan | 2 ||sonya | 1 ||newemp | 0 |+================+==================++================================================= ===+|EyeColor |+---------------+------------------+-----------------+|EyeColorId(PK) | EnglishName(AK1) | FrenchName(AK2) ||NOT NULL | NOT NULL | NOT NULL |+---------------+------------------+-----------------+| 0 | Unknown | Inconnu || 1 | Brown | Brun || 2 | Bloodshot | Rouge || 3 | Blue | Bleue |+===============+==================+============== ===+*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 3 Replies View Related

Unknown Parametrs

Dec 25, 2007

why in a adomd connection these items are unknown

AdomdConnection,
connection,
MiningService,
and in the amo connection these itmes are unknown:

server.Connect,

MiningStructure,
miningmodel,

MiningModelAlgorithms

View 1 Replies View Related

'The Return Value Was Unknown'

Aug 23, 2006

When I try to run my package from SQL Server Agent I get the following errormessage:

Message
Executed as user: NT AUTHORITYNETWORK SERVICE. The return value was unknown. The process exit code was -532459699. The step failed.

It has nothing to do with security in any way: The package actually succeeds!! (no onErrorEvent is thrown, no Error or whatsoever is logged). The only logging I get is this:

#Fields: event,computer,operator,source,sourceid,executionid,starttime,endtime,datacode,databytes,message
PackageStart,KMAUSQL01SRV,NT AUTHORITYNETWORK SERVICE,Test,{3790FAE9-8300-4374-B2B7-6A630A508ED9},{E15D1815-1123-42D5-9D32-75B0237660A3},23.08.2006 17:18:02,23.08.2006 17:18:02,0,0x,Beginning of package execution.

PackageEnd,KMAUSQL01SRV,NT AUTHORITYNETWORK SERVICE,Test,{3790FAE9-8300-4374-B2B7-6A630A508ED9},{E15D1815-1123-42D5-9D32-75B0237660A3},23.08.2006 17:18:24,23.08.2006 17:18:24,0,0x,End of package execution.





PackageStart -> PackageEnd .... And in Fact the package DOES exactly do what it should! Just that it throws this error anyway!



What can I do to even trace down where the error occurs?? Not to mention fix it?

View 5 Replies View Related

Unknown Network Failure

Nov 15, 2007

Hello All!!!
 I have a 1.1 asp.net applications that has been in production for a little over a year. It is remoted from a webserver --> application server --> that access data server.  I am using win2003 servers and sql 2000.  Recently, the application has been having an issue retrieving and storing documents to the sql server.  When diagnosing the problem I have ran communication testing to make sure the servers are communicating as they should, I have ran the stored procedure to test for retrieval times and/or failure. So far everything has checked out.  While researching the issue, I ran across information that suggested changing from the SQLClient provider to the OLEDB provider.  All the changes I have tried appear to have no affect.
 I will mention that this does seem to occur only when retrieving larger files(probably a communication issue which I have my communications staff looking into).  Has anyone experienced this issue and maybe know of any possible solutions? 
 Thanks in advance

View 5 Replies View Related

Unknown Status: SPINLOOP

Feb 15, 2002

While running an sp_who2, I noticed a status of 'SPINLOOP'. I've never seen this before. Normally I see sleeping, RUNNABLE, and sometimes ROLLBACK.

Has anyone seen this before and/or have any idea what it means.
Sidney Ives
Database Administrator
Sentara Healthcare

View 1 Replies View Related

Sum Up An Unknown Number Of Records

Mar 19, 2007

With this algorithm you can sum up an unkown number of records, so that an aggregation matches a fixed value.
If there is not an exakt match available, the algorithm returns the nearest possible value!-- Initialize the search parameter
DECLARE@WantedValue INT

SET@WantedValue = 349

-- Stage the source data
DECLARE@Data TABLE
(
RecID INT IDENTITY(1, 1) PRIMARY KEY CLUSTERED,
MaxItems INT,
CurrentItems INT DEFAULT 0,
FaceValue INT,
BestUnder INT DEFAULT 0,
BestOver INT DEFAULT 1
)

-- Aggregate the source data
INSERT@Data
(
MaxItems,
FaceValue
)
SELECTCOUNT(*),
Qty
FROM(
SELECT 899 AS Qty UNION ALL
SELECT 100 UNION ALL
SELECT 95 UNION ALL
SELECT 50 UNION ALL
SELECT 55 UNION ALL
SELECT 40 UNION ALL
SELECT 5 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 50 UNION ALL
SELECT 250 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 90 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 50 UNION ALL
SELECT 350 UNION ALL
SELECT 450 UNION ALL
SELECT 450 UNION ALL
SELECT 100 UNION ALL
SELECT 100 UNION ALL
SELECT 50 UNION ALL
SELECT 50 UNION ALL
SELECT 50 UNION ALL
SELECT 1 UNION ALL
SELECT 10 UNION ALL
SELECT 1
) AS d
GROUP BYQty
ORDER BYQty DESC

-- Declare some control variables
DECLARE@CurrentSum INT,
@BestUnder INT,
@BestOver INT,
@RecID INT

-- If productsum is less than or equal to the wanted sum, select all items!
IF (SELECT SUM(MaxItems * FaceValue) FROM @Data) <= @WantedValue
BEGIN
SELECTMaxItems AS Items,
FaceValue
FROM@Data

RETURN
END

-- Delete all unworkable FaceValues
DELETE
FROM@Data
WHEREFaceValue > (SELECT MIN(FaceValue) FROM @Data WHERE FaceValue >= @WantedValue)

-- Update MaxItems to a proper value
UPDATE@Data
SETMaxItems =CASE
WHEN 1 + (@WantedValue - 1) / FaceValue < MaxItems THEN 1 + (@WantedValue - 1) / FaceValue
ELSE MaxItems
END

-- Update BestOver to a proper value
UPDATE@Data
SETBestOver = MaxItems

-- Initialize the control mechanism
SELECT@RecID = MIN(RecID),
@BestUnder = 0,
@BestOver = SUM(BestOver * FaceValue)
FROM@Data

-- Do the loop!
WHILE @RecID IS NOT NULL
BEGIN
-- Reset all "bits" not incremented
UPDATE@Data
SETCurrentItems = 0
WHERERecID < @RecID

-- Increment the current "bit"
UPDATE@Data
SETCurrentItems = CurrentItems + 1
WHERERecID = @RecID

-- Get the current sum
SELECT@CurrentSum = SUM(CurrentItems * FaceValue)
FROM@Data
WHERECurrentItems > 0

-- Stop here if the current sum is equal to the sum we want
IF @CurrentSum = @WantedValue
BREAK
ELSE
-- Update the current BestUnder if previous BestUnder is less
IF @CurrentSum > @BestUnder AND @CurrentSum < @WantedValue
BEGIN
UPDATE@Data
SETBestUnder = CurrentItems

SET@BestUnder = @CurrentSum
END
ELSE
-- Update the current BestOver if previous BestOver is more
IF @CurrentSum > @WantedValue AND @CurrentSum < @BestOver
BEGIN
UPDATE@Data
SETBestOver = CurrentItems

SET@BestOver = @CurrentSum
END

-- Find the next proper "bit" to increment
SELECT@RecID = MIN(RecID)
FROM@Data
WHERECurrentItems < MaxItems
END

-- Now we have to investigate which type of sum to return
IF @RecID IS NULL
IF @WantedValue - @BestUnder < @BestOver - @WantedValue
-- If BestUnder is closer to the sum we want, choose that
SELECTBestUnder AS Items,
FaceValue
FROM@Data
WHEREBestUnder > 0
ELSE
-- If BestOver is closer to the sum we want, choose that
SELECTBestOver AS Items,
FaceValue
FROM@Data
WHEREBestOver > 0
ELSE
-- We have an exact match
SELECTCurrentItems AS Items,
FaceValue
FROM@Data
WHERECurrentItems > 0With references to
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=73540
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=73610
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=78015
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=79505


Peter Larsson
Helsingborg, Sweden

View 3 Replies View Related

IF..ELSE In Function - Unknown Error

Jul 23, 2005

Hi all,I have the below user-defined function on mssql 2000 and I can't workout why i'm getting the following error:-----Server: Msg 156, Level 15, State 1, ProcedurefnCalculateOutworkerPaymentForBox, Line 15Incorrect syntax near the keyword 'IF'.Server: Msg 170, Level 15, State 1, ProcedurefnCalculateOutworkerPaymentForBox, Line 23Line 23: Incorrect syntax near ')'.----------CREATE FUNCTION fnCalculateOutworkerPaymentForBox(@boxid int)RETURNS moneyASBEGINRETURN (/* if the box is a paperback */IF (SELECT COUNT(BoxID) AS NoOfBoxes FROM OutworkerBoxes WHERE BoxID= @boxid AND BoxCode LIKE '%PAPER%') > 1/* If the books are paperback, charge 15p each and add on 30p for adescription book to make 45p */SELECT ((endref - StartRef) * 0.15) + (NoOfDescriptionBooks * 0.30)FROM OutworkerBoxes WHERE BoxID = @boxidELSE/* If the books are normal, charge 25p each and add 20p on fordescription books to make 45p */SELECT ((endref - StartRef) * 0.25) + (NoOfDescriptionBooks * 0.20)FROM OutworkerBoxes WHERE BoxID = @boxid)END-----Below is the sql for the table it works with:-----CREATE TABLE [OutworkerBoxes] ([BoxID] [int] IDENTITY (1, 1) NOT NULL ,[OutworkerID] [int] NOT NULL ,[ImportedBy] [int] NULL ,[StartRef] [int] NOT NULL ,[endref] [int] NOT NULL ,[DateIssued] [datetime] NOT NULL ,[BoxCode] [nvarchar] (50) COLLATE Latin1_General_CI_AS NOT NULL ,[DealerID] [int] NULL ,[StatusID] [int] NOT NULL ,[IssuedBy] [int] NOT NULL ,[BoxNotes] [nvarchar] (200) COLLATE Latin1_General_CI_AS NULL ,[DateImported] [datetime] NULL ,[NoOfDescriptionBooks] [int] NOT NULL CONSTRAINT[DF_OutworkerBoxes_NoOfDescriptionBooks] DEFAULT (0),CONSTRAINT [PK_OutworkerBoxes] PRIMARY KEY CLUSTERED([BoxID]) WITH FILLFACTOR = 90 ON [PRIMARY]) ON [PRIMARY]GO-----If anyone can advise me i'd be most grateful.Thanx in advanceJames

View 2 Replies View Related

Unknown Token Received

Jul 20, 2005

I have a client using SQL 2k, SP2 (due application requirements, SP3 is notan option - the application vendor will not specify why). We are receiving:[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL ServerConnection BrokenThere doesn't appear to be any rhyme or reason as to why this is happening.And...it shows it's ugly head at random places during execution. Has anyoneexperienced this also, or have any ideas on what to look for? I have seennumerous suggestions stating to upgrade from MDAC 2.6 to 2.7. At thispoint, I'm not sure if thats an option based on the vendors application(which by the way they no longer support!).Any ideas will be greatly appreciated.Greg

View 1 Replies View Related

Unknown Error 0x80131501

May 26, 2008

I recently tried Re-Installing SQL Server 2005 and setup fails with the following error message. I found a forum that instructed me to make sure that the Distributed Transaction Corrdinator Service is started and that the NT AUTHORITYNetworkService is set under the Log on as tab. I verified both of those settings in my services snap-in under the management console. Looks like setup is failing during this section: Integration Services - Configuring Components...

------------------------------
Microsoft SQL Server 2005 Setup

Failed to install and configure assemblies C:Program FilesMicrosoft SQL Server90DTSTasksMicrosoft.SqlServer.MSMQTask.dll in the COM+ catalog. Error: -2146233087
Error message: Unknown error 0x80131501
Error description: You must have administrative credentials to perform this task. Contact your system administrator for assistance.

For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=setup.rll&EvtID=29549&EvtType=sqlca%5csqlassembly.cpp%40Do_sqlAssemblyRegSvcs%40Do_sqlAssemblyRegSvcs%40x80131501

View 1 Replies View Related

An Unknown Error (-50) Occurred

Feb 11, 2008

An unknown error (-50) occurred.

So I can not recieve my email.

Running Entourage Student Ed.2004, Mac OS 10.5!

View 1 Replies View Related

Unknown Error Reports

Aug 30, 2005

does any know what this means:

View 3 Replies View Related

Unknown Number Of Values

Mar 19, 2008

I'm on SQL Server 2005 SP2.

I have the old age question of how to process a string parameter that is passed to a Stored Procedure that has an unknown number values. The example below has 5 values but it could be anywhere between 1 and 20.

I basically need to extract each value to Insert these values into the appropriate tables.

In the SQL 2000 days I use to do this with some T-SQL code that determines where the comma is and then I get the value and so on.....

I have read somewherethat this can be achieved using the XML Data Type.

Can someone show me that or atleast get me started on how to achiev this?

DECLARE @Range VARCHAR(200)


SET @Range = '10, 4, 8, 6, 22'

View 5 Replies View Related

Import File With Unknown No Of Columns

Dec 19, 2000

I have a package which imports text files in a directory. The problem I am having is that the text files have differing numbers of source columns. Can anyone example me some script which handled differing numbers of source columns for a dts package...

View 1 Replies View Related

Xp_sendmail Error: Unknown Recipient...

Apr 27, 1999

Hi All,

I was testing SQL Mail and I kept getting Unknown Recipient error regardless of what type of user names I tried to put in, I'd appreciate it if any of you could help.

Server: NT 4.0 Server (SP4)
SQL Server: 6.5 (SP4)
Mail Client: Exchange (5.0)

Since my company doesn't have a designated mailbox for SQL Server, I set it up to use my personal mailbox and profile. I was able to get SQL Mail up and running but couldn't not figure out a correct user name to pass to xp_sendmail.

The usual format of our e-mail addresses is <last name><first name>@xxx.com so I tried '<last name><first name>', '<last name>, <first name>' (the same format shown in the Address Book)...etc. but none of those worked.

Am I missing something?

View 1 Replies View Related

Opening/Converting Unknown Database

Feb 14, 2008

Hi there I dunno if this is the correct place to ask this.I got this database that is part of application, I need to convert/migrate it to any other current database like SQL server, the problem is that I dunno the database type, with his current application I know it got stored names and address, from the application I can only export 9999 records at the same time.The database is a 300mb DAT file.I have never done anything like this before so Any help or suggestions would be apreciatte, ty.Database opened with Index Data Suite:http://b.imagehost.org/0096/index_data_suite.jpgDatabase opened with Hex Editor:http://b.imagehost.org/0096/hex_pic.jpg

View 11 Replies View Related

Importing Files With Unknown Names

Dec 30, 2003

I want to write a DTS that will import a file every day. The problem is that the files is not named the same thing every day. There is a naming convention (SOMMDDYY.TRN) that it will follow. I want to import this file (which is a fixed width file) each day to a table (The table will be empty each day).

After it is imported, I want to look at the NAME of the file, and pull out the date portion of it. So, if the file is called SO122603.TRN, i want to pull out 122603, and then update my table with that date for every record. So when I am done, I will have a table that represents the file I imported, with one added column. This added column would be a Date/Time that has the date that was in the filename. How do I do this???

View 11 Replies View Related

Stored Proc - Unknown Parameters

Jan 24, 2007

If a procedure is known but all parameters are not known, can I handle this using CommandBehavior.RetrieveParameters.
If yes, do I need to incur an extra round trip to server.

View 1 Replies View Related

FnParseString And Unknown Number Of Columns

Mar 20, 2007

Keshka writes "I'm using function fnParseString form http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76033 in some of my sp.

it's very helpfull, but my question is if there is a way to split variable into columns if I don't know how many columns I'll have? It could be 1 or 2 or 3 and etc.


Thanks"

View 3 Replies View Related

SQL Join With Unknown Tables - But It Works!?!

Nov 23, 2005

Hi all,While debugging some old code from someone, I came across this storedprocedure:SELECT dbo.TBL_COORD.COORD_ID AS ID, dbo.TBL_COORD.LATITUDE AS Latitude,dbo.TBL_COORD.LONGITUDE AS Longitude,dbo.TBL_COORD.NORTHING AS Northing,dbo.TBL_COORD.EASTING AS Easting, dbo.refDROP_VALUES.Drop_Value AS [GeometryType],refDROP_VALUES_1.Drop_Value AS [GPS Datum],refDROP_VALUES_2.Drop_Value AS [GPS Used]FROM dbo.TBL_COORD INNER JOINdbo.refDROP_VALUES ON dbo.TBL_COORD.GEOMETRYTYPE_ID =dbo.refDROP_VALUES.ID INNER JOINdbo.refDROP_VALUES refDROP_VALUES_1 ONdbo.TBL_COORD.GPS_DATUM = refDROP_VALUES_1.ID INNER JOINdbo.refDROP_VALUES refDROP_VALUES_2 ONdbo.TBL_COORD.GPS_USED = refDROP_VALUES_2.IDWHERE<some conditions here>This query seems to work fine, however I cannot see ANY source to the tablesrefDROP_VALUES_1, and refDROP_VALUES_2. There are no views/tables/storedprocedures of any kind with these names in the databse, so I'm at a loss asto where they're coming from. Note that there IS a table refDROP_VALUES, andthe fields that refDROP_VALUES_1 and refDROP_VALUES_2 reference ARE fieldsin the table refDROP_VALUES. I can view the results from running the query.Whats going on here? Does MS SQL create these tables?Jack.

View 4 Replies View Related

Transact SQL :: How To Get Unknown Dropped Indexes

Jun 15, 2015

I created dropped all indexes in a database and run in one database instead of actual databse. How to recreate again dropped indexes ...

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved