Microsoft KB Archive/829746

= PRB: You Cannot Create a Replication Publication If an Article Name Contains a Special Character =

Article ID: 829746

Article Last Modified on 4/19/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



SYMPTOMS
When you try to create a new replication publication that includes a table or a stored procedure whose name contains a special character, the publication creation may not be successful, or the publication may be created without the article that contains the special character. For example, the following special characters may cause this problem:
 * &quot;
 * &quot;
 * &quot;
 * &quot;
 * &quot;
 * &quot;
 * &quot;
 * &quot;
 * &quot;
 * &quot;

If you use SQL Server Enterprise Manager to create the publication, you may receive the following error message:

SQL Server Enterprise Manager could not create article '< >' based on object '< >'.

Do you want to continue saving other changes to the publication?

Error 15006: '< >' is not a valid name because it contains invalid characters.

Note If you click Yes in the message box, the publication is created. However, the article for the object whose name contains the special character is not available in the list of articles in the publication.

If you use the sp_addarticle system stored procedure to add an article whose name contains a special character, the article may not be added, and you may receive the following error message:

Server: Msg 15006, Level 16, State 1, Procedure sp_MSreplcheck_name, Line 49 '' is not a valid name because it contains invalid characters.



CAUSE
This problem occurs because Microsoft SQL Server 2000 does not permit the special characters that are mentioned in the &quot;Symptoms&quot; section of this article to be included in the article name of a replication publication.



WORKAROUND
To work around this problem, remove the special characters from the default article name that is provided by SQL Server 2000. To do so, use one of the following methods:

Method 1
If you use the Create Publication Wizard in SQL Server Enterprise Manager, follow these steps:
 * 1) Open SQL Server Enterprise Manager.
 * 2) Expand SQL Server Group, and then click your instance of SQL Server.
 * 3) On the Tools menu, point to Replication, and then click Create and Manage Publications.
 * 4) In the Create and Manage Publications on < > dialog box, click Create Publication.
 * 5) Click Next.
 * 6) In the Choose Publication Database dialog box, click your test database in the Databases list.
 * 7) In the Select Publication Type dialog box, accept the default option, and then click Next.
 * 8) In the Specify Subscriber Types dialog box, click Next.
 * 9) In the Specify Articles dialog box, click the object type, Tables or Stored Procedures, or both, in the Object Type list.
 * 10) In the Objects List box, click the object that you want to include in the publication.
 * 11) Click the ellipsis button next to the selected object.
 * 12) In the Table/Stored Procedure Article Properties - < > dialog box, click the General tab.
 * 13) In the Name text box, remove the special characters from the article name.
 * 14) Click OK.
 * 15) In the Specify Articles dialog box, click Next.
 * 16) Follow the instructions in the Create Publication Wizard to finish creating the new publication.

Method 2
If you use the sp_addarticle system stored procedure to add an article to an existing publication, provide an article name that does not contains a special character. You can do so by using the @article parameter of the sp_addarticle system stored procedure.



Steps to Reproduce the Problem
To reproduce the problem, follow these steps:   Using SQL Query Analyzer, run the following Transact-SQL statement on your SQL Server test database: CREATE TABLE [sample*table] (col1 int)  Open SQL Server Enterprise Manager. Expand SQL Server Group, and then click your instance of SQL Server. On the Tools menu, point to Replication, and then click Create and Manage Publications. In the Create and Manage Publications on < > dialog box, click Create Publication. Click Next.</li> In the Choose Publication Database dialog box, select your test database from the Databases list.</li> In the Select Publication Type dialog box, accept the default option, and then click Next.</li> In the Specify Subscriber Types dialog box, click Next.</li> In the Specify Articles dialog box, click Tables in the Object Type list.</li> In the Objects List box, click the sample*table object.</li> Click Next.</li> In the Select Publication Name and Description dialog box, click Next.</li> In the Customize the Properties of the Publication dialog box, click the No, create the publication as specified option, and then click Next.</li> In the Completing the Create Publication Wizard dialog box, click Finish.

Note You may receive one of the error messages that are mentioned in the &quot;Symptoms&quot; section of this article.</li></ol>

<div class="references_section">