Share via


How to: Create a Publication and Define Articles (SQL Server Management Studio)

Create publications and define articles with the New Publication Wizard. After a publication is created, view and modify publication properties in the Publication Properties - <Publication> dialog box. For information about creating a publication from an Oracle database, see How to: Create a Publication from an Oracle Database (SQL Server Management Studio).

Note

Publication and article names cannot include any of the following characters: % , * , [ , ] , | , : , " , ? , ' , \ , / , < , >. If objects in the database include any of these characters and you want to replicate them, you must specify an article name that is different from the object name in the Article Properties - <Article> dialog box, which is available from the Articles page in the wizard.

To create a publication and define articles

  1. Connect to the Publisher in Microsoft SQL Server Management Studio, and then expand the server node.

  2. Expand the Replication folder, and then right-click the Local Publications folder.

  3. Click New Publication.

  4. Follow the pages in the New Publication Wizard to:

    • Specify a Distributor if distribution has not been configured on the server. For more information about configuring distribution, see How to: Configure Publishing and Distribution (SQL Server Management Studio).

      If you specify on the Distributor page that the Publisher server will act as its own Distributor (a local Distributor), and the server is not configured as a Distributor, the New Publication Wizard will configure the server. You will specify a default snapshot folder for the Distributor on the Snapshot Folder page. The snapshot folder is simply a directory that you have designated as a share; agents that read from and write to this folder must have sufficient permissions to access it. For more information about securing the folder appropriately, see Securing the Snapshot Folder.

      If you specify that another server should act as the Distributor, you must enter a password on the Administrative Password page for connections made from the Publisher to the Distributor. This password must match the password specified when the Publisher was enabled at the remote Distributor.

      For more information, see Configuring Distribution.

    • Choose a publication database.

    • Select a publication type. For more information, see Types of Replication Overview.

    • Specify data and database objects to publish; optionally filter columns from table articles, and set article properties.

    • Optionally filter rows from table articles. For more information, see Filtering Published Data.

    • Set the Snapshot Agent schedule.

    • Specify the credentials under which the following replication agents run and make connections:

      - Snapshot Agent for all publications.

      - Log Reader Agent for all transactional publications.

      - Queue Reader Agent for transactional publications that allow updating subscriptions.

      For more information, see Replication Agent Security Model and Replication Security Best Practices.

    • Optionally script the publication. For more information, see Scripting Replication.

    • Specify a name for the publication.