Free Newsletters:
DatabaseJournal  
DBANews
Search Database Journal:
 
HOME News MS SQL Oracle DB2 Access MySQL PostgreSQL PHP SQL Etc Scripts Links Discussion
internet.com

» HOME
» NEWS
» FEATURES
» SERIES
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Products
Scripts
Links
» DISCUSSION
» TECH JOBS

Marketplace Partners
Be a Marketplace Partner




internet.commerce
Be a Commerce Partner
Home Improvement
Memory Upgrades
Boat Donations
Condos For Sale
GPS Devices
Web Design
Imprinted Promotions
Calling Cards
Online Education
Laptops
Domain registration
Find Software
Build a Server Rack
Promote Your Website




MySpace Joins eBay, Yahoo in Open Profile Push

News Corp. Unit Under Fire for Ties to Hacker

Are Non-PC Devices Hurting 'Net Innovation?

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Linked Data Planet Conference & Expo

CA ERwin® Data Modeler Proven database design and modeling. Efficiently analyze, design and deploy effective database solutions. Whitepaper: Manage SQL Server Deployments
Try it free: CA ERwin® Data Modeler


Guide to Oracle 11g and Database Migration
Oracle Database 11g includes more features for self-management and automation, which makes it easier for customers to cost-effectively manage their data. Download this Internet.com eBook for an overview of some of the new features in 11g and for an overview of the issues you need to consider as you prepare for a database migration. »
Innovate Faster with Oracle Database 11g
Read this in-depth analysis of 56 customers, which shows significant differences between the value software vendors Oracle and SAP deliver to midsize companies. »
Oracle Business Intelligence Standard Edition One
Find out how Newport Beach, CA-based Mobilitie is shaking up the telecom industry by leveraging technology to provide an entirely different financial model for deploying, upgrading, and owning wireless and wireline network assets. »
Business Intelligence and Enterprise Performance Management: Trends for Emerging Businesses
Quickly implementing an ERP software solution can be of tremendous benefit; however, companies often struggle to balance the benefits of reducing implementation time and cost with the risks of an accelerated deployment. Read this white paper to learn about easy-to-follow best practices for achieving a successful accelerated implementation. »
Making the Case for Oracle Database on Windows
Users benefit as vendors reduce enterprise complexity and deliver integration. »
Related Articles
SQL Server 2005 Express Edition - Part 21 - Using Replication Management Objects
SQL Server 2005 Express Edition - Part 20 - Authenticating Merge Web Synchronization
SQL Server 2005 Express Edition - Part 19 - Authenticating Merge Web Synchronization
SQL Server 2005 Express Edition - Part 10

Production Manager (hands on)
Aquent
US-MA-Cambridge

Justtechjobs.com Post A Job | Post A Resume
MS SQL
March 11, 2008
SQL Server 2005 Express Edition - Part 18 - Merge Web Synchronization Setup
By Marcin Policht

In the previous installment of our series presenting an overview of SQL Server 2005 Express Edition characteristics, we have described a scenario that can be used to utilize its limited replication capabilities. The underlying concept, called Web Synchronization, facilitates merge replication, in which remote subscribers exchange data with a publisher via HTTPS protocol (allowing implementations across potentially unreliable or insecure TCP/IP networks). Our sample configuration involved communication between clients running SQL Server 2005 Express Edition and a central instance of SQL Server 2005 Enterprise Edition, with a Web server hosting IIS component serving as an intermediary, authenticating client connections as well as decrypting incoming messages, translating them from XML to binary format, and forwarding to the publisher (and reversing these actions when relaying updates back to subscribers). In order to demonstrate this process in the most concise manner, we have made a few simplifying assumptions, which, depending on circumstances, might not apply. For the sake of the completeness, we will review additional, more complex configuration settings.

As we have pointed out earlier, the ability to secure HTTP traffic between remote clients and an IIS server relies on a digital certificate associated with a target Web site. To obtain it, it is necessary to create a request that is submitted to a Certificate Authority. Once its processing is successfully completed, the resulting certificate is imported into the Web site (note that subscribers need to trust the Certificate Authority in order to accept certificates it issued, which can be accomplished by installing its own certificate in the Trusted Root Certificate Authority node of their local certificate stores). There are three basic methods of implementing this procedure:

  • submit an online request to a Certificate Authority using "Send the request immediately to an online certificate authority" option of IIS Certificate Wizard (invoked via the Server Certificate... command button on the Directory Security tab of the target Web Site Properties dialog box). Providing that the CA is accessible and configured (via its policy module) to automatically issue a certificate, its installation will be performed during the final stage of the wizard. This is the simplest way of handling this task and the one that we have described previously.
  • submit an offline request to a Certificate Authority using the "Prepare the request now, but send it later" option of the IIS Certificate Wizard. While you will be prompted to provide the same information as in the first case (with the online approach), your settings will be stored in a certificate file (saved to an arbitrary location specified on the Certificate Request File Name page), which you can submit to a CA once that becomes available.
  • In the case of a Windows-based Public Key Infrastructure, you can use the Certificate Services Web site (accessible typically via http://CAServerFQDN/certsrv, where CAServerFQDN designates the fully qualified domain name of the computer hosting Certificate Authority) for this purpose. On its initial page, select the "Request a certificate" link, followed by "advanced certificate request". Next, click on "Submit a certificate request by using a base-64-encoded CMC or PKCS #10 file, or submit a renewal request by using a base-64-encoded PKCS #7 file" entry. The "Browse for a file to insert" option appearing in the Saved Request section will allow you to point to the request file you created earlier (alternatively, you can open it in Notepad and paste its entire content directly into the textbox on the page). In the Certificate Template section, select the Web Server entry and click on the Submit command button. Assuming that the CA policy module is configured for immediate processing, you will be able to download the resulting certificate in either DER encoded or Base 64 encoded format once you reach the next Web page. (Otherwise, you will need to connect to the Certificate Authority via the management console and accept the appropriate entry in the Pending Requests folder in order to issue the certificate). Pick the desired format and specify the download location, saving the file with an arbitrary name (or certnew.cer default).

    Return to the Directory Security tab on the Web Site Properties dialog box and click on the Server Certificate command button. This will invoke the IIS Certificate Wizard, prompting you whether to delete the pending request or process it and install the certificate. Choose the latter and provide ther location of the certificate file. Next, specify the SSL port that the site will be using, review and verify settings on the Certificate Summary page, and click on the Finish command button to assign them.

  • submit a request to Certificate Authority without using the Web Certificate Wizard. This can be done by employing the Certificate Services Web site-based process. Start by connecting to http://CAServerFQDN/certsrv, choose the link labeled "Request a certificate" on the initial page, followed by "advanced certificate request" and "Create and submit a request to this CA". This will trigger a display of the Advanced Certificate Request form. Pick the Web Server entry in the Certificate Template listbox and populate the Identifying Information, Key Options, and Additional Options sections with the appropriate values (matching the ones you entered via the IIS Certificate Wizard). Once you have completed this step, click on the Submit command button to deliver your request to the Certificate Authority. Assuming that the CA policy module allows for automatic processing, you will be able to install the corresponding certificate in the local certificate store (otherwise you will have to approve the request via the Certificate Authority management console and download it manually), and import it afterwards into the target Web site using the "Assign an existing certificate" option in the IIS Certificate Wizard.

Another factor that you should keep in mind when planning implementation of Web Synchronization for merge subscriptions is the location and mode of operation of your remote clients. In our initial demonstration, we have conveniently assumed that subscriptions already have been set up prior to running REPLMERG.EXE for the first time (which implies that our subscriber had direct access to the publisher), however you might have to deal with scenarios, in which this is not the case. While creating a subscription in the manner we described earlier (via New Subscription Wizard from SQL Server Management Studio Express interface) is not possible without direct RPC-based connectivity between replication partners (which applies to remote, Internet-based clients), there are alternative methods of accomplishing this goal. One of them (which we will describe here) involves sp_addmergesubscription and sp_addmergepullsubscription replication stored procedures (on the publisher and subscribers, respectively). Providing that the merge publication based on the SalesTaxRate(Sales) table in AdventureWorks database already exists on the distributor/publisher located on the default SQL Server 2005 Enterprise Edition instance hosted on the computer ALPHA, and that our SQL Server 2005 Express Edition-based subscription database called AdventureWorksRepl resides on computer OMEGA, you would start by executing the following on ALPHA (which generates a pull subscription entry):

DECLARE @publication AS sysname;
DECLARE @subscriber AS sysname;
DECLARE @subscriptionDB AS sysname;
DECLARE @hostname AS sysname;
SET @publication = N'SalesTaxRate(Sales)';
SET @subscriber = N'OMEGA\SQLEXPRESS';
SET @subscriptionDB = N'AdventureWorksRepl'; 
SET @hostname = N'OMEGA'
USE [AdventureWorks]
EXEC sp_addmergesubscription 
  @publication = @publication, 
  @subscriber = @subscriber, 
  @subscriber_db = @subscriptionDB, 
  @subscription_type = N'pull',
  @hostname = @hostname;

Keep in mind that, as before, you need to perform additional steps to enable Web synchronization of this publication, including successfully completing the Web Synchronization wizard resulting in the creation of its virtual directory, as well as adding a URL pointing to the replisapi.dll in the FTP Snapshot and Internet section of its Properties dialog box (for details regarding this procedure, refer to our previous article). Next, apply sp_addmergepullsubscription stored procedure to the subscriber in order to create the corresponding entry in its Local Subscriptions folder by running the T-SQL code listed below:

DECLARE @publisher AS sysname;
DECLARE @publication AS sysname;
DECLARE @publisher_db AS sysname;
SET @publisher = N'ALPHA';
SET @publication = N'SalesTaxRate(Sales)';
SET @publisher_db = N'AdventureWorks';
USE [AdventureWorksRepl]
EXEC sp_addmergepullsubscription 
 @publisher = @publisher, 
 @publication = @publication, 
 @publisher_db = @publisher_db;

At this point, you should be able to trigger synchronization using the REPLMERG.EXE utility (residing in the Program Files\Microsoft SQL Server\90\COM folder) in the same manner as described earlier. Note, however, that the syntax we used leverages Basic authentication to validate credentials of the user connecting to the Web Server (which, in turn, are relayed to the SQL Server 2005-based distributor/publisher). In the next installment of our series, we will describe other authentication mechanisms that can be employed in this arrangement.

» See All Articles by Columnist Marcin Policht

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

MS SQL Archives

Webcast: Five Virtualization Trends to Watch. Produced for HP, Citrix, and Intel.
Download: SQL Compare Pro 6--The fastest, easiest way to compare and synchronize two databases.
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers. Sponsored by HP, Citrix, and Intel.
Data Sheet: IBM Information Server Blade
Learn about expanding business opportunities for the reseller channel. Visit IT Channel Planet.


Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
How To Transfer Access Data Records To SQL ?? ankurdjariwala 1 May 8th, 12:24 PM
problem with federated server linking majidkhan 1 April 29th, 10:00 AM
"SELECT rowguidcol" from tables on linked servers? brentbordelon 1 April 25th, 04:12 PM
"SELECT rowguidcol" vs. "SELECT <actual name>" rgarrison 9 April 16th, 03:46 PM







JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Win Server ‘08
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES