How To Find How Activation Has Failed

May 1, 2006

I have seen the posting on determining how activation has failed and looking through the system logs is very helpful in determining why activation is not occuring, however, short of looking through the SQL Server logs is there another way to get the same information? Access to the SQL Server logs is fairly restricted. Does anyone know another way that this can be done? I have used the execute as technique described in the article on "Troubleshooting Activation Stored Procedures" and found it helpful in some cases.

Gary

View 5 Replies


ADVERTISEMENT

Activation Proc Failed

Aug 17, 2006

Good day,

I have send a msg successful,but the proc failed. I altered the proc to correct the problem in the proc. The msg are still in the queue. Is there a manual way to excute the proc again to process the msg in the q? or do I wait for service broker to do it after a retry time (self recover)?

thank you in advance.





View 6 Replies View Related

Help Required To Find Out When A Cluster Has Failed Over.

Oct 1, 2001

I am writing a little systems monitoring application to send SMS
messages to my mobile phone. For example when disk space reaches a
certain maount my program will raise an alert that fires a VB app,
that sends a SMS message directly to my mobile.
We operate an active/active cluster (SQL7 NT4) and I want to be informed
when one of the clusters fails over.
I have managed to find out when the clusters are 'off-line' by reading
the 'PersistentState' variable from the registry as follows:

DECLARE @LIVE_REPonV1 varchar(8000)
EXEC master..xp_regread
@rootkey='HKEY_LOCAL_MACHINE',
@key='ClusterGroupsd42a2a2d-f6a5-11d4-a584-00508bdfa98a',
@value_name='PersistentState',
@value= @LIVE_REPonV1 OUTPUT
SELECT convert(varbinary,@LIVE_REPonV1)

this has a value of 0x01000000 for on-line and 0x00000000 for
off-line.

However, after scanning the registry I cannot find a registry variable
that resembles a 'failed-over' status.
Any help would be most appreciated.

View 1 Replies View Related

MSDE Installation - Failed To Find SqlUpgrade

Nov 11, 2005

I have been trying to install MSDE for a week. An appraisal program I need to set up uses it. I have been running changes and believe that I am close.

Section of setup log where it fails:
MSI (s) (28!C0) [13:16:30:812]: PROPERTY CHANGE: Adding SqlUpgradeProduct property. Its value is '{E09B48B5-E141-427A-AB0C-D3605127224A}'.
Failed to find available component set
MSI (s) (28!C0) [13:16:30:828]: PROPERTY CHANGE: Modifying SQLExitCode.2D02443E_7002_4C0B_ABC9_EAB2C064397B property. Its current value is '1603'. Its new value: '60007'.
Action ended 13:16:30: PickInstanceComponentSet.2D02443E_7002_4C0B_ABC9_E AB2C064397B. Return value 3.

I did not find anything different in a setup on a laptop that works. I'm unsure where to look.

will appreciate any help.

Thanks,

Jim

View 1 Replies View Related

Script To Find Out Login Failed For Which Database?

May 12, 2015

I know how to find out login failed users randomly, but I need to find out to which database these failed logins were associated with?

is there any script with which we can get the databases to which these failed logins are corresponding.

View 4 Replies View Related

Find Database For Which Tran Backup Failed As Attached

May 14, 2013

Tran Backup failed. How to find the database for which Tran Backup failed as attached?

View 2 Replies View Related

Failed To Find Or Load The Registered .Net Framework Data Provider.

Oct 28, 2007



Hi Everyone,

I've just finish re-installing VS.NET 2005 and tried the Walkthrough: Displaying Data in a Web Forms Page
I followed exactly as it is that is I tested the connection "Connection Sucessful", test Query "Successfull" but when i run it prompt me with the following error message:



-------------------------------------------------------------------------------------------------
Failed to find or load the registered .Net Framework Data Provider.

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

Exception Details: System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.

Source Error:







[No relevant source lines]

Source File: c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesw9f240aab3a2217cc8App_Web_cztxhfge.0.cs Line: 0

Stack Trace:







[ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.]
System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) +1374119
System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +109
System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactory() +63
System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactorySecure() +19
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +120
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6931
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) in c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesw9f240aab3a2217cc8App_Web_cztxhfge.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


------------------------------------------------


please help and point out what is the issue?
Thanks in advance for your help.

View 1 Replies View Related

DB Engine :: Error - Failed To Connect To IPC Port - System Cannot Find File Specified

Jun 2, 2008

In Management Studio i highlight my query and then click on 'Analyse query in Database Engine Advisor' but i get the following error message: "Failed to connect to an IPC Port: The system cannot find the file specified".  Seems like if I reboot my computer it works one time then get the same error on the second time.I'm running developer edition with service pack 2.

View 8 Replies View Related

Failed To Find Or Load The Registered .Net Framework Data Provider When Using SQL Server Compact Edition

Jul 3, 2007

Hello



I have recently downloaded Orcas beta VS product and had no previous version of VS before. The install went clean and I have been able to generate Window apps and web apps with very little issues; however, I have one issue with running a web app using the "view in browser" option for checking an aspx page for validity. If I use the default Northwind database provided and generate an aspx form using the "DataSet" toolbox widget, the tool prompts for the datasource etc. required to generate the required code. I can select the Northwind database and select the desired columns from one of the tables. Once completed, I build the project (clean build) and then select the "view in browser" option to verify the results. The result is an error page indicating a server error ->
Failed to find or load the registered .Net Framework Data Provider.

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

Exception Details: System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.



I created on odbc connection to an iSeries(as400) box and was successfull in displaying the table on the webpage! I looked into the web.config file and it appears that all the required XML data is present. Any help would be appreciated as I am fairly green when it comes the .NET world.



Thanks

View 5 Replies View Related

DTS Migration Wizard Failed To Save Package File -with Error 0x80070002 - Th System Cannot Find The File Specified.

Jan 31, 2007

Hi,

I use the DTS 2000 Migration Wizard to migrate one of the DTS 2000 packages to SSIS. The migration failed with the following error message:


LogID=17
#Time=6:31 PM
#Level=DTSMW_LOGLEVEL_ERR
#Source=Microsoft.SqlServer.Dts.MigrationWizard.Framework.Framework
#Message=Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: Failed to save package file "C:Documents and SettingsfuMy DocumentsVisual Studio 2005ProjectsKORTONKORTONProcessCubesMF.dtsx" with error 0x80070002 "The system cannot find the file specified.".
---> System.Runtime.InteropServices.COMException (0xC001100E): Failed to save package file "C:Documents and SettingsfuMy DocumentsVisual Studio 2005ProjectsKORTONKORTONProcessCubesMF.dtsx" with error 0x80070002 "The system cannot find the file specified.".

at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.SaveToXML(String FileName, IDTSPersist90 pPersistObj, IDTSEvents90 pEvents)
at Microsoft.SqlServer.Dts.Runtime.Application.SaveToXml(String fileName, Package package, IDTSEvents events)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Dts.Runtime.Application.SaveToXml(String fileName, Package package, IDTSEvents events)
at Microsoft.SqlServer.Dts.MigrationWizard.DTS9HelperUtility.DTS9Helper.SaveToXML(Package pkg, String sFileLocation)
at Microsoft.SqlServer.Dts.MigrationWizard.Framework.Framework.StartMigration(PackageInfo pInfo)

Looking at the call stack, it looks like COM wrapper fails on SaveToXML. Can someone tell me how I should workaround this problem?

Thanks,

Bobby Fu

View 1 Replies View Related

Attach Aspnetdb.mdf Failed, But I Can't Find Attach Statement In The Web.config

Nov 21, 2007

An attempt to attach an auto-named database for file C:WebApp_Dataaspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.  
My web.config file, the connection strings
<connectionStrings>
  <add name="POAdatabaseConnectionString1" connectionString="Data Source=sss;Persist Security Info=True;Initial Catalog=POAdatabase.mdf;Integrated Security=SSPI"   providerName="System.Data.SqlClient" />
 </connectionStrings>
I cann't really find the statement for attaching aspnetdb.mdf. I don't where to find it. Is there any other web.config file in the C drive? Thanks for help!
 

View 3 Replies View Related

Activation

May 1, 2007

I was testing around with a sample service broker app using activation, and came across an interesting question. The little app sends a series of four messages to a queue, either on the same conversation or on seperate ones. Each message invokes one stored procedure in my activation procedure. All the procedure does is enter a record into a test table and then wait for an allotted amount of time. In my example, the first message called a proc that waited 20 sec, the 2nd one that waited 10 seconds, the third 5 seconds, and the 4th 1 second. I am using internal activation on the queue. It seemed that in both scenarios (sending on 4 separate conversations and on one conversation) the procedures executed "almost" sequentially. "Almost" meaning that the first procedure was done before the last one started executing. It makes sense to me that this would happen where I sent them on the same conversation, but not really when I sent them on 4 seperate ones. Is it because when I call a procedure from my activation procedure it locks the queue so that another message cannot be processed (I'm processing a message at a time)? How could I make it so that the 4th procedure (the one that only waits 1 second) returns before the 1st procedure (the one that waits 20 seconds)?

View 5 Replies View Related

More Problems With Activation

May 9, 2006

I have two databases on the same instance.

One is Basket_ODS and the other is Intelligence_ODS. I am using service broker activation on a queue to move data from the Basket_ODS table to the Intelligence_ODS database. Previously I was able to move from table to table in Basket_ODS, however now that I am moving it to another database on the same instance it is no longer working.

If I set my active connection in SQL Management Studio to this user(BrokerUser) and execute the "move" procedure it works. When activated by Service Broker however, it does not. Here is the error message:

2006-05-09 14:47:52.940 spid86s The activated proc [ODS].[ProcessOrderQueue] running on queue Basket_ODS.ODS.Order Process Queue output the following: 'The server principal "BrokerUser" is not able to access the database "Intelligence_ODS" under the current security context.'

I'm sure I missed something becasue it works fine in the same database. BrokerUser has datareader and datawriter in both databases.

Thanks for any help on this matter.

Gary

View 7 Replies View Related

Xp_cmdshell And Activation

Oct 11, 2006

We are trying to use xp_cmdshell commands in service broker. If I kick off the process without activation, the process succeeds. If I enable activation, the tasks with xp_cmdshell fail.

The xp_cmdshell task is either a echo command so that users know that we are processing a database, or a file copy.

I used the TechNet article by Roger Wolter to create the queues and stored procedures.

We will be working across domains that have one-way trusts.

Wayne

View 2 Replies View Related

Activation Not Working

Sep 11, 2006

Hi There

Everything works 100% until i activate my sp.

I specify to execute as 'dbo' in the alter queue statement. I also define the activated sp to execute as 'dbo'.

But i keep getting permission errors from my activated sp. i have tried to excute as 'sa' , i have even tried to write a job that excutes to stored procedure but it also get weird errors. Bottom line if i exceute the sp in management studio logged in as sa it works , but thorugh activation or a job nothing works, as 'dbo' or 'sa'.

???

Thanx

View 11 Replies View Related

Changing Activation Key

Mar 7, 2007

I need to change the Activation Key for a copy of SQL Server 2000 that I already have installed and up and running. I have the new key but can't figure out how to change from the old, no longer valid, key.

How can I change keys w/o dumping the DB, uninstalling, and reinstalling all of my instances?

View 4 Replies View Related

How Can Internal Activation Use More Resources?

May 5, 2007

Hi,



I'm using service broker queue with internal activation to run a stored procedure.
The DB server is windows 2003 R2, 4 cpu, with SQL server 2005 SP2.
When I'm runing the stored procedure directly from the sql management studio it takes about 75% of the cpu and running for about a minute, but when the stored procedure is activated by the queue internal activation (as a background process) it uses only 25% of the machine cpu (my guess it uses only 1 cpu insted of all 4 cpu) and running for much longer time (sometimes even more than one hour).
How can I change this behavior? I want it to run as fast as possible.


The queue decleration is:

CREATE QUEUE [TaskQueue]
WITH ACTIVATION (
STATUS = ON,
PROCEDURE_NAME = ProcessTasksProc,
MAX_QUEUE_READERS = 1,
EXECUTE AS SELF);



Thanks in advance,
Shai Brumer

View 9 Replies View Related

Cluster Failovers And Activation

Nov 28, 2006

So is there something I'm supposed to configure to allow activation to fire after a cluster failover. We have had three where I have noticed that activation does not automatically fire back up. i have to alter the queue to get it going. None of the values on sys.service_queues imply that is disabled, but messages just keep stacking up into the queue and are not being dealt with. Once I alter the queue to turn activation on; everything takes off and starts working normaly.

Obviously, this is less than desireable for an environment that requires High availability.

Regards

View 1 Replies View Related

Activation Procedure Design

Apr 24, 2007

I've been experimenting with Service Broker and was surprised at one aspect of the design: the interface to Activation stored procedures.



I would have expected the queue to be a parameted passed to the procedure rather than having to hard code the queue query into the SP.



In a system with lots of queues it seems plausible that the same activation procedure might want to be used with several queues.



Any comments?



David.

View 1 Replies View Related

Can Activation SP Wake Up A Thread?

Aug 15, 2007

Newbie question, but is there a way for me to set up a thread in my c# code so as it sleeps until it gets woken up by an event fired by an activation SP?

As in queue sits idle, thread sleeps.
Queue receives a message, activation SP gets fired, activation SP raises an event which gets caught by event handler in code, which wakes up thread to do processing?

View 1 Replies View Related

Device Activation Error

Apr 5, 2007

Hi All,

Currently I have a PC that has MSDE installed on it and is attached to database (MyData.MDF and a log file MYLog.LDF) located on its hard drive at c:data. When I detach from the database, place a copy of the two files noted above on my network drive @ u:data and try to attach I get the following error€™s:

SQL[1] exec error = -1: Changed database context to 'master'.
€œDevice activation error. The physical file name u:dataMyData.MDF may be incorrect.€?

I have done some testing a have found that I can attach to a copy of my database if I move it anywhere on the c: drive, and or even to a 1Gb USB key attached to the system(e:). So far it seems to only be an issue if I move it to a mapped network drive. If anyone could please provide me with any info it would be greatly appreciated.

Thanks.

James D.

View 4 Replies View Related

Increase Activation Time

Oct 23, 2006

Is there any way to increase the activation time, i.e. the time between service broker creating a new instance of the activation SP.

View 3 Replies View Related

Service Broker Activation

Jan 12, 2006

Hi

I'm having problems with activation.  I have a CLR stored procedure that runs fine when run directly (and consumes messages from the queue).  When I try to enable activation nothing happens.  I've tried different execute as options and looked in the sql server logs and I don't see anything indicating why.

I've checked sys.service_queues and all options look correct including activation options.  The sys.dm_broker_activated_tasks view is empty.

 Without any errors I'm having difficulty tracking down the problem.  I've seen references to service broker shutting down the procedure if it doesn't consume any messages but I haven't seen where this is indicated.

Any help appreciated.

Duncan Godwin

 

View 4 Replies View Related

Internal Activation Best Practices?

Jun 1, 2006

I am looking for an example of a SP that shows the best practices for internal activation? In BOL this topic describes the typical patter for reading messages from a queue. What is the typical pattern for reading messages from a queue using an internally activated SP? Do we still need to loop (considering the message arrival actually fired the sp)?

Any advice provided would be helpful.



Thanks!

View 4 Replies View Related

Queue Activation Context

Oct 6, 2006

Is there any way to identify the context by which a stored proc has been activated. i.e.

I want to use the same sp to end conversations on receipt of the end mesage from the target.

However I don't know how to find out which queue activated the SP.

View 1 Replies View Related

CREATE TYPE Failed Because It Could Not Find Type

Jul 28, 2006

Hello --

I am having a UDT problem. When I run the Create Type command. I receive the "could not find type" error. I have seen other posts on here related to the default namespace in VB.NET. When I add the namespace I receive "Incorrect syntax near '.'." What is the format of the EXTERNAL NAME parameter. Thanks for any help. Code below...

Incorrect Syntax Error:

DROP ASSEMBLY CadSqlUdtsCREATE ASSEMBLY CadSqlUdtsAUTHORIZATION [dbo]FROM 'E:CAD.NETCADUDTsReleaseCadSqlUdts.dll'WITH PERMISSION_SET = SAFEGOCREATE TYPE dbo.ReportingAreaUDTEXTERNAL NAME CadSqlUdts.[CadSqlUdts.CadSqlUdts].ReportingAreaUDT;GO

Could Not Find Type Error:

DROP ASSEMBLY CadSqlUdtsCREATE ASSEMBLY CadSqlUdtsAUTHORIZATION [dbo]FROM 'E:CAD.NETCADUDTsReleaseCadSqlUdts.dll'WITH PERMISSION_SET = SAFEGOCREATE TYPE dbo.ReportingAreaUDTEXTERNAL NAME CadSqlUdts.ReportingAreaUDT;GO
What's up??

View 3 Replies View Related

External Activation And Receive Timeout

Oct 31, 2006

I have a set of service broker services setup that rely on external activation to process messages. I'm using the GotDotNet ExternalActivator, and it launches console applications that do the actual retrieval from the queues. The console applications are written to run continuously to avoid the cost of starting up .NET based console apps over and over again.

I am observing very odd timing behavior. With the receive queues empty and the external activator configured to run a minimum and maximum of 5 instances, I observe in SQL Profiler that most of the receive operations finish in about the same amount of time as my WAITFOR command in my receive stored procedure. However, there is usually one receive command that consistently takes upwards of 30 seconds and often causes sql timeout exceptions to be thrown. I know that I could code around this, but I wasn't really expecting this behavior.

Does anyone have any thoughts on why it might be occurring? I would have expected to routinely see my receive operations taking 15 seconds, give or take, especially when the queue is empty. Also, I have observed this behaviour on both SQL 2k5 Express and Dev Editions, so I don't think it's a version thing.

The stored procedure I am using to do the receive is:

Create PROCEDURE [dbo].[P_RTD_MessageBase_Receive]

@receiving_queue_name varchar(255),

@receiving_time_out int

AS

Declare @receiveQuery nvarchar(300)

Set @receiveQuery = 'WAITFOR(RECEIVE * FROM [dbo].['+ @receiving_queue_name +']),

TIMEOUT ' + cast (@receiving_time_out as varchar)

Execute sp_executeSql @receiveQuery

View 6 Replies View Related

Any *simple* External Activation Examples Available?

Feb 13, 2007

BOL only seems to say that you can do it w/o really showing how, and the ExternalActivator sample at gotdotnet.com contains so much functionality I'm not sure what's required just for the external activation. Are there any docs or samples out there that focus on how to do it w/o obscuring the matter with a bunch of other functionality? (I prefer docs to project samples, b/c the samples tend to have hacks like hardcoded paths and connection strings so that they rarely work correctly right out of the box.)

TIA

View 1 Replies View Related

Activation/Security/Dynamic SQL Question

May 12, 2006

I will have a variety of different types of work that will come into my Service Broker queue and I'll likely have a stored procedure or two for each of the different types of work (ie. move order header, move items, move payment, etc.) What is required to be done in each of these steps may vary by the subsidiary and type of order coming in. My plan is to use exclusively stored procedures but to execute them dynamically using sp_executesql. I think I should use sp_executesql because that way I can have a config file (in xml) that I can store what stored procedures need to be called for which unit of work/order type/subsidiary. If I do this I should be able to easily configure each type of work to be done in a config file and let Service Broker handle the execution dynamically. As long as I keep the parameters the same for each of the stored procedures (I'm thinking maybe 4 or 5 parameters) and passing them to each of the stored procedures, this approach will allow me to dynamically configure Service Broker to do what it is supposed to do. I can pull what needs to be done out of the message that comes in with an XQuery expression on the config file. I know that I will have to configure my user (activation user) to be able to run sp_executesql and the security may be complex (especially since I'm using certificates). I can not use trusted databases. Are there any other considerations I should think about?

Gary

View 1 Replies View Related

Boilerplate Activation SQL For High-throughput

Apr 9, 2007



OK, so assume I am recycling dialogs in my client code, and assume I am doing something similar to get a dialog handle in my TSQL. What should the activated stored procedure that is processing my queue look like if I am expecting thousands of messages per second? Assume also that there is a small bit of logic need to process each individual message? I am building for a high-throughput scenario and would like to get as much as possible out of each second-tier service broker server as possible before the aggregated data is moved up the chain to a master. The first tier is Express on a web server and exists primarily only as a forwarding mechanism.

View 1 Replies View Related

Problem With Event-based Activation

Aug 29, 2006

I have an application that is set up using Service Broker to pass messages between services asynchronously. I am using event-based external activation and have successfully set up my event notification in SQL Server so if a message appears on any of my Service Broker queues, I'm getting the activation event from SQL Server sent to my activation service.

The problem that I am seeing is that every time I am posting a message onto a Service Broker queue, I am losing the event notification entry in the sys.event_notifications view and I'm not receiving my activation event notifications. When I execute the CREATE EVENT NOTIFICATION T-SQL statement to recreate the event notification, I'm getting the event notification immediately (since there are messages on the queues being monitored). The event notification appears to be registered until the next message is posted on the queue.

Any ideas on what I'm doing wrong?

Thanks,

Michael

View 1 Replies View Related

Cross Database Activation Security

May 25, 2006

I have two databases Basket_ODS and Intelligence_ODS.

I created a user in the Basket_ODS and Intelligence_ODS databases as follows:

USE Basket_ods

GO

CREATE MASTER KEY ENCRYPTION BY PASSWORD = '*******'

CREATE USER BasketServiceUser WITHOUT LOGIN

ALTER AUTHORIZATION ON SERVICE::[Order Send] TO BasketServiceUser

GRANT CONTROL ON SERVICE::[Order Send]

TO BasketServiceUser

CREATE CERTIFICATE BasketServiceCertPriv

AUTHORIZATION BasketServiceUser

WITH SUBJECT = 'ForBasketService'

BACKUP CERTIFICATE BasketServiceCertPriv

TO FILE = 'BasketServiceCertPub'

In the other database...

I created the following:

USE Intelligence_ODS

GO

CREATE MASTER KEY ENCRYPTION BY PASSWORD = '************

USE Intelligence_ODS

GO

CREATE USER BasketServiceUser WITHOUT LOGIN

CREATE CERTIFICATE BasketServiceCertPub

AUTHORIZATION BasketServiceUser

FROM FILE = 'BasketServiceCertPub'

My Queue is in BASKET_ODS and is set up as:

ALTER QUEUE ODS.[Order Process Queue] WITH

ACTIVATION (

STATUS = ON,

PROCEDURE_NAME = ODS.ProcessOrderQueue,

MAX_QUEUE_READERS = 4,

EXECUTE AS 'BasketServiceUser'

)

I have performed the following grants in Basket_ODS

grant execute on ODS.ProcessOrderQueue to BasketServiceUser

ProcessOrderQueue calls [ODS].[MoveOrderTotals_Core] in the Intelligence_ODS database.

grant execute on [ODS].[MoveOrderTotals_Core] to BasketServiceUser

ProcessOrderQueue proc is set as follows:

ALTER procedure [ODS].[ProcessOrderQueue]

WITH EXECUTE AS 'BasketServiceUser'

[ODS].[MoveOrderTotals_Core] is set up as follows:

when I run ProcessOrderQueue I get an error message:

ALTER procedure [ODS].[MoveOrderTotals_Core](@Orderid uniqueidentifier)

with execute as 'BasketServiceUser'

I just don't understand when I run ProcessOrderQueue I get the following error message (when database trust is turned off)

The server principal "sa" is not able to access the database "Intelligence_ODS" under the current security context.

Can you help me figure out what I'm doing wrong. I've spent so much time on this security stuff. Is there another way to do this that is more straight forward without using database trust?

View 3 Replies View Related

Error Handling In Activation Procs

May 23, 2007

I am kinda curious how the rest of you are doing your error handling inside your activation stored procedures...best practices says you should not rollback the part of your transaction that receives the record off of the queue...but using a try...catch block will only allow you to rollback the entire transaction. I tried using savepoints and starting the try...catch after the savepoint and the proc still gives me the error: "

The current transaction cannot be committed and cannot be rolled back to a savepoint. Roll back the entire transaction." when the error scenario is encountered.



I tried using @@Error and checking for errors at the statement level which would allow me to do a partial rollback, but the type of errors I receive (i.e. invalid data types etc) are aborting the entire batch instead of passing the error and continuing.



Can other people on this forum using service broker give me an idea of how you are getting around this issue?

View 3 Replies View Related







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