GithubHelp home page GithubHelp logo

modulexcite / sqlreplication Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sqlguychuck/sqlreplication

0.0 1.0 0.0 4.19 MB

SQL Server Replication information, scripts, and procedures for custom alerting.

SQLPL 72.11% PLSQL 27.89%

sqlreplication's Introduction

SQL Server Replication Code Repository

SQL Server Replication information, scripts, and procedures for custom alerting.

Check out the files in the repository. I added two extra non-replication procs there, prc_Config_DBMail.sql which will help configure your SQL Server's DBMail feature for you. Just follow instructions it provides. I also added prc_InternalSendMail.sql which will automatically create DBMail profiles for you with zero effort.

##Chuck Lathrope an Author in Tribal SQL Redgate and MidnightDBA organized a bunch of new authors to create a book on SQL Server topics, called "Tribal SQL". I wrote the "Taming Replication" chapter on transactional replication, which covers all aspects of setup, performance, and troubleshooting. The book really covers what each of us authors thought was important tribal knowledge that we are passionate about. The books website is www.tribalsql.com and all proceeds go to Computers 4 Africa charity.

I hope you enjoy the book, I know I spent a lot of time writing and re-writing the Taming Replication chapter with lots of help from Tony Davis the lead editor.

Cheers, Chuck Lathrope

10/21/2013 - Review of Fundamentals of SQL Server 2012 Replication

I volunteered to review the book, "Fundamentals of SQL Server 2012 Replication" written by Sebastian Meine, Ph.D. and published in August 2013 by SimpleTalk publishing.

Sebastian does a great job at giving an overview of transactional and merge replication concepts, geared towards new users of replication. Each chapter reviews concepts and definitions to help solidify for the new user the knowledge you need to create your own replication environment. One of the aspects of the book that jumped out at me that differentiates it from other references on replication is the coverage of security in replication and using the least privilege access paradigm. Security in replication with least privilege access isn't that easy, but he covers it extensively in Chapter 6 - The Publication Access List and uses it as the basis for the chapter on troubleshooting replication.

He walks through examples of setting up both transactional and merge replication with lots of screen shots and explanations of what each option the replication setup wizard's ask of you. All the replication agents are covered and their purpose is explained well including how security works for each. There is even good coverage on Push vs. Pull distribution agents and why you should choose one or the other. Replication Monitor use is covered along with how to setup alerts with it and caveat's on how easy it is to miss issues with Replication Monitor. By the end of the book, you will have an excellent foundation on implementing transactional or merge replication. Some of the advanced settings and configurations are not covered in the book like custom agent profiles, scripting, advanced troubleshooting by diving into distribution database, and how you can easily get into trouble with wizards creating immediate sync publications. I cover these advanced topics in my chapter "Taming Replication" in Tribal SQL (http://rd.gt/1befi7Y) also published by SimpleTalk publishing in October 2013.

Overall, I highly recommend this book for people wanting to implement replication for the first time and want more detail than books online and a chapter of a book like Tribal SQL. Once you get going with replication, you will want to turn to my chapter on “Taming Replication” for transactional replication, but you will need to turn to other resources for merge replication.

Cheers, Chuck Lathrope

05/04/2013 - SQL Replication Distribution Cleanup Job Blocking Problem

I have been having a real issue with Replication's Distribution Cleanup job on our dedicated distributor server. It prevents the subscribers from updating their history, and making all my custom reports look like everything is latent, when in reality it may or may not be latent. I created a job to stop the job if it has been blocking for more than 5 minutes with this bit of code:

DECLARE @binaryvalue BINARY(16)
SELECT @binaryvalue = CONVERT(BINARY(16), job_id)
FROM msdb.dbo.sysjobs (NOLOCK)
WHERE name = 'Distribution clean up: distribution'
IF EXISTS (
SELECT spid
FROM sys.sysprocesses
WHERE program_name = 'SQLAgent - TSQL JobStep (Job '+ sys.fn_varbintohexstr(@binaryvalue) + ' : Step 1)'
AND DATEDIFF(mi, login_time, GETDATE()) >= 5
AND blocked > 0 )
EXEC msdb.dbo.sp_stop_job 'Distribution clean up: distribution'

I hope it helps you too!

sqlreplication's People

Contributors

sqlguychuck avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.