.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Synchronization in SQL Jobs

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
 
I have a Job on our SQL Sever 2008 that executes stored procedure in every hour. The stored procedures aggregates data from one database to another applying some business rules on it to a SQL Server database. On average it takes about 3 minutes to run the job. But if job takes for more than an hour, then, another job starts and start running aggregation on same set of data. Thus, aggregated number is duplicated/more than the original number of records. How can I setup the job in a way if the job is still running after 50 minutes then stop the job? Or is there a better way to avoid the job from running nonstop and hitting the data integrity?


View Complete Post


More Related Resource Links

In Sync: Creating Synchronization Providers with the Sync Framework

  

The Sync Framework can be used to build apps that synchronize data from any data store using any protocol over a network. We'll show you how it works and get you started building a custom sync provider.

Joydip Kanjilal

MSDN Magazine August 2010


Synchronization Coverage: Code Coverage for Concurrency

  

As more and more multi-threaded software applications get developed, software development professionals need to adopt new tools, techniques and metrics that can deal with multi-threaded software. Synchronization coverage is a simple, practical way to do this and this article covers a prototype synchronization coverage tool for .NET, called Sync Cover.

Chris Dern, Roy Tan

MSDN Magazine September 2009


Foundations: Synchronization Contexts in WCF

  

After a description of what synchronization contexts are and how WCF uses them, the author demonstrates various options for extending WCF to use custom synchronization contexts, both programmatically and declaratively.

Juval Lowy

MSDN Magazine November 2007


CONCURRENCY: Synchronization Primitives New To Windows Vista

  

Windows Vista has lots of goodies for native C++ developers including condition variables, slim reader/writer locks, and one-time initialization.

Robert Saccone and Alexander Taskov

MSDN Magazine June 2007


Concurrent Affairs: Build a Richer Thread Synchronization Lock

  

In my last column, I showed the various thread synchronization mechanisms employed by the Microsoft® . NET Framework (see Concurrent Affairs: Performance-Conscious Thread Synchronization). I then examined the performance characteristics of all these mechanisms and determined that the Interlocked methods performed the best because the calling thread never has to transition to kernel mode.

Jeffrey Richter

MSDN Magazine March 2006


Concurrent Affairs: Performance-Conscious Thread Synchronization

  

In my career, I have architected and implemented many thread synchronization techniques. This has provided me with a lot of experience that has shaped the way I now think about thread synchronization problems.

Jeffrey Richter

MSDN Magazine October 2005


Basic Instincts: Thread Synchronization

  

My last three Basic Instincts columns have examined techniques for using asynchronous delegates and creating secondary threads. Those columns demonstrated how to introduce multithreaded behavior into your applications.

Ted Pattison

MSDN Magazine September 2004


.NET Column: Safe Thread Synchronization

  

By far, the most common use of thread synchronization is to ensure mutually exclusive access to a shared resource by multiple threads. In the Win32® API, the CRITICAL_SECTION structure and associated functions offers the fastest and most efficient way to synchronize threads for mutually exclusive access when the threads are all running in a single process.

Jeffrey Richter

MSDN Magazine January 2003


Web Farms: Use Data Caching Techniques to Boost Performance and Ensure Synchronization

  

Performance is an important concern for any application, but becomes critical when the app is a Web Service accessed by thousands of clients simultaneously. One hardware approach to distributing Web Services requests evenly is a Web farm consisting of multiple servers. Once on a Web farm, Web Service performance can be improved by using ADO.NET DataSet objects to cache frequently accessed data, reducing round-trips to the database. Here the author describes data caching in a Web farm environment and discusses how to avoid the cross-server synchronization problems inherent in this approach.

David Burgett

MSDN Magazine December 2002


Access to SQL Server Jobs

  
Hello folks, Would like to grant group of users ( windows logins) to CREATE / MODIFY / DELETE / SCHEDULE jobs on SQL Server 2005. But can not grant users SYSADMIN privileges. I know that by granting users SQLAgentOperatorRole, SQLAgenetReaderRole and SQLAgentUserRole the User will be able to create jobs but they will be the owner of the newly created job and other users can not MODIFY / VIEW / RESCHEDULE the jobs. Is there any way to customize permissions to windows logins to have permission to CREATE / MODIFY / DELETE / SCHEDULE jobs without granting them SYSADMIN privilages ? Appreciate your reply   Thank You Arunaroon

CDC Jobs Failing

  
Hi Team, I had a Database AAAA on Dev Server which was CDC Enabled. Then I restored it From a Production Backup without KEEP_CDC option. After That i enabled CDC and now the Capture Job is getting Failed. M getting the below error. Can someone help me out please Executed as user: XXX\AAA. Could not locate text information records for the column "Comments", ID 8 during command construction. [SQLSTATE 42000] (Error 18773)  The Log-Scan Process failed to construct a replicated command from log sequence number (LSN) {00029267:0002b669:00a0}. Back up the publication database and contact Customer Support Services. [SQLSTATE 42000] (Error 18805)  Log Scan process failed in processing log records. Refer to previous errors in the current session to identify the cause and correct any associated problems. [SQLSTATE 42000] (Error 22859).  NOTE: The step was retried the requested number of times (10) without succeeding.  The step failed.Thanks & Regards, Manjunath C Bhat, http://manjunathcbhat.blogspot.com http://manjunathcbhat.wordpress.com

add new synchronization connection unable to process Put message

  
Environment is Server 2008 SP2, SQL Server 2008 CU2, Sharepoint 2010. Both Forefront services are started. I go to create the sync connection, select AD, use an account that has replication permissions. Populate containers works fine, select a container and click OK. After a bit, I get 'unable to process Put message'. Event logs, application show this error: Microsoft.ResourceManagement.Service: Microsoft.ResourceManagement.ResourceManagementException: Exception from HRESULT: 0x80230516 ---> System.Runtime.InteropServices.COMException (0x80230516): Exception from HRESULT: 0x80230516 at MIISRCW.IMMSServer.SetMVData(String pszMVDataXML) at Microsoft.ResourceManagement.SyncConfig.ModifyMVData(String mvDataXml) at Microsoft.ResourceManagement.ActionProcessor.SyncConfigActionProcessor.Update(Guid objectId, CultureInfo locale, IList`1 updateParameters, Guid cause) --- End of inner exception stack trace --- at Microsoft.ResourceManagement.ActionProcessor.SyncConfigActionProcessor.Update(Guid objectId, CultureInfo locale, IList`1 updateParameters, Guid cause) at Microsoft.ResourceManagement.ActionProcessor.SyncConfigActionProcessor.ProcessInputRequest(RequestType request) at Microsoft.ResourceManagement.ActionProcessor.ActionDispatcher.ProcessInputRequest(RequestType request) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteAction(RequestType request) at Mi

Unable to start user profile synchronization service

  
Hello, I have the following problem. user profile synchronization service doesn't start up, with the following error in log: The service encryption keys could not be found. User Action Verify that the service account has permissions to the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Forefront Identity Manager\2010\Synchronization Service If the problem persists, run setup and restore the encryption keys from backup. Permissions for registry are availabele. Thank you.    

Critical Error with User Profile synchronization timer job

  
Hello! We are currently running SharePoint 2010 on Windows 2008 R2 servers. Our User Profile Service and User Profile Sync Service are currently running, and profile imports work fine when kicked off from Central Admin. However, the profile sync timer job always fails with the following Application Event error: Event 6398, SharePoint Foundation The Execute method of job definition Microsoft.Office.Server.UserProfiles.UserProfileImportJob (ID 340e8ca2-6f3b-4bd8-80f2-0fe011709805) threw an exception. More information is included below. Generic failure Looking at the ManageUserProfileServiceApplication.aspx log, indeed the only imports visible are ones which have been kicked off manually in Central Admin. The failed scheduled imports are not even recorded to this log. The ULS entry associated with this error is as follows: 08/31/2010 17:11:17.32  OWSTIMER.EXE (0x0CD0)                    0x0C04 SharePoint Foundation          Timer                          6398 Critical The Execute method of job definition Microsoft.Office.Server.UserProfiles.UserProfileImportJob (ID 340e8ca2-6f3b-4bd8-80f2-0fe

New Jobs Are Empty

  
I'm truly seeing smoething very strange with MSDB and SQL Agent jobs... I can go out and create a new job under SQL Server Agent. It can be as simple as "SELECT * FROM SYSDATABASES". I clck okay. The dilog exits. The job appears under "JONBS" in the SQL Server Agent tree. When I go to view the Proppoerties of the job I just created, there are none! I get the New Job window!! It's as if the row gets created in sysjobs in MSDB, but there are no job steps or anything that is saved. It even asks as though I'm creating an entirely new job, even though I'm double clicking on an existing job. What is going on here? Never seen this before!! Thanks!A. M. Robinson

New Jobs Are Empty

  
I'm truly seeing smoething very strange with MSDB and SQL Agent jobs... I can go out and create a new job under SQL Server Agent. It can be as simple as "SELECT * FROM SYSDATABASES". I clck okay. The dilog exits. The job appears under "JONBS" in the SQL Server Agent tree. When I go to view the Proppoerties of the job I just created, there are none! I get the New Job window!! It's as if the row gets created in sysjobs in MSDB, but there are no job steps or anything that is saved. It even asks as though I'm creating an entirely new job, even though I'm double clicking on an existing job. What is going on here? Never seen this before!! Thanks!A. M. Robinson

How to create SQL-login with permissions for view-only SQL-Agent-Jobs?

  
Could you please help me with resolving next problem: How to create SQL-login with permissions for view -only SQL-Agent-Jobs (he cannot create, modify or delete)? I am using MS-SQL-Server version: 8.00.194 In other words : how to create in version 2000 (8.00.194) the same as 'SQLAgentReaderRole ' in version 2005 (for more details see http://technet.microsoft.com/en-us/library/ms188283.aspx).
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend