SQL Server - Capture Bulk Insert Duplicate Rowcount
Asked By Jeff Carrington
09-Mar-10 12:50 PM
SQL Server 2008 Std, SP1, Windows 2008
I am using bulk insert to load a large amount of data into my database. The
tables have a primary key with the ignore duplicate values turned on.
Everything works just fine, but I would like to track the number of rows from
the input file that do NOT get loaded due to a duplicate value. Does anyone
know of a way to capture this?
Much thanx for any help with this...
--
Jeff Carrington
DBA
comScore Inc.
SQL Server 2008
(1)
Openrowset
(1)
Bulk
(1)
Database
(1)
ComScore
(1)
Windows
(1)
Dups
(1)
Day
(1)
Jeff Carrington replied...
Erland,
Thanx for the response. I can see how that would be a way for me to get
the information I need. However that would require me to read the input file
twice (once with the openrowset and then once for the bulk insert) and then
compare it against the table I am going to load into for duplicates. With
the bulk insert command the loading and finding up dups is done at once. I
was hoping to only have to run the one bulk insert and some how get the
duplicate count from that. I have several thousand files to load over the
course of a one day period and adding any extra time to the load process will
cause major deadline issues.
Jeff
--
Jeff Carrington
MSDE on Windows 2003 R2 box, new DL385G6 - Install Fails during SQL Services SQL Server I have been finding that I am having trouble with the Crystal Reports Server XI installation failing when it is dealing with SQL. So, as a thought and in case there was something wrong with my SQL portion of the isntall. I thought ok, I will try installing the actual MSDE application direct from Microsoft. So, I downloaded the MSDE for SQL 2000 (which is msde2000a.exe), set my switches and off to the races. It quit seconds left to the installation and bombed with the same errors as the Crystal Reports Server install. The error is the same whether I try to install MSDE by itself or
SQL Express: Failed Reinstall SQL Server Dear Setup Experts: I am trying to reinstall SQL Express after playing with it some. I uninstalled it, and now, it refuses to reinstall in the face. Any ideas what this log file means and how I can get SQL Express installed? I really do not want to have to reinstall my whole system. * ** ** Start of Log File Overall summary: Final result: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup. Exit code (Decimal): -2068643839 Exit facility code: 1203
SQL Express Installation Failed on New Windows XP Home SQL Server Hello: I installed SQL Express on my system. I uninstalled and reinstalled it a few times. Eventually, this hosed my system to some extent, and SQL Express would not install. I just had Windows XP Home reinstalled. I have reinstalled the software that I use. Yesterday, I tried to install SQL Express for the first time on this new installation. It failed with Wait on the Database Engine recovery handle failed. This is worse than before. At least I was able to backed up the entire partition, so I restored it. I am about to try installing SQL Express again today. What should I be considering first? (I am rather badly bitten / gunshy
SQLServer Error: 802, 701, 733 SQL Server SQL Server 2008 on Win2008 R2 x64 Server, 8 GB RAM - running virtualized on VMWare ES-Server Every sunday some maintainance jobs are scheduled to run. Rebuilding indices and statistics fail with There is insufficient memory available in the buffer pool. [SQLSTATE 42000] (SaveAllSchedules) After this the server is no longer reachable: [298] SQLServer Error: 773, SQL Server Network Interfaces: The requested security
Moving database decrease performance SQL Server I have moved database from one SQL2000 on win server to another standalone computer. Both SQL serverers have the same settings, same service pack, enterprise editions. On both SQL servers are tempDB, log file and mdf file on separate disks. The new SQL server is on better computer, has more RAM, beter disks, stronger proc, but all queries