Duplicate Key Was Ignored Warning Returned Even When No Duplicates Are Found
Sep 27, 2013
I am having problems with the "Duplicate key was ignored" warning message. The problem is that the message seems to happen randomly and cannot be reproduced. If i take the same set of data and run the stored procedure that causes the problem i don't get the warning message a second or subsequent time. Also all the SELECT statements have criteria set to remove duplicates before they are inserted into the tables.
I have a data feed that pulls data from a DB2 database to a SQL Server 2008 staging table as a flattened set of records. A stored procedure in SQL Server is run to load the data into the destination tables. The data feed is run hourly for new and updated records in DB2 Monday-Friday 09:00-17:00 and then there is a midnight run of all the records going back for the last 12 months.
The data feed was originally sent from DB2 as a CSV file and pulled into SQL Server using SSIS but is now an Informatica workflow that pulls the data directly from DB2.
It is the Informatica workflow that is returning the "duplicate key was ignored" warning message and this stops the workflow. The workflow is restarted and the data is always loaded the second time without the warning message. The warning does not happen every time the workflow is run - it can run for a number of days with no warnings and then one will come through I can see in Profiler that it is SQL Server that returns the Duplicate key was ignored warning message so it is not an issue with Informatica.
I cannot reproduce the problem to get to the root cause of the issue. I would expect that if i run the same set of data through the stored procedure i would get the warning message every time, but this is not the case. Even when i step through the stored procedure i do not get the message. As the midnight data feed returns the records from the last 12 months, so by definition would include duplicates, the warning message only appears randomly and is not consistent.
View 8 Replies
ADVERTISEMENT
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
Apr 10, 2008
I have a table employee_test having the sample data. The rows with EmployeeID=6 are duplicate rows. I want to delete the duplicates retaining one row for the employeeid=6.
Note :- I don't want to use a temporary table. I want to do this using a single query or at the most in a SP query batch. Please advise.
EMPLOYEEID
ENAME
SALARY
MANAGERID
1
Anee
1000
11
2
Rick
1200
12
3
JOHN
1100
13
4
ABC
1300
14
5
DEF
1400
15
6
DEF
1400
15
6
DEF
1400
15
View 22 Replies
View Related
Jan 3, 2007
Hi All !
Below is a snippet of MS SQL inside ASP that retieves
Commodity info such as product names and related information and returns the results in an ASP Page. My problem is that with certain searches, elements returned in the synonym field repeat. For instance, on a correct search I get back green, red, blue, and yellow which is correct. On another similar search different commodity say for material, I get Plastic, Glass,Sand - Plastic, Glass,Sand - Plastic Glass Sand. I want to remove the repeating elements returned in this field. I hope this makes sense.
PS I tried to use distinct but with no luck I want just one of each in the example below.
Thanks in Advance!
Scott
==============================
SQL = ""
SQL = "SELECT B.CIMS_MSDS_NUM," & _
"A.COMMODITY_NUMBER, " & _
"B.CIMS_TRADE_NME," & _
"B.CIMS_MFR_NME," & _
"B.CIMS_MSDS_PREP_DTE," & _
"B.APVL_CDE," & _
"COALESCE(C.REGDMATLCD,'?') AS DOTREGD," & _
"COALESCE( D.CIMS_TRADE_SYNM,'NO SYNONYMS') AS SYNONYM, " & _
"A.MSDS_CMDTY_VERIF, " & _
"A.CATALOG_ID " & _
"FROM ( MATEQUIP.VMSDS_CMDTY A " & _
" RIGHT OUTER JOIN MATEQUIP.VCIMS_TRD_PROD_INF B " & _
" ON A.CIMS_MSDS_NUM = B.CIMS_MSDS_NUM " & _
" LEFT OUTER JOIN MATEQUIP.VDOT_TRADE_PROD C " & _
" ON A.CIMS_MSDS_NUM = C.MSDSNUM " & _
" LEFT OUTER JOIN MATEQUIP.VCIMS_TRD_PROD_SYN D " & _
" ON B.CIMS_MSDS_NUM = D.CIMS_MSDS_NUM) "
SQL1 = ""
SQL1 = SQL
SQL = SQL & "WHERE " & Where & " "
==================================
Here is a piece of the problem field, note repeating colors etc.
CCM-PAINTS & COATINGS (1/26/98)F65E36 ORANGE F65W1 GLOSS WHITEF65B50 WR. IRON FLAT BLACK F65R2 TARTAR RED DARKF65B4 SEMI-GLOSS BLACK F65R1 VERMILIONF65B1 GLOSS BLACK F65N11 RICH BROWNF65A49 ASA #49 GRAY F65M1 MAROONF65A4 MACHINE TOOL GRAY F65L10 BRIGHT BLUEF65A2 LIGHT GRAY F65L7 PALE BLUEF65A1 WARM GRAY F65L6 TURQUOISEF65L4 DARK BLUEF65L3 LIGHT BLUE V65V100 MIXING CLEARF65H1 IVORY F65Y48 LIGHT YELLOWF65G41 FOREST GREEN F65Y44 LEMON YELLOWF65G40 MEDIUM GREEN F65W100 MIXING WHITEF65G39 LIGHT GREEN F65W4 TINTING WHITEF65G16 SEMI-GLOSS MACHINERY GRE F65W3 CUSTOM WHITEF65E37 INTERNATIONAL ORANGE F65W2 SEMI-GLOSS WHITEF65B50 WR. IRON FLAT BLACK F65R2 TARTAR RED DARKF65B4 SEMI-GLOSS BLACK F65R1 VERMILIONF65B1 GLOSS BLACK F65N11 RICH BROWNF65A49 ASA #49 GRAY F65M1 MAROONF65A4 MACHINE TOOL GRAY F65L10 BRIGHT BLUEF65A2 LIGHT GRAY F65L7 PALE BLUEF65A1 WARM GRAY F65L6 TURQUOISEDISAPPROVED BY CCM-PAINTS & COATINGS (1/26/98)F65L4 DARK BLUEF65L3 LIGHT BLUE V65V100 MIXING CLEARF65H1 IVORY F65Y48 LIGHT YELLOWF65G41 FOREST GREEN F65Y44 LEMON YELLOWF65G40 MEDIUM GREEN F65W100 MIXING WHITEF65G39 LIGHT GREEN F65W4 TINTING WHITEF65G16 SEMI-GLOSS MACHINERY GRE F65W3 CUSTOM WHITEF65E37 INTERNATIONAL ORANGE F65W2 SEMI-GLOSS WHITEF65E36 ORANGE F65W1 GLOSS WHITEDISAPPROVED BY CCM-PAINTS & COATINGS (1/26/98)F65A2 LIGHT GRAY F65L7 PALE BLUEF65A1 WARM GRAY F65L6 TURQUOISEF65B4 SEMI-GLOSS BLACK F65R1 VERMILIONF65B1 GLOSS BLACK F65N11 RICH BROWNF65A49 ASA #49 GRAY F65M1 MAROONF65A4 MACHINE TOOL GRAY F65L10 BRIGHT BLUEF65L4 DARK BLUEF65L3 LIGHT BLUE V65V100 MIXING CLEARF65H1 IVORY F65Y48 LIGHT YELLOWF65G41 FOREST GREEN F65Y44 LEMON YELLOWF65G40 MEDIUM GREEN F65W100 MIXING WHITEF65G39 LIGHT GREEN F65W4 TINTING WHITEF65G16 SEMI-GLOSS MACHINERY GRE F65W3 CUSTOM WHITEF65E37 INTERNATIONAL ORANGE F65W2 SEMI-GLOSS WHITEF65E36 ORANGE F65W1 GLOSS WHITEF65B50 WR. IRON FLAT BLACK F65R2 TARTAR RED DARKF65A1 WARM GRAY F65L6 TURQUOISEDISAPPROVED BY CCM-PAINTS
View 2 Replies
View Related
Jan 30, 2013
I have find out almost 80 duplicate indexes in my database while tuning db with the use of following query:how to delete all duplicate indexes in one go instead of deleting individual.
-- Duplicate Index Scripts
-- Original Author: Pinal Dave (C) 2011
-- SQL Server Journey with SQL Authority
WITH MyDuplicate AS (SELECT
Sch.[name] AS SchemaName,
Obj.[name] AS TableName,
Idx.[name] AS IndexName,
INDEX_Col(Sch.[name] + '.' + Obj.[name], Idx.index_id, 1) AS Col1,
[code]....
View 3 Replies
View Related
Nov 3, 2014
There are many duplicate records on my data table because users constantly register under two accounts. I have a query that identify the records that have a duplicate, but it only shows one of the two records, and I need to show the two records so that I can reconcile the differences.The query is taken from a post on stack overflow. It gives me 196, but I need to see the 392 records.
How to identify the duplicates and show the tow records without having to hard code any values, so I can use the query in a report, and anytime there are new duplicates, the report shows them.
SELECT
[groom_first_name]
,[groom_last_name]
,[bride_first_name]
,[bride_last_name]
[code]....
View 5 Replies
View Related
Jul 8, 2014
1) Errors in the OLAP storage engine: A duplicate attribute key has been found when processing:
Table: 'dbo_Dim_x0020_Document_x0020_Type',Column: 'Item_x0020_No_', Value: '1100'. The attribute is 'Item No'.
How can I resolve this on package level.
2) I am also not able to see all the fields of a fact table when creating cube, where I can se all fields in dataview.
View 6 Replies
View Related
Nov 19, 2015
I am wanting to create a query so that I can combine each of the found duplicates into one entry.
An example of this is:
Name |ID |Tag |Address |carNum
-------------------------------------------------------
Bob Barker |2054| 52377 |235 Some road |9874
Bill Gates |5630| 69471 |014 Washington Rd. |3700
Bob Barker |2054| 97011 |235 Some road |9874
Bob Barker |2054| 40019 |235 Some road |9874
Steve Jobs |8501| 73051 |100 Infinity St. |4901
John Doe |7149| 86740 |7105 Bull Rd. |9282
Bill Gates |5630| 55970 |014 Washington Rd. |3700
Tim Boons |6370| 60701 |852 Mnt. Creek Rd. |7059
In the example above, Bob Barker and Bill gates are both in the database more than once so I would like the output to be the following:
Bob Barker |2054|52377/97011/40019|235 Some road |9874
Bill Gates |5630|69471/55970 |014 Washington Rd.|3700
Steve Jobs |8501|73051 |100 Infinity St. |4901
John Doe |7149|86740 |7105 Bull Rd. |9282
Tim Boons |6370|60701 |852 Mnt. Creek Rd. |7059
Notice how Bob Barker & Bill Gates appends the tag row (the duplicated data) into one row instead of having multiple rows. This is because I do not want to have to check the previous ID and see if it matches the current id and append to the data.
View 2 Replies
View Related
May 26, 2008
Hi All,
I am using windows 2003 server and i have installed SSAS 2005 and configured http request for AS 2005 with this below url : http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx. I had tried all the possiblities given in this url. But i am getting like "Test connection failed because of error initializing provider. The HTTP Server returned the following error : Not found" when i create udl file. Moreover i have installed MSOLAP 3.0 and OLAP 9.0 provider and MSXML 6.0 Parser.
Can you anyone please provide solution for this?
Thanks in advance,
Anand Rajagopal
View 1 Replies
View Related
Oct 22, 2014
I have a table with 22 million Business records. I can see that there are duplicates when I group by BusinessName and Address and Phone. I'd like to place only the duplicates into a table, with a ranking, oldest business key gets a ranking of 1.
As a bonus I'd like each group to have a distinct group name (although not necessary, just want to know how to do this)
Later after I run more verifications to make sure these are not referenced elsewhere I'll delete everything with a matchRank > 1 out of the main Business table.
DROP TABLE [dbo].[TestBusiness];
GO
CREATE TABLE [dbo].[TestBusiness](
[Business_pk] INT IDENTITY(1,1) NOT NULL,
[BusinessName] VARCHAR (200) NOT NULL,
[Address] VARCHAR(MAX) NOT NULL,
[code]....
View 9 Replies
View Related
Jun 20, 2006
I have a strange problem. I have some code that executes a sql query. If I run the query in SQL server query analyzer, I get a set of data returned for me as expected. This is the query listed on lines 3 and 4. I just manually type it into query analyzer.
Yet when I run the same query in my code, the result set is slightly different because it is missing some data. I am confused as to what is going on here. Basically to examine the sql result set returned, I write it out to an XML file. (See line 16).
Why the data returned is different, I have no idea. Also writing it out to an XML file is the only way I can look at the data. Otherwise looking at it in the debugger is impossible, with the hundreds of tree nodes returned.
If someone is able to help me figure this out, I would appreciate it.
1. public DataSet GetMarketList(string region, string marketRegion)2. {3. string sql = @"SELECT a.RealEstMarket FROM MarketMap a, RegionMap b " + 4."WHERE a.RegionCode = b.RegionCode"; 5. DataSet dsMarketList = new DataSet();6. SqlConnection sqlConn = new SqlConnection(intranetConnStr); 7. SqlCommand cmd = new SqlCommand(sql,sqlConn);8. sqlConn.Open();9. SqlDataAdapter adapter = new SqlDataAdapter(cmd); 10. try11. {12. adapter.Fill(dsMarketList);
13. String bling = adapter.SelectCommand.CommandText;//BRG 14. dsMarketList.DataSetName="RegionMarket"; 15. dsMarketList.Tables[0].TableName = "MarketList"; 16. dsMarketList.WriteXml(Server.MapPath ("myXMLFile.xml" )); // The data written to 17. myXMLFile.xml is not the same data that is returned when I run the query on line 3&4 18. // from the SQL query 19. } 20. catch(Exception e) 21. { 22. // Handle the exception (Code not shown)
View 2 Replies
View Related
Jan 26, 2015
Is there a query or a way to convert duplicates value in a column to non duplicates.
View 14 Replies
View Related
May 1, 2007
I've got a package which reads a text file into a table and updates another. I set up configurations so that I could import it into the SSIS store on both my dev and live servers. Now, I'm getting this error. I tried removing the configs and am still getting it.
I've been through each step and everything looks okay. Does anyone have any idea (a) what's wrong, (b) how to localise the error or (c) get any additional information? Or do I just have to recreate the package from scratch?
TITLE: Package Validation Error
------------------------------
Package Validation Error
------------------------------
ADDITIONAL INFORMATION:
Error at PartnerLinkFlatFileImporter: The connection "" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Error at PartnerLinkFlatFileImporter [Log provider "SSIS log provider for SQL Server"]: The connection manager "" is not found. A component failed to find the connection manager in the Connections collection.
(Microsoft.DataTransformationServices.VsIntegration)
------------------------------
BUTTONS:
OK
------------------------------
View 20 Replies
View Related
Oct 2, 2007
Hello Everyone:
I am using the Import/Export wizard to import data from an ODBC data source. This can only be done from a query to specify the data to transfer.
When I try to create the tables, for the query, I am getting the following error:
Msg 2714, Level 16, State 4, Line 12
There is already an object named 'UserID' in the database.
Msg 1750, Level 16, State 0, Line 12
Could not create constraint. See previous errors.
I have duplicated this error with the following script:
USE [testing]
IF OBJECT_ID ('[testing].[dbo].[users1]', 'U') IS NOT NULL
DROP TABLE [testing].[dbo].[users1]
CREATE TABLE [testing].[dbo].[users1] (
[UserID] bigint NOT NULL,
[Name] nvarchar(25) NULL,
CONSTRAINT [UserID] PRIMARY KEY (UserID)
)
IF OBJECT_ID ('[testing].[dbo].[users2]', 'U') IS NOT NULL
DROP TABLE [testing].[dbo].[users2]
CREATE TABLE [testing].[dbo].[users2] (
[UserID] bigint NOT NULL,
[Name] nvarchar(25) NULL,
CONSTRAINT [UserID] PRIMARY KEY (UserID)
)
IF OBJECT_ID ('[testing].[dbo].[users3]', 'U') IS NOT NULL
DROP TABLE [testing].[dbo].[users3]
CREATE TABLE [testing].[dbo].[users3] (
[UserID] bigint NOT NULL,
[Name] nvarchar(25) NULL,
CONSTRAINT [UserID] PRIMARY KEY (UserID)
)
I have searched the "2714 duplicate error msg," but have found references to duplicate table names, rather than multiple field names or column name duplicate errors, within a database.
I think that the schema is only allowing a single UserID primary key.
How do I fix this?
TIA
View 4 Replies
View Related
Jul 17, 2001
Whats the cause for this warning, after I query a sqlserver 7 table,
'warning: Null value eliminated from aggregate' ?
Thanks,
Scott
View 1 Replies
View Related
Nov 12, 2002
I keep getting this warning, any ideas on how to fix this? Thank you.
View 1 Replies
View Related
Aug 17, 2004
Hello,
I am getting the following warning message in the event viewer. I have only one schedule in sql. there is no other schedules in task scheduler or database management.
Event Type:Warning
Event Source:SQLSERVERAGENT
Event Category:Job Engine
Event ID:208
Description:
SQL Server Scheduled Job 'Transaction Log Backup Job for DB Maintenance Plan 'DB Maintenance Plan1'' (0xD25A4CDDD1C59E48B4D28F61F0A411B8) - Status: Failed - Invoked on: 2004-08-16 02:30:00 - Message: The job failed. The Job was invoked by Schedule 2 (Schedule 1). The last step to run was step 1 (Step 1).
Kindly give the suggestions at earliest.
View 1 Replies
View Related
Jan 26, 2004
Hey guys....I have a quick question. I am having a problem with a certain app which connects to my SQL 2000 SP3a Database. It only occurs when I have a ^ in the password, both using SQL and NT authentication.
I have checked on MSDN and they do not list that character as one to avoid. I did find in the books online documentation that the ^ performs a bitwise exclusive OR operation....has anyone tested using ^ as part of a password to authenticate to a SQL db?
View 1 Replies
View Related
Jan 6, 2006
I typed the following query
ALTER TABLE [konnik].[PORTAL_CONFIG]
ADD CONSTRAINT [DF_PORTAL_CONFIG_AUTOPM_ON]
DEFAULT (1) FOR [AUTOPM_ON]
and i received the following warning
Warning: The table 'PORTAL_CONFIG' has been created but its maximum row size (12068) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.
Bear in mind that this table come from Access through the Dts. Could anyone translate this for me? How can i overcome this???
View 10 Replies
View Related
May 7, 2007
hi all..
i have this error and fail to resolve it :-
Warning: Null value is eliminated by an aggregate or other SET operation.
what does that means? my code :-
SELECT
@BookQtyIN = ISNULL(SUM(x.pickqty), 0),
@PickQtyIN = CASE WHEN ISNULL(SUM(x.pickqty), 0) >0 THEN
ISNULL(SUM(d.PickQty), 0) - ISNULL(SUM(x.pickqty), 0)
ELSE ISNULL(SUM(d.PickQty), 0)END,
FROMtblItemDetail d
LEFT JOIN (SELECT p.PickQty AS PickQty,
j.PickComplete AS PickComplete,
p.ItemStorageID AS ItemStorageID
FROM tblItempicked p
LEFT JOIn tblJobDocuments j
ON j.Docrefid=p.Docrefid AND j.JobID=p.JobID
WHERE j.PickComplete='N'
)AS x ON x.ItemStorageID=d.ItemStorageID
WHERE d.ItemID = @ItemID
AND d.Ownership = @ClientID
AND d.CustomLotNo = @CustomLotNo
View 2 Replies
View Related
May 25, 2006
If you have a package that uses an environment variable for an indirect configuration and the environment variable is not present when the package runs you get the following warning:
The configuration environment variable was not found. The environment variable was: "Seer.ConnectionManager.CUECommonReference". This occurs when a package specifies an environment variable for a configuration setting but it cannot be found. Check the configurations collection in the package and verify that the specified environment variable is available and valid.
IMO, if the package is expecting to find something and cannot find it then it should cause an error, not a warning. I'm happy for people to disagree tho :)
Any comments???
-Jamie
View 17 Replies
View Related
Jan 17, 2008
Install on 2003 Server R2 x64 I get this warning and need to now how to fix this:
- ASP.Net Version Registration Requirement (Warning)
Messages
ASP.Net Version Registration Requirement
64-bit ASP.Net is Registered. Required 32-bit ASP.Net to install Microsoft Reporting Services 2005(32-bit).
Can the 32-bit version co-exist with the 64-bit version APS.Net?
View 3 Replies
View Related
May 24, 2007
Hello,
I'm having a problem with one of my packages due to a truncation warning that I can't get rid of. It's not the end of the world, because the package still works. It's just extremely frustrating.
The problem arises in a derived column item in a data flow task. There is a postcode field in the data flow which has space for 20 characters. I create a derived column from this which simply removes any spaces:
Derived Column Name: Postcode
Derived Column: Replace 'Postcode'
Expression: REPLACE(" ",Postcode,"")
Data Type: string [DT_STR]
Length: 20
Code Page: 1252 (ANSI - Latin I)
However when I use this expression, or anything else which uses the replace function, I end up with the warning message:
Warning 1 Validation warning. Create Staging Tables: Derived Column [20555]: The result string for expression "REPLACE(" ",Postcode,"")" may be truncated if it exceeds the maximum length of 4000 characters. The expression could have a result value that exceeds the maximum size of a DT_WSTR.
I have tried everything I can think of to get rid of the warning. Is there some way I can use the replace function, but not have the system convinced that I'm about to go over the maximum size limit?
Many thanks
View 5 Replies
View Related
Aug 17, 2007
I've begun to get the above error from my package. The error message refers to two output columns.
Anyone know how this could happen from within the Visual Studio 2005 UI? I've seen the other posts on this subject, and they all seemed to be creating the packages in code.
Is there any way to see all of the columns in the data flow? Or is there any other way to find out which columns it's referring to?
Thanks!
View 3 Replies
View Related
Feb 14, 1999
Can some one please help.
Lately I am getting an error:
LAZY WRITER WARNING: LRU List is Empty
Than the system locks!
can anyone help. This is driving us crazy.
There is no reference in the KB. We are trying to insert records into a table by a SP.
Thanks,
John
View 2 Replies
View Related
May 20, 1999
I'm running SQL Server 6.5, with the latest Service pack on NT 4.0 with SP4. A couple of days ago I started getting a warning message in my event log right after a scheduled task ran. The scheduled task calls three stored procedures (data dumps for master, msdb, and a production database) it also runs a consistency check on each before dumping them. I can interactively run each stored procedure and get NO error messages. Prior to getting the warning message (which occurs after the scheduled task runs) I get normal informational entries that the dumps occurred without a problem and the files are written to the proper area. The error is in the Task Engine category and are Warning type messages. Here is the text:
SQL Server Scheduled Task: 27, 'Proddata Dump' -- Status: Failed
-- Task Invoked on: 5/20/99 5:00:00 AM -- Message: Database 'ASSMTCTRPROD' (116647 pages) dumped to file <1> on device 'D:DATDUMPASSMTCTRPROD_990520_DATA.DMP'. (Message 4035)
Any help that anyone could give would be greatly appreciated. Thanks
View 1 Replies
View Related
Jul 23, 2002
Hi
I'm getting a strange sql server agent warning in my server's event log (not in the sql server log). Its occurring after each agent job runs and says:
"Unable to determine if the owner (sa) of job Trans Backup has server access (reason: Unable to connect to server - check SQL Server and SQL Agent errorlogs)."
I have checked the errorlogs - nothing.
My job completes OK, but I get this warning.
I'm running SQL Server 2000 SP2.
I'm running in a cluster.
The problem has only occurred since a reboot yesterday.
Any Ideas?
Thanks in advance.
Andy
View 2 Replies
View Related
Feb 8, 2008
Hi All,
I've recently restored one of my development databases from it's production backup. The restore completed successfully, users were able to connect to the database without any problems. However, when I checked the error log I found the following message:
Bypassing recovery for database 'Test' because it is marked IN LOAD.
I could not find anything on the web or in BOL. Any ideas?
Thanks.
View 3 Replies
View Related
Feb 10, 2004
Hi all,
Sql server 7.
Under event viewer->application log i am getting the below error continously. Pls help
Regards,Event Type: Warning
Event Source: SQLServerAgent$abc
Event Category: Printers
Event ID: 208
Date: 2/9/2004
Time: 9:23:03 PM
User: N/A
Computer: abc1
Description:
The description for Event ID ( 208 ) in Source ( SQLServerAgent$abc ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: SQL Check, 0xAF04DFE7917DEA489F33D8A38E8A0793, Failed, 2/9/2004 9:23:00 PM, The job failed. The Job was invoked by Schedule 31 (6.x schedule). The last step to run was step 1 (Step 1)..
Waiting for ur reply
TIA
aadil
View 3 Replies
View Related
Feb 25, 2004
I use VB 6.0 with ADO 2.6 to access an SQL-server.
I know that the table I wish to create generates this warning.
But from today ( without any changes to the SQL-server ) , this warning is reported as an error to the client instead of continuing.
So my error trap routine traps this as an error now.
I have a workaround that I would to avoid and that's reinstalling the SQL-server ( Only the MSSQL ).
Does anybody know a better solution.
PS : Changing the table structure is not possible in this case.
Thnx in advance,
Sven Peeters
Belgium
View 2 Replies
View Related
Sep 18, 2007
Hello there
I installed sql server 2005 developer edition
and the only error message i got was.
- IIS Feature Requirement (Warning)
Messages
IIS Feature Requirement
Microsoft Internet Information Services (IIS) is either not installed or is disabled. IIS is required by some SQL Server features. Without IIS, some SQL Server features will not be available for installation. To install all SQL Server features, install IIS from Add or Remove Programs in Control Panel or enable the IIS service through the Control Panel if it is already installed, and then run SQL Server Setup again. For a list of features that depend on IIS, see Features Supported by Editions of SQL Server in Books Online.
how do i get hold of Internet Information Services
I installed it on vista premium.
Please help
Regards
ROB
View 3 Replies
View Related
Nov 30, 2007
While intalling SQL 2005 on an x64 machine, I got an error message that warned that some functions of SQL would not install unless IIS was installed (and enabled) on the machine. It did not say what would not install, but I gather it is Reporting Services. I don't recall getting these warnings in previous (32 bit) installations of SQL 2005.
On the other hand, when I go into the BI Intelligence Studio on
a (32 bit) server that does not have IIS, I seem to be able to create
a report anyway (Not really my area of expertise ). Does that mean that Report Services is working without IIS?
View 1 Replies
View Related
Jul 23, 2005
Hi,I have a few create table statements which create temporary tablesthat has row definitions which exceeds the 8060 size limit, this causesa warning message being generated (Message 1708).Is there a way I can disable/avoid the warning message from beingprinted ?Thanks,joe
View 2 Replies
View Related