Everything That Will Cause A Queue To Shut Down
May 22, 2007
I have a queue that, after running fine for several days will mysteriously turn off. It doesn't seem to be related to a poison message because I can restart the queue and processing resumes just fine. What are all the scenarios that would cause a queue to turn itself off, so I can 1) take preemptive action to prevent it from happening in the first place and 2) respond appropriately when it occurs.
Also, how to properly setup and verify that the BROKER_QUEUE_DISABLED is working properly. This is the SQL that I have so far, but is there a more direct way to raise the event other than writing an activated stored procedure that rolls back 5 times?
CREATE QUEUE [EventNotificationsQueue];
GO
CREATE SERVICE [EventNotificationsService]
ON QUEUE [EventNotificationsQueue]
([http://schemas.microsoft.com/SQL/Notifications/PostEventNotification]);
GO
CREATE EVENT NOTIFICATION [QueueDisabled]
ON QUEUE [MyQueue]
FOR BROKER_QUEUE_DISABLED
TO SERVICE 'EventNotificationsService', 'MyDatabase';
GO
View 7 Replies
ADVERTISEMENT
Jan 11, 2006
Hello,
This is info that I am still not certain about and I just need to make sure, my gut feeling is correct:
A.
When a procedure is triggered upon reception of a message in a queue, what happens when the procedure fails and rolls back?
1. Message is left on the Queue.
2. is the worker procedure triggered again for the same message by the queue?
3. I am hoping the Queue keeps on triggering workers until it is empty.
My scenario is that my queue reader procedure only reads one message at a time, thus I do not loop to receive many messages.
B.
For my scenario messages are independent and ordering does not matter.
Thus I want to ensure my Queue reader procedures execute simultaneously. Is reading the Top message in one reader somehow blocking the queue for any other reader procedures? I.e. if I have BEGIN TRANSACTION when reading messages of the Queue, is that effectively going prevent many reader procedures working simultaneously. Again, I want to ensure that Service broker is effectively spawning procedures that work simultaneously.
Thank you very much for the time,
Lubomir
View 5 Replies
View Related
Sep 15, 2004
hi
can i shut down MSSQL Server whn any transaction is active?
View 3 Replies
View Related
Jan 27, 2006
Routinely when I use BIDS to work on a report design, I cannot close BIDS because I get a message box that says:
Microsoft Visual Studio cannot shut down because a modal dialog is active. Close the active dialog and try again.
Of course, there is no visible dialog open. I actually have to terminate the process from task manager.
I do not get this problem when using SSIS or SSAS. Only SSRS.
Any Ideas?
Thanks!
BobP
View 76 Replies
View Related
Jan 11, 2000
I have 2 DB on SQL Server 7, that are synchronized by a continuous transactional replication.
The tables have a primary key on an identity column. In order to avoid conflicts,
the identities have different seeds, and increment equal to 10.
When the server shuts unexpectedly, the current value for the
identity column goes out of sync, that is it assumes the greatest value inserted.
The workaround is to run DBCC checkident to correct the identity value.
Is it a bug? Did anyone run in the same problem?
TIA
Tania
View 2 Replies
View Related
Jan 26, 2005
Is there a way to tell who the guilty person is:
The process winlogon.exe has initiated the shutdown of computer DOCSITE01FDK on behalf of user NT AUTHORITYSYSTEM for the following reason: Application: Maintenance (Planned)
Reason Code: 0x84040001
Shutdown Type: shutdown
Comment:
It tell you that the source is user23. Is there a way to determine who shut down this server?
Thanks
View 4 Replies
View Related
Jun 13, 2007
Hi All,
I got a job which runs every day this T-SQL code:
BACKUP DATABASE [myDB] TO DISK = N'f:BACKUPSDailymyBKUP.bak' WITH NOINIT , NOUNLOAD , NAME = N'mybackup', NOSKIP , STATS = 10, NOFORMAT
It runs just fine but in append Mode (the default one); the bak file is being taped every night, so I would like to overwrite it, in order it not to become huge after a few time, but I can't seem to find a clear way to do this.
Any help or pointing would be appreciated!
Cheers,
Giovanni
View 2 Replies
View Related
Nov 26, 2007
Hello,
While tryign to edit the XML for the rdl , i am stuck it will not allow me to edit and i have to kill the devenv process and open vs again.
I looked through some of the threads and tried apply KB 936971 Hot Fix and I am running into the following error.
The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch."
Did any one come across this. Any assistance would be greatly appreciated
Thanks,
SqlNew
View 1 Replies
View Related
Jul 19, 2007
I understand using sp_procOption procedure we could set procedure for autoexecution every time an instance of SQL Server is started. I would like to find out if there is any way for me to run a procedure before server shuts down.
I am interested to collect statistical data from DMV before SQL Server is restarted due to DMV's transient nature. I am sure some of you would suggest having a job running that collects data from DMV's periodically. But ideally I would like to collect data only once for server uptime.
I would appreciate any suggestion.
Thanks,
Asaf
View 3 Replies
View Related
Nov 5, 2007
Hi,
I am running two jobs background using SQL agent. There was a power shut down and the two job i was running in back groung were cancelled leaving the below message
The job was stopped prior to completion by Shutdown Sequence 0.
Can any one tell me why this happened although I am running them in back ground.
I am not sure where the servers are located and if they are located in the same bulding .. do u think it is bcoz of tis power shut down only?
View 6 Replies
View Related
Oct 7, 2015
I know that there was huge tempdb usage and may be the disk was full but SQL server is not suppose to restart in this case.What could be the reason behind this? SQL server restarted and is currently up and running.We are using SQL server 2008 SP3
View 10 Replies
View Related
Mar 18, 2008
When I upload my website on to server I have the following error: Could not open new database 'edmer-kiem.qsh.es_b5711d30-4f2a-4151-a958-9f63adb9c1bf'. CREATE DATABASE is aborted.Cannot
attach the file
'H:HomeWebsqsh.esedmer-kiem_79170098-49d1-496b-b8ac-24e9f04837a4wwwApp_Dataedmer_kiem.mdf'
as database 'edmer-kiem.qsh.es_b5711d30-4f2a-4151-a958-9f63adb9c1bf'.File activation failure. The physical file name "C:Inetpubwwwrootedmer_kiemApp_Dataedmer_kiem_log.ldf" may be incorrect.The log cannot be rebuilt because the database was not cleanly shut down. I have searched forums but I could not solve it.. How can I shut down database on the server?Please help..
View 1 Replies
View Related
Nov 17, 2006
if i get this message one more time I am going to put my fist through my monitor
View 114 Replies
View Related
Aug 31, 2015
Is there a way to get access to the files on the shared drive from either of the nodes when the SQL Cluster is shut down?
It doesn't look like there is, but hoping there is some trick. I see how it can be done with a Windows Cluster but not a SQL Cluster.
View 4 Replies
View Related
Jan 22, 2008
I installed the hotfix available at support.microsoft.com/kb/936971 and even rebooted the server, but I am still getting the error. I am working on a Windows 2003 server with SQL Server 2005 (and reporting services). I am not trying to publish any reports using SSRS. I'm just working on designs and saving them. Any help for this at this point?
Leigh
View 1 Replies
View Related
Jul 9, 2006
Hi,
I have found that when I'm debugging a custom component in BIDS that I've created in another instance of Visual Studio, every time I rebuild the component I have to shutdown and restart BIDS and then reattach to the BIDS process. Which is pretty time consuming... And if I find a small error in my custom component when debugging then I don't seem to be allowed to make any changes to the code unless I stop debugging and go through the process above.
Am I missing something here? Or do I really have to manually go through these steps every time I want to change code in the component I'm debugging?
Can I automate the process with MSBuild or NAnt? If so, is there an example of this anywhere?
Thanks in advance,
Lawrie.
View 1 Replies
View Related
Jul 18, 2007
I have a requirement where once we create a new record in a table, we submit a query to fetch some data and save it in one of the columns of the newly created record. The main requirement is that the server where we fetch the data from can be down for sometime for regular maintenance and we do not want to loose the fetch query in that process. Is there a way we can implement this?
Thanks.
View 3 Replies
View Related
Nov 22, 2002
I have a table that I want to act as a queue.
It has no indexes and no key. Just one column.
Basically I want a stored procedure that will pull / return the first record off the queue (table) and delete it. I'd rather not use MSMQ for this.
There will be about 10 users trying to do this at the same time and will be trying to pull of about 15 times every second.
How can I do this and ensure that no two requests pull off the same row?
Thanks,
Kevin
View 1 Replies
View Related
Sep 28, 2006
Hi Folks,
I was testing my error handling and purposefully failed some messages. Automatic posion message detection kicked in and disabled my queue. I tried the following, one at a time to enable it again but it doesn't work:
ALTER QUEUE MigrationQueue WITH STATUS = ON;
ALTER QUEUE MigrationQueue WITH STATUS = ON, ACTIVATION (STATUS = ON);
I would have thought the first line would've worked but I get the following when trying to receive...
The service queue "MigrationQueue" is currently disabled.
Help.
View 6 Replies
View Related
Mar 14, 2007
Hello!
I am running a basic SSB queue setup (more or less the Hello World example)and running into the following error message:
Transaction (Process ID 120) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
At first, I thought it was because I had the Initiator and Target Services on the same Queue, but I get this error even when I separate the two Services onto two Queues. This happens when I run more than one Target application receiving messages from the Target Queue.
Does anybody have any idea what could be happening here? Am I not allowed to set up more than one receiver?
Thanks --
Robert
View 3 Replies
View Related
Oct 11, 2006
HI There
My activated proc is rolling back the transaction and putting the message abck on the queue infinately ?
Normally it disabled the queue after a few rollbacks, i can see in the sql log that it just keeps rolling back and re-activating thousands of times.
It only stops when i disable activation on the queue.
WHy is the queue not disabling ?
Thanx
View 3 Replies
View Related
Jul 28, 2006
Hi There
I have sent messages and they are all sitting in the transmission queue with a blank status, why is service broker not trying to send them ? They are no errors in the sql log. BOL says this is blank when it has not tried to send the message ? Service broker is definately activated in the database.
How do i force sql server to send anything in the transmission que ?
I have no idea what is wrong or where to check ?
Thanx
View 23 Replies
View Related
Aug 2, 2007
Running transactional replication, dedicated server for distributor. While performance in terms of latency is excellent (usually 1 sec, almost never higher than 4) the disk queue length on the distributor is extremely high (over 6 usually). Is this typical? On any other server I would be very concerned, but cpu and memory usage are excellent and as said, latency is good. what is recommended config for distributor? others see high queue length?
View 2 Replies
View Related
Apr 19, 2006
Hi,
I have created Queue with the following syntax. But it is not getting activated itself. What I have to do to get it activated itself, and what could be the frequency by default.
CREATE QUEUE NewCustomerQueue
WITH ACTIVATION
(PROCEDURE_NAME = prProcessNewCustomers,
STATUS = ON,
MAX_QUEUE_READERS = 1,
EXECUTE AS SELF)
GO
If I execute the prProcessNewCustomers procedure manually it is showing that the Queue has been activated. What change I have to make in the syntax to get it activated itself.
Actually I have two scenarios in my requirement,
1. One Queue processing immediately when it receives data (Order Processing)
2. Another Queue, Process when the server is idle i.e., off-peak time (for mailing)
What syntax I have to use for these.
Please help.
Thanks in advance
Babu
View 6 Replies
View Related
Feb 29, 2004
Howdy,
This is a follow on from a previous post
http://www.dbforums.com/t984271.html
And now I have found something interesting :
(1) When I was monitoring the SystemProcessor Queue locally ( Via a term server login onto the box ) I would see a queue of 3-4. If I monitor the same parameter from a remote PC, I see a Processor Queue of 1 - why?
The box had 1 GB RAM ( SQL used 500 MB and had 250 MB free according to Task manager ).
(2)
I have another almost identical box that has same CPU but twice ammount of RAM ( 2 GB ) but has SystemProcessor Queue of almost
0 - why?
All other parameters for Disk, IO etc are fine.
Cheers,
SG
View 2 Replies
View Related
Aug 14, 2007
avg disk queue length is 100%. Any ideas?
=============================
http://www.sqlserverstudy.com
View 2 Replies
View Related
Nov 8, 2007
Again one client with SAN EMC and again performace is several times worse then you can have with a cheap and primitive IDE drive... :(
Anyway, my question.
I am monitoring many parameters, including Avg Read Queue and Avg Write Queue.
So if I ReadQueue=3 and WriteQueue=7, what does it mean?
Scenario 1, there are 2 different Queues (R- read request, W - write request):
Windows --> Device
Read. Queue: R:R:R
Write Queue: W:W:W:W:W:W:W
Scenario 2:
Windows --> Device
Common Queue: W.R.W.W.R.W.W.R.W.W
In other words, if SQL server flushes writes (TRAN COMMIT or CHECKPOINT), generating hundreds or even thousands of write requests in few milliseconds, so Queue grows to 100-300 for a second or so, are read requests locked during that time?
View 1 Replies
View Related
Jul 20, 2005
I am trying to implement a very fast queue using SQL Server.The queue table will contain tens of millions of records.The problem I have is the more records completed, the the slower itgets. I don't want to remove data from the queue because I use thesame table to store results. The queue handles concurrent requests.The status field will contain the following values:0 = Waiting1 = Started2 = FinishedAny help would be greatly appreciated.Here is a simplified script to demonstrate what has been done.CREATE TABLE [dbo].[Queue] ([ID] [int] IDENTITY (1, 1) NOT NULL ,[JobID] [int] NOT NULL ,[Status] [tinyint] NOT NULL) ON [PRIMARY]GOCREATE INDEX [Status] ON [dbo].[Queue]([Status]) ON [PRIMARY]GOCREATE PROCEDURE dbo.NextItem@JobID integer,@ID integer outputASSELECT TOP 1 @ID = [ID]FROM Queue WITH (READPAST, XLOCK)WHERE (Status = 0) AND (JobID = @JobID)RETURNGO
View 6 Replies
View Related
Dec 7, 2007
Hi,
I created several queues on the default filegroup and I was wondering how can I change a queue filegroup?
Thanks,
Shai.
View 10 Replies
View Related
Oct 24, 2007
I am doing backup job using windows 2003 backup. I hv several scheduled backup job. And sometimes, when the first backup job not yet finish backing up, the second backup job will automatic starts at the set time resulting 2 backup jobs at 1 time. I need to know whether in SQL2000/2005, we can set the tsql command to do the job queue for the windows 2003 backup job, meaning if the 1st backup job is still ongoing, the 2nd backup job will hv to wait even though the set time for the job was already expired. When the 1st job done, then only the 2nd job started.
Appreciate the feedback..
tq
View 1 Replies
View Related
Sep 26, 2007
hi everybody,
i am working on a SSIS package that creates Multiple file from a table depending on a particular field.
now the requirement from the target system is i have send the files directly to the particular serverrs.
for that i have to post my files in msmq and then use some other technology to achieve this.
if anybody has some ideas on this it will be very helpful for me.
thanks in advance
srikanth
View 1 Replies
View Related
Feb 23, 2007
My normal scenario is tills sending live slaes to head office via service Broker queue. Sales are sent as soon as sale is made(normally tills on adsl lines), a loss of a Link to head office will still allow a sale to be made with the sale sitting in the transmission queue on the till but has not been commited at HO to adjust stock etc, until the link is back up. My worry is link goes down with several sales siting in the queue and then hardware failure. Is their a mechanism to backup the Transmission queue in the case of no link?
If you could back up the transmission queue at a till could i then take those messages and copy them into head offices queue for processing, this is in the case of my link to the till was down for a whole day but needed the daily sales from the shop,could i get the back up at end of the day and apply the messages at head office?
Any infomation on what would be the best way to recover from this event would be gratefully accepted.
any examples on a heartbeat to check the link status that is of very low cost between HO and tills bearing in mind HO needs to maintain status for large number of tills.
View 7 Replies
View Related
Jan 19, 2007
Hello,
I'm currently looking for a way to decently pauze the processing of messages by activation procedures. When I pauze the processing I want to be sure that the running activation procedures terminated.
I thought I could do this using ALTER QUEUE WITH ACTIVATION (STATUS = OFF) and sys.dm_broker_activated_tasks.
This is what I've tested: I set up one queue with an activation procedure attached to it that receives one message, then waits for one minute, then writes that message into a table. The queues max queue readers is set to 2. Now, I put 5 messages in the queue, 2 procs pop up in sys.dm_broker_activated_tasks. I run the alter queue statement shown above and check sys.dm_broker_activated_tasks again. It is empty so allegedly there are no tasks running. I check the table in which the messages are written by the activation procs and after some time I can see the results of both activation procedures which were according to sys.dm_broker_activated_tasks not running (but of course they were). The rest of the process works as expected, the procs reactivate upon reenabling the activation status and all is well.
Is there another way of checking the running activation procedures that checking sys.dm_broker_activated_tasks?
Is this intended behaviour or just a bug?
View 4 Replies
View Related