ServiceBroker Error 8490 - SqlCacheDependency Not Invalidated

Sep 22, 2006

SQL Server 2005 / .NET 2.0 Web App - SqlCacheDependency is not invalidated and I see an error sql log that occurs after the specified table changes:



2006-09-22 12:18:51.84 spid21s The query notification dialog on
conversation handle '{8D7EF5BC-544A-DB11-B6E0-000F1FD735BF}.' closed
due to the following error: '<?xml version="1.0"?><Error
xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8490</Code><Description>Cannot
find the remote service
&apos;SqlQueryNotificationService-d61fa581-0567-43ba-991f-37499e87cbf6&apos;
because it does not exist.</Description></Error>'.

I've read all applicable articles that I can find and applied hotfix kb916002. The sqldependency has never worked, it is not a stability issue as described in kb916002. In a trace I can see the sqldependency starts correctly. I have a console app that works fine with SqlDependancy calling same database and login creds. I don't know what to think. Calling sys.dm_qn_subscriptions show no subscriptions when this app starts as does the console app. Please advise as it looks like a broker issue.

Thanks

View 3 Replies


ADVERTISEMENT

Fatal Error 682 And SqlCacheDependency

Oct 16, 2007

Hello,

I have tried two ways for executing a query and creating a dependency
on it, one using plain Sql commands, the other using Enterprise
Library wrapped commands.

I keep getting:

Warning: Fatal error 682 occurred at Oct 12 2007 11:01AM. Note the
error and time, and contact your system administrator.

string xml = cmd.ExecuteScalar() as string;

When I execute it. Does anyone know what could cause this.

I have read both of these posts and have not yet been able to
investigate the SQL machine's event viewer though:

http://forums.asp.net/p/959871/1188606.aspx#1188606

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1203630&SiteID=1

The "value" column is an XML datatype field.

Thanks,
Josh



        public static ContentXmlUtilResult GetContentXml(
            string key,
            bool createDependency)
        {
            ContentXmlUtilResult result = new ContentXmlUtilResult();

            string connString = Global.Current.ConnectionString;

            using (SqlConnection conn =
                new SqlConnection(connString))
            {
                SqlCommand cmd =
                    new SqlCommand(
                        "SELECT Value FROM dbo.ContentXml WHERE [Key]
= '" + key + "'",
                        conn);

                if (createDependency)
                {
                    System.Web.Caching.SqlCacheDependency dependency =
                        new SqlCacheDependency(cmd);

                    result.Dependency = dependency;
                }

                conn.Open();

                string xml = cmd.ExecuteScalar() as string;

                conn.Close();

                result.Content = xml;
            }

            return result;

            //SqlCommand cmd = (SqlCommand)
            //    Global.Current.Database.GetSqlStringCommand(
            //    //@"SELECT Value FROM dbo.ContentXml WHERE [Key] =
@Key");
            //    @"SELECT Value FROM dbo.ContentXml WHERE [Key] = '"
+ key + "'");

            ////cmd.Parameters.Add("@Key", SqlDbType.VarChar).Value =
key;

            //if (createDependency)
            //{
            //    System.Web.Caching.SqlCacheDependency dependency =
            //        new System.Web.Caching.SqlCacheDependency(cmd);

            //    result.Dependency = dependency;
            //}

            //string xml = Global.Current.Database.ExecuteScalar(cmd)
as string;

            //result.Content = xml;

            //return result;
        }

View 1 Replies View Related

Log Invalidated After Truncate Table

Nov 23, 2005

Hi group,In one of the books 'Gurus Guide to Transact SQL' i found this info:------------------------------------------------------------TRUNCATE TABLE empties a table without logging row deletions in thetransaction log. It can't be used withtables referenced by FOREIGN KEY constraints, and it invalidates thetransaction log for the entire database.Once the transaction log has been invalidated, it can't be backed upuntil the next full database backup.------------------------------------------------------------Does it mean that the log backup taken after table truncation is aninvalid backup?Help me! i'm lost....Thanks in advanceRonin*** Sent via Developersdex http://www.developersdex.com ***

View 5 Replies View Related

If WCF Can Communicate With ServiceBroker?

Dec 10, 2006

hi,

I want tomake wcf and service broker communicate with each other,Are there some resources about that?

thanks in advance

View 10 Replies View Related

Problem With ServiceBroker

Dec 29, 2005

I use 2 SQL Server: 1 €“ SQL Server 2005 Enterprise on Windows Server 2003 (Itanium) and SQL Server Express on Windows XP Professional (Pentium).

I send the message from enterprise to express the message (at once I shall tell, that sending of the message in the opposite direction gives the same result) and I process the message on express. At first sight like all is correct. Messages I receive all, I read also all of them are correct. But further there are two strange things for me.

In the table sys.conversation_endpoints there is a record (one, irrespective of how many messages in one conversation) with €śstate=CD€?. I read that they should be deleted after 30 minutes, but they did not. Using command €¦ WITH CLEANUP helps but in a parallel way in Service Broker Profiler I observe occurrence of a mistake which occurs after closing dialogue.

I am disturbed with this mistake and the most important is that I not understand why it arises.







EXPRESS



Event Class


EventSubClass


TextData



Broker:Message Classify


1 - Local






Broker:Conversation Group


1 - Create






Broker:Conversation


12 - Dialog Created


STARTED_INBOUND



Broker:Conversation


6 - Received Sequenced Message


CONVERSING



Broker:Remote Message Acknowledgement


3 - Message with Acknowledgement Received






Broker:Conversation


6 - Received Sequenced Message


CONVERSING



Broker:Remote Message Acknowledgement


3 - Message with Acknowledgement Received






Broker:Conversation


7 - Received END CONVERSATION


DISCONNECTED_INBOUND



Broker:Remote Message Acknowledgement


3 - Message with Acknowledgement Received






Broker:Activation


1 - Start






Broker:Message Classify


2 - Remote






Broker:Remote Message Acknowledgement


2 - Acknowledgement Sent






Broker:Conversation


2 - END CONVERSATION


CLOSED



Broker:Conversation Group









Broker:Activation


2 - Ended






Broker:Connection


4 - Closing


An error occurred while receiving data: '64(error not found)'.



Broker:Connection


5 - Closed








Enterprise



Event Class


EventSubClass


TextData



Broker:Conversation Group


1 - Create






Broker:Conversation


11 - BEGIN DIALOG


STARTED_OUTBOUND



Broker:Conversation


1 - SEND Message


CONVERSING



Broker:Message Classify


2 - Remote






Broker:Conversation


1 - SEND Message


CONVERSING



Broker:Message Classify


2 - Remote






Broker:Conversation


1 - SEND Message


CONVERSING



Broker:Message Classify


2 - Remote






Broker:Conversation


2 - END CONVERSATION


DISCONNECTED_OUTBOUND



Broker:Conversation Group


2 - Drop






Broker:Message Classify


2 - Remote






Broker:Message Classify


2 - Remote






Broker:Remote Message Acknowledgement


1 - Message with Acknowledgement Sent






Broker:Remote Message Acknowledgement


1 - Message with Acknowledgement Sent






Broker:Remote Message Acknowledgement


1 - Message with Acknowledgement Sent






Broker:Message Classify


1 - Local






Broker:Conversation


10 - Received END CONVERSATION Ack


CLOSED



Broker:Remote Message Acknowledgement


4 - Acknowledgement Received






Broker:Connection


4 - Closing






Broker:Connection


5 - Closed




 

Yours faithfully,

View 1 Replies View Related

ServiceBroker And Express Edition

Mar 7, 2006

Is Service Broker available for express edition?

View 4 Replies View Related

SqlCacheDependency Without Polling

Jul 20, 2006

I've been having trouble getting the SqlCacheDependency to work without polling (which is set up through SqlCacheDependencyAdmin or aspnet_regsql). If you check out the documentation it says things like:
Microsoft:

View 18 Replies View Related

Can't Enable SQLCacheDependency

Feb 1, 2007

I have a SQL 2005 database and am running the 2.0 framework. I cannot seem to enable SQL caching on the db. I'm using the command line tool as follows:
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>aspnet_regsql -S 99.99.999.999 -Uwebteam -P sa -t tblname -d dbname -et
Enabling the table for SQL cache dependency.
.An error has happened.  Details of the exception:The database 'dbname' is not enabled for SQL cache notification.
To enable a database for SQL cache notification, please use the System.Web.Caching.SqlCacheDependencyAdmin.EnableNotifications method, or the command line toolaspnet_regsql. To use the tool, please run 'aspnet_regsql.exe -?' for more information.
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>
 
I've replaced the ip address, dbname and tblname with ficticious names for obvious reasons here in the post.
What command can I enter to enable the database for caching?  

View 4 Replies View Related

SqlCacheDependency With SQLServer2005

May 21, 2007

I have implemented a caching strategy using the sqlcachedependency and sql server 2005 backend using the broker service.This works fine and well when i am connecting to the SQL Server 2005 under service account that is in the role db_owner. In a production enivironment i am reluctant to do this so i created another service account that only has execute permissions on the stored procedures.When i use this limited service account for my ASP.net web application, the broker service does not send any messages to the web app to invalid the cache. When checking the event log and SQL profiler i get errors all relating to the user not having access to the SqlQueryNotificationService queue. So i did a lot of googling and tried running the grant scripts below with no luck using this limited service account. Keep in mind everything works fine if i use an account with db_owner priviledges. These are the grants i have tried based on numerious articles  GRANT CREATE PROCEDURE TO three_d_ss_loginGRANT CREATE QUEUE TO three_d_ss_loginGRANT CREATE SERVICE TO three_d_ss_loginGRANT SUBSCRIBE QUERY NOTIFICATIONS TO three_d_ss_loginGRANT RECEIVE ON QueryNotificationErrorsQueue TO three_d_ss_loginGRANT REFERENCES ON CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] TO three_d_ss_login These are the grants i have tried that does not work GRANT SEND ON SERVICE::SqlQueryNotificationService TO three_d_ss_loginGRANT RECEIVE on SqlQueryNotificationService_DefaultQueue to three_d_ss_loginCan some one suggest what i need to do to get sqlcacheddependencies to work with a sql2005 backend under a limited priviledged service account?  ThanksJim 

View 4 Replies View Related

SqlCacheDependency, Not Caching

Jun 25, 2007

Hi, I'm trying to set up a SqlCacheDependency using the Query notifications of SQL Server 2005.
I haven't even got to the point of testing the notifications part.  My problem is that my DataTable is not
even getting stored in the cache when I insert it.  The cache seems to be getting invalided as soon
as I add the DataTable.  Here is my code:
(am trying to get a simple example working first)protected void Page_Load(object sender, EventArgs e)
{    DataTable results = (DataTable)HttpRuntime.Cache.Get("supplyFunctions");
      if (results == null)
     {          Response.Write("Cache Invalidated, hitting DB. TIME: " + DateTime.Now.ToString());
          results = getSupplyFunctions();
     }
    else
    {          Response.Write("got from Cache, TIME: " + DateTime.Now);
    }     GridView1.DataSource = results;
     GridView1.DataBind();
}private DataTable getSupplyFunctions()
{     DataTable results = new DataTable();     using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString()) )
     {         using (SqlCommand command = connection.CreateCommand())
          {
                  command.CommandText = "schema.myStoredProc";                  command.CommandType = CommandType.StoredProcedure;
                  SqlCacheDependency dependency = new SqlCacheDependency(command);                  SqlDataAdapter adapter = new SqlDataAdapter();
                 adapter.SelectCommand = command;                 DataSet dataset = new DataSet();
                 adapter.Fill(dataset);
                 results = dataset.Tables[0];
                 HttpRuntime.Cache.Insert("supplyFunctions", results, dependency);
          }
 
  }  return results;
}
 Also, whats weird is that when I keep refreshing the page, after like 5 to 10 minutes it works, and starts caching the data. 
This disturbs me-- I would like to know what is going on.   I am pretty sure my stored procedure doesn't break the rules of the query notifications.  Can someone help me out?!??!
Thanks!
 

View 2 Replies View Related

Some Questions About SQLCacheDependency?

Sep 30, 2007

Hi all,I've been able to successfully use SQLCacheDependency and my test application is using only one database table to test SQLCacheDependency. Now, I was reading "Programming Microsoft ASP.NET 2.0" by Dino Esposito and I've couple of questions.a)-SQLCache will expire on Insert, Update and Delete queries on the database table? Am I right? b)-Right now I'm using SQLCacheDependency on one table, can I use it on more than one table ? If I can't , can you please give me some ideas on how to use SQLCacheDependency on more than one table? c)-Lastly, If large number of clients are using my application, what about the performance gains/losses if I use SQLCacheDependency?  I will really appreciate your help.  Thanks,Oltmans 

View 1 Replies View Related

Some Questions About SQLCacheDependency?

Oct 1, 2007

Hi All,I've successfully implemented an example of SQLCacheDependency on one database table. I was reading "Programming Microsoft ASP.NET 2.0" by Dino Esposito and I've couple of questions. I will really appreciate your help.a)-Can I use SQLCacheDependency on more than one database tables? If I can't then I will appreciate if you can give me couple of hints as to how to do this.b)-As I understand SQLCache on a table will expire if any Insert and Update SQL operations happen on that table.c)-Our software is being used by many clients. Do you think SQLCacheDependency will have some sort of performance hits?I will really appreciate any help.Thanks,Oltmans

View 1 Replies View Related

SqlCacheDependency And PollTime

Oct 10, 2007

I am using SqlCacheDependency to monitor a database table for changes.
Unfortunately, it is polling the table too often and is causing
performance issues. It seems to poll at least once a second. So now I'm
trying to find a way to adjust it so that it polls about once every 10
seconds.The
code that uses the SqlCache Dependency is located in a Class Library
Project that is used by my web application project. The code is as
follows:// in the class constructorSqlDependency.Start("...some connection string");// in the body of a methodusing (SqlConnection connection = new SqlConnection("...same connection..."){     connection.Open();     SqlCommand command = connection.CreateCommand();     command.CommandText = query;     SqlDependency dependency = new SqlDependency(command);     dependency.OnChange += OnDepChange;      SqlDataReader data = command.ExecuteReader();     // code that uses the data goes here}public void OnDepChange(object sender, SqlNotificationEventArgs e){     DoSomething();}I
did a little searching on the web and noticed that some examples showed
that you could adjust the pollTime in the web.config file:<sqlCacheDependency enabled="true" pollTime="30000">  <databases>    <add name="Pubs" connectionStringName="PubsConn" />  </databases></sqlCacheDependency>However,
as I stated earlier, the code that uses the SqlCacheDependency is
located in a Class Library, so this configuration doesn't help me. Is
there a way to adjust the pollTime without getting my connection string
from the web.config?

View 1 Replies View Related

How Can I / Should I Reuse SqlCacheDependency? Thanks

May 1, 2006

I can create a SqlCacheDependency, and link it to a cached item in httpcontext cache. When something change, it will remove the cached item from the cache. I think I have to redo the process when that happens - prepare sql command, create SqlCacheDependency and insert the item into cache. Now I only need a notification from my SQL when something changes in one of my table, I don;t need read anything from db, and I think I should find a way to not recreate the SqlCacheDependency object everytime?
any suggestion?

View 2 Replies View Related

Really Need Some Suggestion On SQLCacheDependency.

May 3, 2006

I have some problem with ASP.NET cache, I found other people has similar problem, but I didn't find real solution.
The one bother me most is the SQLCacheDependency doesn't work stable. I insert object in cache and has SQLCacheDependency linked. After a period of time, it stopped working. That means the the object is still in cache, but change on db side doesn't remove the cache entry. I am not sure if it is ASP side or SQL side, I feel it is ASP side.
I am using 2.0 + SQL 2005.
Once the db command notification stop working, you have to restart IIS or clear all items in cache since you don't kno which one is changed.
Any suggestion?

View 12 Replies View Related

Problem With SqlCacheDependency

Sep 12, 2007

I've set up a SqlCacheDependency in my Asp.Net application, but the dependency invalidates the cache immediately every time the page is hit.

I think the problem may be with my SQL Query, but it seems to me to meet the requirements on the Special Considerations When Using Query Notifications page on MSDN. Could someone take a look at this query and tell me if I've done something wrong? Thank you.

Here's my query:



Code Snippet

USE [chameleon]

GO


SET ANSI_NULLS ON

GO

SET ANSI_PADDING ON

GO

SET ANSI_WARNINGS ON

GO

SET CONCAT_NULL_YIELDS_NULL ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET NUMERIC_ROUNDABORT OFF

GO

SET ARITHABORT ON

GO


ALTER PROCEDURE [dbo].[usp_customers_by_site_id]

@site_id INT

AS


SELECT

customers.customer_id,

customers.name,

customers.po_prefix,

customers.dt_created,

customers.created_by AS auid,

customers.po_required

FROM dbo.customers

WHERE customers.site_id = @site_id

AND customers.is_active = 1




and here's the code in my Asp.Net site where I try to use the SqlCacheDependency:




Code Snippet
public List<Customer> GetCustomersBySite(int siteID)
{
List<Customer> customers = new List<Customer>();

if (HttpRuntime.Cache["CustomersBySite" + siteID] != null){
customers = (List<Customer>)HttpRuntime.Cache["CustomersBySite" + siteID];
}
else
{
using (SqlCommand command = new SqlCommand("usp_customers_by_site_id", Connection)){
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("@site_id", SqlDbType.Int).Value = GetDBValue(siteID, false);
SqlCacheDependency dependency = new SqlCacheDependency(command);

try{
Connection.Open();
SqlDataReader reader;
reader = command.ExecuteReader(CommandBehavior.SingleResult);

while (reader.Read()){
customers.Add(PopulateCustomer(reader));
}

HttpRuntime.Cache.Insert("CustomersBySite" + siteID, customers, dependency, DateTime.Now.AddMinutes(Configuration.CacheDuration), System.Web.Caching.Cache.NoSlidingExpiration);
}
finally{
Connection.Close();
}
}
}
return customers;
}


View 1 Replies View Related

Problem With SQLCacheDependency

Jun 15, 2006

I am using a grid to display the data on my webpage, and I have 3 projects in my solution (UI, BLL, DAL). When I load the webpage I am creating the instance of a class written n my BLL project to populate the data, and in BLL I'm creating the object for the class in DAL and returning the datatable.

Now when I refresh the page using F5, the SQLDependency is working fine. But, when I use the Paging or Sorting option's on my grid I see in SQL Profiler that the query is posted back to the SQLServer to get the data.

If this is the senario then how can I make use of the cache object in .NET 2.0.

Please advice,
Ravi

View 1 Replies View Related

SqlCacheDependency + Asp.Net Membership == Not Working

Jul 24, 2006

Decided to try testing SqlCacheDependency and got the following.... thoughts???After using the following code...void Application_Start(object sender, EventArgs e)     {        System.Data.SqlClient.SqlDependency.Start (ConfigurationManager.ConnectionStrings["testConnectionString"].ConnectionString);     }//-------------------------------- ... then more code                    SqlCommand sqlCommand = new SqlCommand("select ApplicationName from dbo.aspnet_Applications", sqlConnection);                    SqlCacheDependency sqlCacheDependency = new SqlCacheDependency(sqlCommand);//-------------------------------- ... then more codeMembershipUser membershipUser =  Membership.CreateUser(defaultUserNameTextbox.Text, defaultUserPasswordTextbox.Text);        if (membershipUser != null)        {//----------------------------- ... more codethe above code no longer works giving the below exception : using a plain database generated using the following statement

"aspnet_regsql -E -S . -d testDatabase -A all"
[SqlException (0x80131904): UPDATE failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +177
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +68
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2300
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +147
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1021
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +314
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +413
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +115
System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3325
System.Web.Security.Membership.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +214
System.Web.Security.Membership.CreateUser(String username, String password, String email) +31
System.Web.Security.Membership.CreateUser(String username, String password) +7
testCustomMembership.defaultCreateUserButton_Click(Object sender, EventArgs e) in c:projects
esearchsamplehandler estCustomMembership.aspx.cs:33
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +97
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4861

View 1 Replies View Related

SqlCacheDependency Without Output Caching

Jul 25, 2006

I have SQL Server 2005 and I am using .Net 2.0.
Is there a way to cache a query, basically I am going to do a SELECT * on a table that is called frequently. 
I then want to query this DataTable that is in cache.  I want to invalidate the cache when the table changes.
Everything I have read tells me to use the output caching directive.  But, much of what I am doing doesn't end up in the output.   Is there a way to invalidate the cache the same way without output caching and using the Service Broker?

View 1 Replies View Related

SqlCacheDependency Works Just For 2-3 Minutes

Jan 31, 2006

I've the following simple code bound to a button on a Web page

string time = (string)Cache["KEY"];
if (time == null)
{

SqlConnection sqlConnection = new SqlConnection(@"Server=BIZYUSUFSQL2005;Database=Deneme;User Id=sa;Password=;");
SqlCommand command = new SqlCommand(@"select KOLON1 from dbo.CACHE", sqlConnection);
sqlConnection.Open();

SqlCacheDependency dependency = new SqlCacheDependency(command);
time = System.DateTime.Now.ToString();
Cache.Insert("KEY", time, dependency);
command.ExecuteNonQuery();
sqlConnection.Close();
}
return time;
This code has to return the time value from cache. And when a record is inserted into the CACHE table, the cache item has to be invalidated and the new time value has to be returned.
The code works properly for 2-3 minutes. But when there is no activity for 5 minutes, the cache invalidation does not work anymore.
 

View 1 Replies View Related

Do We Have To Create Connection Before Creating SqlCacheDependency?

May 23, 2008

do we have to create connection and assign it to command object before creating SqlCacheDepency? chek the code below. SqlServer is not invalidating cache when there is update. When i create Dependency using command object, at that time command object does not have connection. It will assign connection to command object in Excute method
SqlCommand cmd = new SqlCommand(commandText);cmd.CommandType = CommandType.StoredProcedure;SqlCacheDependency cacheItem = new SqlCacheDependency(cmd);DataSet result;result = DBHelper.Execute(cmd);HttpRuntime.Cache.Insert(cacheItemName, result, cacheItem); 

View 4 Replies View Related

Enable Production SQL Server Express For SQLCacheDependency?

Aug 1, 2007

Q1: Can I just open these protocols I need (see web links below) and then close them down again after SQLCacheDependency has been enabled? Note: The website (asp.net 2.0/SQL server Express) operates OK right now with asp.net - but it does not have SQLCacheDependency enabled.
Problem: When I try to do this I keep on getting this error message:
"An error has occurred when establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections."
None of these 3 commands have worked (all give the same message above):
 aspnet_regsql.exe -U user1 -P pwd1 -S server1/SQLEXPRESS -d myDBName -ed aspnet_regsql.exe -E -S server1/SQLEXPRESS -d myDBName -ed aspnet_regsql.exe -E -S .SqlExpress -d myDBName  -ed
I am trying to run these commands via a MSTSC connection. Q2: Is that (terminal server) the problem (the "remote connection") complained of above ?
This is the command that worked on my local dev machine:
 aspnet_regsql.exe -E -S .SqlExpress -d myDBName -ed
Q3: Must I really go through the procedure "How to: Configure Express to accept remote connections" at:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
I don't really want to have SQL server accepting any connections as the last time it was listening on these ports we had so many attacks being made that it was filling up the logs!
What I can't understand is that every night the database is backed up with the following command line code (operating as a Scheduled Task):
  sqlcmd -s server1/SQLEXPRESS -i MW4BAK.SQL -E
Q4: So if the server is happy receiving commands from 'sqlcmd.exe' why does it have such problems with 'aspnet_regsql.exe'
Q5: If I grouped those statements I need to setup SQLCacheDependency under a Scheduled Task would they work (as there would presumably be no remote connection then) or is it something in the nature of the connection established which allows sqlcmd.exe to work but stops aspnet_regsql.exe?

View 2 Replies View Related

SqlCacheDependency Query Notifications -- Correct Permisisons -non Dbo Owner Account

Jul 5, 2007

 
Hi,
I am using SqlCacheDependency with the query notifications of SQL server 2005.
It is working nicely with the dbo.owner account but not with my web user account,
so I am thinking something is wrong with the permissions. 
After searching around, it seems that the main permissions to enable are these:
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO theAccount
GRANT RECEIVE ON QueryNotificationErrorsQueue TO theAccount
GRANT REFERENCES on CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] to theAccount
GRANT SELECT TO theAccount.
 
I enabled these and it still doesn't work.  When I change my table, my cache is not getting invalidations.
Does anyone know what could be going on?  Or perhaps how can I trace the problem and get some clues?
thanks so much,
-tajmahal
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 

View 3 Replies View Related

SQL Server 2005 Install Error (Error 29528. Unexpected Error While Installing Performance Counters. )

Jun 12, 2007

I'm currently receiving the following error message whilst attempting to install SQL Server 2005 Standard Edition on Windows Server 2003 (32 Bit):
Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.

This server already has an install of SQL Server 2000 as the default instance. I'm attempting to install a new named instance of SQL Server 2005.

Extract from log:

<Func Name='LaunchFunction'>
Function=Do_sqlPerfmon2
<Func Name='GetCAContext'>
<EndFunc Name='GetCAContext' Return='T' GetLastError='0'>
Doing Action: Do_sqlPerfmon2
PerfTime Start: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
<Func Name='Do_sqlPerfmon2'>
<EndFunc Name='Do_sqlPerfmon2' Return='0' GetLastError='2'>
PerfTime Stop: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
MSI (s) (4C:FC) [10:20:02:833]: Executing op: ActionStart(Name=Rollback_Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,Description=Removing performance counters,)
<EndFunc Name='LaunchFunction' Return='0' GetLastError='0'>
MSI (s) (4C:FC) [10:20:02:849]: Executing op: CustomActionSchedule(Action=Rollback_Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,ActionType=1281,Source=BinaryData,Target=Rollback_Do_sqlPerfmon2,CustomActionData=100Removing performance counters200000DTSPipelineC:Program FilesMicrosoft SQL Server90DTSBinnDTSPERF.INI)
MSI (s) (4C:FC) [10:20:02:849]: Executing op: ActionStart(Name=Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,Description=Installing performance counters,)
MSI (s) (4C:FC) [10:20:02:849]: Executing op: CustomActionSchedule(Action=Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,ActionType=1025,Source=BinaryData,Target=Do_sqlPerfmon2,CustomActionData=100Installing performance counters200000C:Program FilesMicrosoft SQL Server90DTSBinnDTSPERF.INIC:Program FilesMicrosoft SQL Server90DTSBinnDTSPERF.HC:Program FilesMicrosoft SQL Server90DTSBinnDTSPipelinePerf.dllDTSPipeline0DTSPipelinePrfData_OpenPrfData_CollectPrfData_Close)
MSI (s) (4C:94) [10:20:02:864]: Invoking remote custom action. DLL: C:WINDOWSInstallerMSI1683.tmp, Entrypoint: Do_sqlPerfmon2
<Func Name='LaunchFunction'>
Function=Do_sqlPerfmon2
<Func Name='GetCAContext'>
<EndFunc Name='GetCAContext' Return='T' GetLastError='0'>
Doing Action: Do_sqlPerfmon2
PerfTime Start: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
<Func Name='Do_sqlPerfmon2'>
<EndFunc Name='Do_sqlPerfmon2' Return='2' GetLastError='2'>
PerfTime Stop: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
Gathering darwin properties for failure handling.
Error Code: 2
MSI (s) (4C!F0) [10:23:46:381]: Product: Microsoft SQL Server 2005 Integration Services -- Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.

You can ignore this and it will complete the installation, but subsequently trying to patch with SP2 will fail on the same sections - Hotfix.exe crashes whilst attempting to patch Database Services, Integration Services and Client Components (3 separate crashes).

I've removed SQL Server 2005 elements and tried to re-install, but it's not improved the situation.

Any ideas?

View 3 Replies View Related

[File System Task] Error: An Error Occurred With The Following Error Message: Access To The Path Is Denied

Sep 7, 2007

Hi -

I have an File System Task that copies a file from one directory ot another. When I hard code the target directory (c:dirfile.txt) it works fine. When I change it to a virtual directory (\serverdirfile.txt) I get a security error:

[File System Task] Error: An error occurred with the following error message: "Access to the path '\gracehbtest oS2TMM_Live_Title_000002.xml' is denied.".

Where do I change the security settings?

Thanks - Grace

View 5 Replies View Related

Exec Pkg Task: Error 0xC0202009 While Preparing To Load The Package. An OLE DB Error Has Occurred. Error Code: 0x%1!8.8X!.

Feb 21, 2007

I cannot execute a package by using Execute Package task.
I supplied sa credentials to connection manager, and it shows the list of Packages on SQL Server but when running the task it says

Error 0xC0202009 while preparing to load the package. An OLE DB error has occurred. Error code: 0x%1!8.8X!.



Any clue ?


Thanks,
Fahad

View 1 Replies View Related

Error Source : Microsoft Data Transformation Services (DTS) Package Error Description : Error Accessing Windows Event Log

Dec 13, 2007



Hi,

I am running dts in Sql Server 2005 management studio from Management, Legacy and data Transformation Services.

Once the dts has run, I get this error message "Error Source : Microsoft Data Transformation Services (DTS) Package Error Description : Error accessing Windows Event Log."

Please help me

thanks in advance

Srinivas



View 1 Replies View Related

An Internal Error Occurred On The Report Server. See The Error Log For More Details. RsInternal Error)

May 20, 2008

We have reports deployed in the Report Server. While connecting from client, we are getting the error
"An internal error occurred on the report server. See the error log for more details. rsInternal Error)"

Then we went to Report Server, Reporting Service and SQL Server service are all are running fine.

Important thing is some time the reports are working fine, sometimes i am receiving this error. Please help.

We predict whether the services are automatically restarted or transaction logs exceeding the limit or any other parameters to set to avaoid this error?

Please help.

View 1 Replies View Related

[XML Task] Error: An Error Occurred With The Following Error Message: There Are Multiple Root Elements.

Aug 18, 2006

I'm trying to use an XML Task to do a simple XSLT operation, but it fails with this error message:

[XML Task] Error: An error occurred with the following error message: "There are multiple root elements. Line 5, position 2.".

The source XML file validates fine and I've successfully used it as the XML Source in a data flow task to load some SQL Server tables. It has very few line breaks, so the first 5 lines are pretty long: almost 4000 characters, including 34 start-tags, 19 end-tags, and 2 empty element tags. Here's the very beginning of it:

<?xml version="1.0" encoding="UTF-8"?>
<ESDU releaselevel="2006-02" createdate="26 May 2006"><package id="1" title="_standard" shorttitle="_standard" filename="pk_stan" supplementdate="01/05/2005" supplementlevel="1"><abstract><![CDATA[This package contains the standard ESDU Series.]]></abstract>

There is only 1 ESDU root element and only 1 package element.

Of course, the XSLT stylesheet is also an XML document in its own right. I specify it directly in the XML Task:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>

<xsl:template name="identity" match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="kw">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:attribute name="ihs_cats_seq" select="position()"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>


Its 5th line is the first xsl:template element.

What is going on here? I do not see multiple root elements in either the XML document or the XSLT stylesheet.

Thanks!

View 5 Replies View Related

I Have The Dreaded Internal Error Occured On The Report Server. See Error Log For More Details No Error Log

Apr 9, 2008

I have the error above, but no error log. I can preview the sub report - but this main report fails after working this morning. This is for internal company reports and I rebuilt this one after converting from access.
I have looked where the error logs should be, but there are no error logs.
I rebuilt the query as I needed to change this, but this did not help.
Is there someone who could point me in the correct direction.

Thanks!
Terry

View 4 Replies View Related

Just Started Getting This Error When Trying To Connect To SQL From ASP.NET--error: 26 - Error Locating Server/Instance Specified

Apr 3, 2007

This has worked fine for weeks, and months.

I'm running Vista Ultimate. SQL 2005 is set as my Default instance, and SQL2000 is set as (local)SQL2000.

Today, actually half way through today, I restarted my computer after installing Photoshop Updates.

Upon getting my computer back up and running, I cannot access SQL2000 from any website on my computer, nor can I access it from SQL2005 Management Stdio. I CAN access it from Enterprise Manager (SQL2000 tool).

Whenever I run an web app that connects to it I get this error:


An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Now I usually get these when ASP.NET can't point to the right spot, but in this case I'm pointing exactly where I need to go. Any thoughts?

--Edit

I should also add my password got changed a few days ago on our Domain. This was the first time restarting after the PW change.

View 1 Replies View Related

Error 7399: OLE DB Provider 'MSDAORA' Reported An Error. OLE DB Error

Feb 18, 2007

My link server was working just fine until friday evening.
It stopped worked over the week end.
with and error Error 7399: OLE DB provider 'MSDAORA' reported an error. OLE DB error .

---my oracle 10g client is working just fine
--TNS names looks fine
---i recreated the link but i am still getting the same error.

I need your help because a lot of jobs are using that link on Monday it is going to be crazzzy.

View 7 Replies View Related

614 Error On A User Database And 806 Error On Tempdb Seen In The Error Log

Jan 5, 2002

Hi,

We have a production SQLServer 6.5 running with service pack SP5a update:

I got the following 2 errors.....

1.

Error : 806, Severity: 21, State: 1
Could not find virtual page for logical page 67833121 in database 'tempdb' database 'tempdb'

2.

I got error when I ran a job for Update statistics
Error : 614, Severity: 21, State: 3
A row on page 2697653 was accessed that has an illegal length of -8631 in database 'abc'.

For Error 2: I ran update statistics using query analyser. It is fine
Is there anything I have to do further?


For Error 1 : The work around given by Microsoft
=================================================
I ran
DBCC CHECKTABLE(syslogs)

I am getting the following message on :
master:
Checking syslogs
The total number of data pages in this table is 1.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 11 data rows.
DBCC execution completed. If DBCC printed error messages, see your System Administrator.

model:
Checking syslogs
The total number of data pages in this table is 47.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 532 data rows.
DBCC execution completed. If DBCC printed error messages, see your System Administrator.

tempdb:

Checking syslogs
The total number of data pages in this table is 1.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 31 data rows.
DBCC execution completed. If DBCC printed error messages, see your System Administrator.

I ran dbcc checkdb on master,model and tempdb . Still I get the same problem.

for tempdb:

Checking 8
The total number of data pages in this table is 1.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 19 data rows.

for master:
Checking 8
The total number of data pages in this table is 1.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 27 data rows.

for model:
Checking 8
The total number of data pages in this table is 47.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 532 data rows.

All system databases and userdatabase recovered successfully when I restarted sqlserver.

Please advice how to get rid of this problem.


Thanks in advance,
Anu

View 4 Replies View Related







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