This topic describes how to grant access to a database and a publication while setting up replication using Microsoft SQL Server Compact 3.5.
To configure database access in SQL Server 2005 and later versions
On the computer that is running SQL Server, click Start, point to Programs, point to Microsoft SQL Server, and then click SQL Server Management Studio.
In Object Explorer, expand the computer that contains the publication, expand Security, and then expand Logins.
Right-click Logins and choose New Login.
In the Authentication section, choose the authentication mode, and then provide the logon name under which the Merge Agent runs. If you are using SQL Server Authentication, you must also provide the password. If you are using Windows Authentication sure that Grant server access is selected.
Select the default database to which you are granting access, and then select the appropriate language.
Select the Database Access page.
In the list of databases, select the database from which the publication was created by selecting the check box in the Permit column.
Click OK to save your changes.
To grant access to the publication with SQL Server 2005 and later versions
On the computer that is running SQL Server, click Start, point to Programs, Microsoft SQL Server, and then click SQL Server Management Studio.
In Object Explorer, expand the computer that contains your publication, expand Replication, and then expand publications.
Right-click the publication name and choose Properties. In the Properties dialog box, click the Publication Access List page.
Click Add to add an account to the PAL. Add the user account under which the Merge Agent runs.