Synchronizing a Transactional Replication Subscription From PowerShell

A customer asked me the other day for a sample of synchronizing a Replication subscription from PowerShell.  The scenario is that they are running SQL Express ondisconnected systems, and need to kick of a sync from the client.  SQL Express doesn’t have SQL Agent, so you need to have a custom program of some sort…

0

How to Generate Sequential GUIDs for SQL Server in .NET

There’s a Windows function to create sequential GUIDs, called UuidCreateSequential http://msdn.microsoft.com/en-us/library/windows/desktop/aa379322(v=vs.85).aspx But SQL Server uses a different sort order for GUIDs, and the results of UuidCreateSequential  are not sequential with respect to SQL Server’s sort order.  To make them sequential SQL Server’s internal NEWSEQUENTIALID function performs some byte shuffling on the GUID. NEWSEQUENTIALID http://msdn.microsoft.com/en-us/library/ms189786.aspx If…

7

Good Page Splits and Sequential GUID Key Generation

  It’s well-known that inserts using monotonically increasing key values at the end of an index minimize page splits, and that using a randomly generated key value causes lots of expensive page splits.  But a colleague and I were recently discussing what happens when you use monotonically increasing key values in the middle of an…

4

How to Add a Hostname Alias for a SQL Server Instance

A Hostname Alias SQL Server instance is a simple Hostname that allows clients to connect to an instance of SQL Server without specifying an instance name or a port number. They are very useful for upgrades, server migration, consolidation, and disaster recovery.  A network alias can redirect clients from one server to another. This is most…

22