Insufficient Memory To Continue
Nov 27, 2001
I am running a .sql file containing a large number of delete and insert statements, using isql from the command line. After 2 minutes I get a message "Insufficient memory to continue", same statements if I cut and paste in SQL server query analyzer I do not get this message. On looking at the
task manager, it shows a lot of available memory.
Any clues
Thanks in advance
View 1 Replies
ADVERTISEMENT
Nov 24, 2007
I have scheduled a SSIS package to run repeatedly by creating a scheduled SQL job that runs every minute . After every hour the packgae fails with the following error
Description: System.OutOfMemoryException: Insufficient memory to continue the execution of the program. at Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSCustomProperty90.get_Value() at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.CreateUserComponent() End Erro
The strange thing is that if i right click on SQL JOb and run it...it works fine.
Did anyone encounter similar problem or know the solution of the above problem ?
Thanks....
View 1 Replies
View Related
Feb 7, 2008
Hi
I'm using VS'08, developing in VB.NET, using an SQL'05 DB and a local sync DB (3.5)
When attempting to append a record to the SQL CE DB's local sync'd table I get the error <<Insufficient memory to continue the execution of the program>>, the same record gets appended to the SQL'05 DB without error.
Ideas?
David L.
View 13 Replies
View Related
May 24, 2008
Hi,
Received the error message below when we trying to execute an sql file which has insert statments and size of the file is 111mb. Environment - SQL Server 2005 - windows 2003.
Error Message - Insufficient Memory to continue the execution of the program. (mscorlib)
There is any resolution ?. Please advice.
Thanks
GuessMN
View 2 Replies
View Related
May 12, 2006
When attempting to save an SSIS package in Visual Studion I receive the following error message detailed below. If I attempt to "Save As" to another location, I then receive an insufficient storage error. The development machine has over 1.5 GB of available physical memory and several GB of disk space availabe to save my 16 MB package. I have checked the event log and have found no related messages in the Application or Server logs.
Any suggestions on how to determine the cause or resolution of this error message would be greatly appreciated.
Failure saving package. (Microsoft Visual Studio)
Insufficient memory to continue the execution of the program. (Microsoft.SqlServer.ManagedDTS)
Advanced Error Message Details
Failure saving package. (Microsoft Visual Studio)
------------------------------
Program Location:
at Microsoft.DataTransformationServices.Design.Serialization.DtrDesignerSerializer.SerializePackage(IDesignerSerializationManager manager, Package package, TextWriter textWriter)
at Microsoft.DataTransformationServices.Design.Serialization.DtrDesignerSerializer.SerializeComponent(IDesignerSerializationManager manager, IComponent component, Object serializationStream)
at Microsoft.DataWarehouse.Serialization.DesignerComponentSerializer.Serialize(IDesignerSerializationManager manager, Object value)
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseDesignerLoader.Serialize()
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.BaseDesignerLoader.Flush(Boolean forceful)
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.BaseDesignerLoader.Flush()
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseContainerManager.OnBeforeSave(UInt32 docCookie)
===================================
Insufficient memory to continue the execution of the program. (Microsoft.SqlServer.ManagedDTS)
------------------------------
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Package.SaveToXML(String& packageXml, IDTSEvents events)
at Microsoft.DataTransformationServices.Design.Serialization.DtrDesignerSerializer.SerializePackage(IDesignerSerializationManager manager, Package package, TextWriter textWriter)
View 3 Replies
View Related
Dec 28, 2004
Hi,
On the last Sunday 26/12/04 on 20:00 I got on one of our applications in the customer site this error:
"There is insufficient system memory to run this query."
Details:
Computer: IBM XSERIES_345, dual CPU 2.8 Intel xeo, 1,047,952 KB ram, windows 2000 server sp4.
Disk space: 4395 MB, Virtual memory: initial size 1536 MB, Max size 3072 MB. Registry size: current 14 MB, Max 90 MB.
SQL Server 2000 SP 3, two production databases (1) Data size 100 MB, log size 15 MB (2) Data size 500 MB, log size 125 MB
All the memory options are configured as default i.e. dynamically configure for memory and not changes in any sp_configure options.
SQL server is the only major application running on the machine.
Facts:
On that evening the I've checked the Task Manager and found that SQL Server use 500 MB in Mem Usage and 1200 MB in VM size.
In the query analyzer I execute the select query which results the "…insufficient system memory…" error on both databases and on the one with more data it failed with this error, but on the other database it completed successfully.
I restart SQL Server service to solve it, and as for today 28/12/04 at 08:00 it use 590 MB in Mem Usage and 590 MB in VM size.
I have checked the system with Performance monitor and didn't find any problems I use the Memory: Pages/sec, Memory: Available Bytes, Physical Disk: % Disk Time, Processor: % Processor Time, SQL Server Buffer: Buffer Cache Hit Ratio.
We have 8 user connections for one of the database and 16 for the other one.
Our system runs with this configuration for 2 months, I backup the databases FULL, DIFF and LOG backup.
It's not real time system, and the load on the SQL is medium, but we use bad queries as update for all fields in one query (please don't ask…)
I know that SQL server is greedy with the memory and released memory only if other process needs it.
Any ideas why it happens?
Thanks,
Yaniv
View 2 Replies
View Related
May 25, 2001
Hi,
I get the following error Error: 17803, Severity: 17, State: 17
Insufficient memory available.Source ODS. When I have lot of scheduled jobs are running during the night. Does anyone know why this happens and how it can be fixed. Let me know.
Thanks
View 1 Replies
View Related
Apr 14, 2000
About once a week I'm receiving this message in the Sqlserver Log from ODS
Error 17803,Severity: 17, State: 14
Insufficient Memory Available
The machine has 1 gig of RAM and is dedicated to sqlserver7 with sp1. Any ideas of what might be causing this problem? Any help is greatly appreciated.
Chris
View 5 Replies
View Related
Apr 26, 2001
I have a dedicated SQL 2000 on Windows 2K with over 7GB memory, SQL memory configuration is dynamic. This is a new server and doesn't have much processes yet. This morning, SQL logs recorded the error 'insufficient memory available, error 17803, severity 20, state 17'. Does anyone have any clue what could be the cause?
Thanks in advance.
View 1 Replies
View Related
Nov 8, 2006
Hi All,
Greetings,
Sql Server 7, SP 3
OS: Win NT
Every day i am facing problem with Memory.
I get the below in SQL server Logs
"Insufficient memory available..
Error: 17803, Severity: 17, State: 17"
Please suggest How to solve it.
Thanks in Advance
Adil
View 2 Replies
View Related
Nov 3, 1998
Here's the deal.....
I was converting a lot of MS Access records to SQL Server (almost 500,000)
and about midway through I got the old MSACCESS.EXE Not Responding. A few
more times through this and SQL Server informed me that I was running out
of locks. I upped the locks from 5000 to 20000, and retried it. I am now
getting errors like "There is insufficient system memory to run this
query". I receive this when I attempt to look at tables, devices, etc. In
SQL Enterprise Manager. I am also not able to run the sp_configure command
or choose configure by right-clicking on the server in Ent. Mgr. I am
running SQL Server 6.5, SP4, on a dual P200 with 256MB RAM. Any help would be
incredibly great.
Rob
View 2 Replies
View Related
Oct 25, 2005
My company has a database that is throwing a weird error. We've tried reinstalling both the OS and the SQL instance, and the error still persists. We think this error might have to do with some .NET code we've written to run on the box, but I cannot find anything out on the internet about it. Here is the Enterprise Manager Error Log:
Insufficient memory available..
Error: 17803, Severity: 20, State: 4
Query Memory Manager: Grants=0 Waiting=0 Maximum=97638 Available=97638
Global Memory Objects: Resource=912 Locks=42
SQLCache=67 Replication=2
LockBytes=2 ServerGlobal=20
Xact=12
Dynamic Memory Manager: Stolen=2138 OS Reserved=1048
OS Committed=1026
OS In Use=1022
Query Plan=1777 Optimizer=0
General=1066
Utilities=12 Connection=262
Procedure Cache: TotalProcs=488 TotalPages=1787 InUsePages=542
Buffer Counts: Commited=5168 Target=131072 Hashed=1917
InternalReservation=191 ExternalReservation=0 Min Free=128 Visible= 131072
Buffer Distribution: Stolen=351 Free=1113 Procedures=1787
Inram=0 Dirty=599 Kept=0
I/O=0, Latched=23, Other=1295
WARNING: Failed to reserve contiguous memory of Size= 65536.
I can find information if I do a Google search on "Error: 17803, Severity: 20" But as soon as I add "State: 4" to the query I get no results. Also, the articles that I have seen that give the same error messages (but different states) tend to deal with servers that have more than 4GB of memory. This server has ONLY 4GB of memory and in order to try and resolve this issue, we have limited the server to 1GB of physical memory to no avail.
Any help would be appreciated. Thanks!
View 3 Replies
View Related
Feb 20, 2004
When I execute the very long query(in the attached), I got an insufficient memory error, Please help me check. Thanks in advance.
View 1 Replies
View Related
Feb 13, 2007
We are hitting a crippling 701 "insufficient System Memory" error intermittently in out production environment. I haven’t gotten anywhere with PSS in two weeks. The error has occurred 4 times over the past two weeks, crippling our SQL server and application each time. When the error occurs it lasts for 5 to 20 minutes, causing the app to time out, refusing new connections, and a massive slow-down of anything that is running. SQL has recovered on its own two of these times. It recovered following a Kill of hundreds of threads reporting “SEMAPHORE WAIT�. The most recent occurrence nailed all 16 processors at 100%. We were forced to issue shutdown with nowait. I have been monitoring Perfmon very closely; there are no symptoms that precede the error. Each occurrence captures a different query. Any of the queries, when run from Management Studio, complete in under a second. DBCC MEMORY STATUS reports all memory as being in an unstressed state. The first time the error occurred there were 10 GB still available on the server.
Has anyone else experienced this problem or anything similar? We don’t use linked servers or table valued functions (there are known memory bugs related to each of these items)
The following server and configuration has been running in production for 6 weeks with no issues:
.SQL 2005 EE SP1 Post SP1 Hotfix kb918222
.Win 2003 SP1 (dedicated box)
.Quad Dual Core 3GHz
.32 GB memory
.AWE enabled
.No memory related flags in boot.ini
."Lock Pages in memory" set for SQL Startup account
.1 Instance (default)
.1,994 OLTP databases avg less than 100MB each
.1,200 active user threads on average (from connection pool of avg 4,000 concurent users)
Any comments would be appraciated
View 7 Replies
View Related
Jan 18, 2008
We have an application running on a SQL cluster (Win 2003) and SQL 2005 SP2 within it's own instance - 12 total databases and about 100G of data total. The node this instance is on has 64G of RAM with 16 allocated to this instance (only 8G allocated to other instances currently).
Now to the problem there is one process that when running we get the error below and we cannot figure how to correct this - the process runs 8 times a day and has been running great and then all of a sudden stopped running with the memory error. I am in search of any tips to diagnose or correct this issue
[298] SQLServer Error: 701, There is insufficient system memory to run this query. [SQLSTATE 42000]
Thanks in Advance
View 2 Replies
View Related
Jul 23, 2005
We seem to have developed a memory leak in our sql server applicationand are getting the above error on occasion. Also, over several hoursof hard usage the memory consumed by the sql server ramps up and isnever released. The only thing we have found to remedy the problem isto stop/start sql server.My question to the group is, how can I debug this problem? Are theresystem stored procedures that would be useful in indentifying any temptables, cursors, etc, not getting cleaned up?Thanks,John
View 2 Replies
View Related
Nov 28, 2006
Just wondering if anyone else has seen any memory issues with cross instance communication. Just this last week we moved from single instance to cross instance communication. I started up a process that will move 3,000,000 messages through service broker, but after a couple of hours the server tanks out and we get insufficient system memory errors in the sql error log. If no one else has seen or experienced this then I'll probably get a ticket opened to see what it may be. It's just that the change in our service broker network was the only change I was aware of on this instance.
Regards.
View 4 Replies
View Related
Aug 31, 2007
This morning the server became unresponsive and we had to stop and restart the services. The log showed the dreaded 17803 "Insufficient memory available" error. Server has 4gig of O/S memory and 4 processors. Searching on this suggests this is really an internal error and not something we can do much about. Is that true? What should be my next step?
Thanks!
2007-08-20 21:04:47.89 server Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
.
.
.
2007-08-31 10:48:09.51 spid2 LazyWriter: warning, no free buffers found.
2007-08-31 10:48:09.51 spid2 Buffer Distribution: Stolen=243524 Free=0 Procedures=6
Inram=0 Dirty=60 Kept=0
I/O=0, Latched=98, Other=0
2007-08-31 10:48:09.51 spid2 Buffer Counts: Commited=243688 Target=243688 Hashed=158
InternalReservation=254 ExternalReservation=42 Min Free=512 Visible= 243688
2007-08-31 10:48:09.51 spid2 Procedure Cache: TotalProcs=4 TotalPages=6 InUsePages=6
2007-08-31 10:48:09.51 spid2 Dynamic Memory Manager: Stolen=243474 OS Reserved=1112
OS Committed=1090
OS In Use=1042
Query Plan=524 Optimizer=240444
General=2750
Utilities=143 Connection=489
2007-08-31 10:48:09.51 spid2 Global Memory Objects: Resource=1217 Locks=94
SQLCache=44 Replication=2
LockBytes=2 ServerGlobal=25
Xact=48
2007-08-31 10:48:09.51 spid2 Query Memory Manager: Grants=1 Waiting=0 Maximum=9793 Available=9695
2007-08-31 10:48:27.41 spid64 Error: 17803, Severity: 20, State: 8
2007-08-31 10:48:27.41 spid64 Insufficient memory available..
2007-08-31 10:48:39.51 spid2 LazyWriter: warning, no free buffers found.
2007-08-31 10:48:39.52 spid2 Buffer Distribution: Stolen=243522 Free=0 Procedures=6
Inram=0 Dirty=60 Kept=0
I/O=0, Latched=100, Other=0
View 3 Replies
View Related
Jan 28, 2004
Help,
Getting this error msg when running a bulk insert.
Bulk insert was working fine before and all of a sudden getting this.
Any Ideas?
View 8 Replies
View Related
Oct 26, 2007
Hi There
Ok i am a bit stumped by this one.
I have an instance of sql server 2005 Enterprise Edition 9.0.3152.
The server has 32 Gigs of RAM. Sql Server is AWE enabled and is configured to use 14Gigs MAX memory (it is in a cluster so it is configured so that way for fail over).
When i perform the following command on a 1.9 Gig database on the server:
dbcc checkdb('CLMS', NOINDEX)WITH NO_INFOMSGS
I get the following error message:
Msg 701, Level 17, State 123, Line 1
There is insufficient system memory to run this query.
I am stumped i can see the server has 17 Gigs of available memory.
After this i perform the folloing query :
dbcc checkdb('OLTP1PRO', NOINDEX)WITH NO_INFOMSGS
This database is 140 Gigs and checdb works no problem.
What the hell is going on ? I have never received this error before with CHECKDB, and it is ahppening on the smallest database on the instance while the exact same checdb works fine for all the other larger db's on the instance ?
Please help.
Thanx
View 4 Replies
View Related
Sep 19, 2007
HI,
We have got this error on a server after a reboot, now i can appreciate that the server went into recovery after a shutdown cos of services still doing stuff when the shutdown occured.. and this worked
the machine has 4 gig of mem and as you can see from log 4 cpu...we are running sql server 2000 sp4
log file from errorlog..any ideas
2007-09-17 10:21:20.39 server Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
2007-09-17 10:21:20.39 server Copyright (C) 1988-2002 Microsoft Corporation.
2007-09-17 10:21:20.39 server All rights reserved.
2007-09-17 10:21:20.39 server Server Process ID is 2036.
2007-09-17 10:21:20.39 server Logging SQL Server messages in file 'D:Microsoft SQL ServerMSSQLlogERRORLOG'.
2007-09-17 10:21:20.45 server SQL Server is starting at priority class 'normal'(4 CPUs detected).
2007-09-17 10:21:20.60 server SQL Server configured for thread mode processing.
2007-09-17 10:21:20.64 server Using dynamic lock allocation. [2500] Lock Blocks, [5000] Lock Owner Blocks.
2007-09-17 10:21:21.01 server Attempting to initialize Distributed Transaction Coordinator.
2007-09-17 10:21:23.18 spid3 Starting up database 'master'.
2007-09-17 10:21:23.73 spid3 0 transactions rolled back in database 'master' (1).
2007-09-17 10:21:23.73 spid3 Recovery is checkpointing database 'master' (1)
2007-09-17 10:21:23.81 server Using 'SSNETLIB.DLL' version '8.0.2039'.
2007-09-17 10:21:23.81 spid5 Starting up database 'model'.
2007-09-17 10:21:23.82 server SQL server listening on 128.1.100.121: 1433.
2007-09-17 10:21:23.82 server SQL server listening on 127.0.0.1: 1433.
2007-09-17 10:21:23.85 spid3 Server name is 'LDS-SSQL1'.
2007-09-17 10:21:23.85 spid8 Starting up database 'msdb'.
2007-09-17 10:21:23.85 spid10 Starting up database 'Sample_1'.
2007-09-17 10:21:23.85 spid9 Starting up database 'C8DM_Catalogs_RnD'.
2007-09-17 10:21:23.90 server SQL server listening on TCP, Shared Memory, Named Pipes.
2007-09-17 10:21:23.90 server SQL Server is ready for client connections
2007-09-17 10:21:23.90 spid11 Starting up database 'c8content'.
2007-09-17 10:21:23.90 spid12 Starting up database 'DataWarehouse'.
2007-09-17 10:21:23.90 spid13 Starting up database 'C8DM_Catalogs'.
2007-09-17 10:21:23.93 spid14 Starting up database 'DW_DS'.
2007-09-17 10:21:24.01 spid5 1 transactions rolled forward in database 'model' (3).
2007-09-17 10:21:24.04 spid5 0 transactions rolled back in database 'model' (3).
2007-09-17 10:21:24.04 spid5 Recovery is checkpointing database 'model' (3)
2007-09-17 10:21:24.18 spid5 Clearing tempdb database.
2007-09-17 10:21:24.28 spid13 113 transactions rolled forward in database 'C8DM_Catalogs' (9).
2007-09-17 10:21:24.37 spid8 199 transactions rolled forward in database 'msdb' (4).
2007-09-17 10:21:24.37 spid10 64 transactions rolled forward in database 'Sample_1' (6).
2007-09-17 10:21:24.39 spid10 0 transactions rolled back in database 'Sample_1' (6).
2007-09-17 10:21:24.42 spid13 0 transactions rolled back in database 'C8DM_Catalogs' (9).
2007-09-17 10:21:24.45 spid10 Recovery is checkpointing database 'Sample_1' (6)
2007-09-17 10:21:24.48 spid13 Recovery is checkpointing database 'C8DM_Catalogs' (9)
2007-09-17 10:21:24.49 spid9 49 transactions rolled forward in database 'C8DM_Catalogs_RnD' (5).
2007-09-17 10:21:24.51 spid9 0 transactions rolled back in database 'C8DM_Catalogs_RnD' (5).
2007-09-17 10:21:24.53 spid9 Recovery is checkpointing database 'C8DM_Catalogs_RnD' (5)
2007-09-17 10:21:24.59 spid5 Starting up database 'tempdb'.
2007-09-17 10:21:24.60 spid8 0 transactions rolled back in database 'msdb' (4).
2007-09-17 10:21:24.64 spid8 Recovery is checkpointing database 'msdb' (4)
2007-09-17 10:21:27.60 spid12 Analysis of database 'DataWarehouse' (8) is 8% complete (approximately 4 more seconds)
2007-09-17 10:21:28.12 spid14 Analysis of database 'DW_DS' (10) is 100% complete (approximately 0 more seconds)
2007-09-17 10:21:31.09 spid14 31 transactions rolled forward in database 'DW_DS' (10).
2007-09-17 10:21:31.10 spid14 0 transactions rolled back in database 'DW_DS' (10).
2007-09-17 10:21:31.14 spid14 Recovery is checkpointing database 'DW_DS' (10)
2007-09-17 10:21:36.00 spid12 Analysis of database 'DataWarehouse' (8) is 100% complete (approximately 0 more seconds)
2007-09-17 10:21:36.01 spid12 Recovery of database 'DataWarehouse' (8) is 0% complete (approximately 54 more seconds) (Phase 2 of 3).
2007-09-17 10:21:36.98 spid12 Recovery of database 'DataWarehouse' (8) is 9% complete (approximately 9 more seconds) (Phase 2 of 3).
2007-09-17 10:21:41.78 spid12 Recovery of database 'DataWarehouse' (8) is 56% complete (approximately 3 more seconds) (Phase 2 of 3).
2007-09-17 10:21:47.92 spid12 Recovery of database 'DataWarehouse' (8) is 100% complete (approximately 0 more seconds) (Phase 2 of 3).
2007-09-17 10:21:47.92 spid12 25 transactions rolled forward in database 'DataWarehouse' (8).
2007-09-17 10:21:48.10 spid12 0 transactions rolled back in database 'DataWarehouse' (8).
2007-09-17 10:21:48.20 spid12 Recovery is checkpointing database 'DataWarehouse' (8)
2007-09-17 10:21:48.37 spid3 Recovery complete.
2007-09-17 10:21:48.37 spid3 SQL global counter collection task is created.
2007-09-17 10:21:49.95 spid51 Using 'xpsqlbot.dll' version '2000.80.2039' to execute extended stored procedure 'xp_qv'.
2007-09-17 10:22:33.24 spid53 Using 'xpstar.dll' version '2000.80.2039' to execute extended stored procedure 'xp_sqlagent_monitor'.
2007-09-17 10:23:55.17 spid58 Error: 17803, Severity: 20, State: 12
2007-09-17 10:23:55.17 spid58 Insufficient memory available..
View 1 Replies
View Related
May 31, 2001
A series of export/import jobs are scheduled on a dozen databases sitting on one of our servers, and are run at regular intervals through the day. Some of the jobs are failing with the following error recorded in the 'View Job History..':
EXCEPTION: Insufficient memory for this operation. Process Exit Code 2. The step failed.
Will this be cured by increasing the memory available to SQL Server (it has 512Mb already, 1/2 of the total physical RAM)? Also, why are only some jobs failing and others completing? Should I run performance monitor when the next schedule is?
Thanks
Derek
View 1 Replies
View Related
Jan 13, 2004
We're experiencing the following problem on our servers:
Server: Msg 701, Level 17, State 1, Line 3
There is insufficient system memory to run this query.
I've been able to fix the problem by a)Lowering the Max Server Memory and b)Minimum Query Memory.
However, Microsoft state there is a hot fix available for this issue at in KB Article 817262 (
http://support.microsoft.com/default.aspx?scid=kb;en-us;817262&Product=sql2k).
Any idea how one is supposed to contact Microsoft to get this fix without paying?
Thanks,
Nick
View 3 Replies
View Related
Jan 31, 2006
Hello,
We receive this error after running a complex query. Could someone please shed some light on what this means exactly?
One of our developer said we needed to purchase a server with more memory, but would SQL Server not simply just run slower by using virtual memory instead of physical RAM?
I know there is a limit and servers must be upgraded as the processing requirements increase, due to data set size increases for example, but we have just been told to "purchase more power because after a while as you process more rows, SQL Server will require more resources"
Any comments on this would be really appreciated.
View 6 Replies
View Related
May 7, 2007
When I compile or save a SSiS package in the SQL Server Business Intelligence Development Studio I get the error
Failure saving package. (Microsoft Visual Studio)
Insufficient memory to continue the execution of the program.
Sometimes, if I wait longer time, the package can suddenly be saved.
I have 2 GB of RAM und over 15 GB of free space on my disk. Thus, there should be anough space to save the package.
What should I do to resolve this problem? It seems to be a bug.
To splitt the package would not be a solution.
View 1 Replies
View Related
Feb 20, 2008
I'm looking for a sanity check. Service broker and Event Notifications are new to me, so it is possible I'm either abusing or incorrectly using the technology. I'm experimenting with using Event Notifications and Server Broker to log error messages. The process works pretty well as long as I don't do something stupid such as stressing the process by calling raiserror in a loop of a 100000 - twice. It processed for a while, but eventual either SQL Server terminates (sev 25) or I had to force the SQL service to stop by killing it's process via task manager. I could not connect to SQL Server or stop the service normally.
I have several general questions. I think they are good questions. Any thoughts or suggestions would be appreciated.
1) I'm looking into generating deadlock and blocking email alerts. It appears that Event Notification is the way to go since there are very few events and I can respond to the event with an email. Is there a better method to automate blocking and deadlock email alerts that include event details?
2) If I wanted to retain some history of errors for the developers, should Event Notifications be avoided if a high number of errors can be generated by a badly formed T-SQL? Avoid TRC_ERRORS_AND_WARNINGS and USER_ERROR_MESSAGE? (I could tell the developers not to be stupid, but why would that stop them if it does not stop me?)
3) Is there a way to efficiently filter a Event Notification from entering the queue before the Receive statement is called? I get some events that I throw away after receiving them. For example, perhaps I want all events from all non-system databases without having to add a notification for each single non-system database. Or I want all errors with severity 11-17 only?
4) Is there a trick to filter out events from the procedure activated by the event. I tried using raiserror to debug a procedure without thinking. The result was that the queue never was empty because the processing produced more events to process. As a result, I don't use raiserror and use a try-catch to avoid raising errors in the procedure activated.
5) I can receive one message at a time using local variables or receive a batch of messages using a local table. Is a small batch the best way even if there is memory pressure?
6) In the activated procedure I continue processing in a loop until there are no more messages. This seems to be the most efficient. Is this always the case? Should I exit the procedure after a set number (large) of messages have been received? The procedure would activate again to continue processing?
7) Is there any point to using the MAX_QUEUE_READERS setting when processing event notifications? Should it be 1?
8) I currently get the next conversation group id and process its messages within a transaction. Is this a bad idea with event notifications? Should I just call Receive and get the next batch? I don't really care if I lose some messages if things are going badly. Should I avoid wrapping the receive in a transaction?
9) I could run a trace that starts with SQL Server; however, I think my only choice is to log to a file. Is there a way to trace to a table using SQLTrace without running profiler? I would like to automate the process and have the data in a table so that it can be easily queried and parsed for each database/team.
10) Is there a way to fix my process and handle 100000 messages a minute? Is there a way to skip messages when it gets to busy? Can the query generating the messages get throttled - perhaps along with the query designer - before the server gets into trouble? Query the memory used by a queue and drop/create the queue with a delay if there is an issue?
I'm using a single CPU test machine with only 1 GB and 2 GB pagefile and a single disk. OS: Windows 2003 R2 SP2. SQL: 9.0.3054 and on 9.0.3228 (update package 6 just came out today). I could add memory, but I think that would just permit me to queue more message before running into trouble.
I'll add code shortly - length limit.
View 18 Replies
View Related
Jul 7, 2015
My Integrity job started failing recently with the following error. Msg 701, Level 17, State 123, Line 1 There is insufficient system memory in resource pool 'default' to run this query. Process Exit Code 1. The step failed.
select @@ version
Microsoft SQL Server 2008 R2 (SP2) - 10.50.4033.0 (X64)
 Jul 9 2014 16:04:25
 Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
System is having 4GB RAM and SQL is using most of it. It has 2 processors.
View 8 Replies
View Related
Aug 4, 2015
How to fix this SQL error event logg 17204 and 17207 ?
View 8 Replies
View Related
Aug 25, 2006
Hi all,
I need a bit of assistance with a piece of code I have written. I keep receiving a Syntax error "Incorrect syntax near END". The procedure is ~1000 line of code so I have just cut and paste the "problem" sql here and attached the full code to this message to see if anyone can help me out. Cheers :beer:
-- BEGIN CODE
IF @NoOfChildren > 0
BEGIN
DECLARE @childNo AS INTEGER
DECLARE @SQL AS VARCHAR(8000)
SET @childNo = 1
WHILE @childNo != @NoOfChildren
BEGIN
-- Perform Dynamic SQL check for children
SET @SQL = 'IF @strChild'+ @childNo + 'Surname IS NOT NULL
BEGIN
SET @asciicounter = 1
SET @asciifound = 0
WHILE @asciicounter != 255
BEGIN
IF CHARINDEX(char(@asciicounter),@strChild'+ @childNo +'Surname) != 0
BEGIN
IF @asciicounter NOT IN (32,45,46)
BEGIN
SET @asciifound = 1
END
END
SET @asciicounter = @asciicounter + 1
CONTINUE
END
IF @asciifound = 1
BEGIN
SET @strErrorBucket = @strErrorBucket + ''''45'''',''
END
END'
EXECUTE @SQL
SET @SQL = ''
-- Perform Dynamic SQL check for Forename
SET @SQL = 'IF @strChild'+ @childNo + 'Forename IS NOT NULL
BEGIN
SET @asciicounter = 1
SET @asciifound = 0
WHILE @asciicounter != 255
BEGIN
IF CHARINDEX(char(@asciicounter),@strChild'+ @childNo +'Forename) != 0
BEGIN
IF @asciicounter NOT IN (32,45,46)
BEGIN
SET @asciifound = 1
END
END
SET @asciicounter = @asciicounter + 1
CONTINUE
END
IF @asciifound = 1
BEGIN
SET @strErrorBucket = @strErrorBucket + ''''46'''',''
END
END'
EXECUTE @SQL
SET @SQL = ''
-- Perform Dynamic SQL check on DOB
SET @SQL = 'IF @dtChild'+@childNo+'Dob IS NULL
BEGIN
SET @strErrorBucket = @strErrorBucket + ''''047'',''
END
IF ISDATE(@dtChild'+@childNo+'Dob) = 0
BEGIN
SET @strErrorBucket = @strErrorBucket + ''''048'',''
END
IF DATEDIFF(YEAR, @dtChild'+@childNo+'Dob, GETDATE()) NOT BETWEEN 0 AND 18
BEGIN
IF DATEDIFF(YEAR, @dtChild'+@childNo+'Dob, GETDATE()) > 18
BEGIN
SET @strErrorBucket = @strErrorBucket + ''''049'',''
END
ELSE
BEGIN
SET @strErrorBucket = @strErrorBucket + ''''050'',''
END'
EXECUTE @SQL
SET @SQL = ''
-- Perform dynamic SQL check on Gender
SET @SQL = 'IF @blnChild'+@childNo+'Gender IS NULL
BEGIN
SET @strErrorBucket = @strErrorBucket + ''''051'',''
END'
EXECUTE @SQL
SET @childNo = @childNo + 1
CONTINUE
END
-- END CODE
View 8 Replies
View Related
Jul 23, 2005
How can I cause my insert statement to skip over (without failing) rowswhere there's a primary key constraint violation?I've got a case where daily I insert >500k rows of daily data, wherethe data is date and time stamped. So, for example, I have an insertstatement with constraint: WHERE date >= '5/20/05' AND date <'5/21/05'. That takes care of one day's data (5/20).However, the next day's data (5/21) will still have some time stampsfrom the previous day. Therefore the statement needs to be somethinglike WHERE date >= '5/20/05' AND date <= '5/21/05'. The 5/20 data isalready loaded but I need to take the 5/21 data which just happens tocontain just a few rows of data marked 5/20 and insert it withoutgenerating a primary key error from all the other 5/20 rows that arealready inserted.-Dave
View 7 Replies
View Related
Nov 29, 2007
Will using continue cause an infinite loop in a cursor or will the cursor know to go to the next record?
Begin Tran
exec @rtn = spDoSomething
select @err = @@error
If @err <> 0
Begin
rollback
continue
End
Commit Tran
View 1 Replies
View Related
Apr 15, 2008
In my package i have to loop through files and load the data from files into a table.
but if a file has error i need to move it to a folder like errored and continue execution with other files.
View 2 Replies
View Related
Aug 27, 2007
I have an SSIS package that uses a for each loop to send an order confirmation e-mail. If it does not find an email I need the package to continue after the failure path. The package stops after the failure, but I need it to continue with the next iteration of the for each loop. How can I do this?
View 4 Replies
View Related