Windows authentication for a SQL Server source¶
With Windows Security selected in the wizard, the agent connects as the Windows account the Stelo Capture services run as. The wizard runs in the SQDR Plus Jetty service and the agents in the SQDR Plus Launch Agent service, both Local System by default (see Services). Either:
- add the Stelo VM's computer account (
MYDOMAIN\MYSERVER$, whereMYDOMAINis the domain andMYSERVERthe Stelo VM's name) to SQL Server as a login, with the rights in Give the login its rights: Local System connects to another computer as this account; or - run the SQDR Plus Jetty and SQDR Plus Launch Agent services as a domain user with those rights. That user also needs to create Db2 databases on the Stelo VM (the staging databases) and full access to the Stelo Capture folders in ProgramData. See Run SQDR as a domain user.
Run SQDR as a domain user¶
Use this when the SQL Server source, and often the destination too, accept only Windows authentication and you can't add the server's computer account to SQL Server. One domain user then runs the Stelo Capture services and the Replicator Service, and connects to every SQL Server database:
- The user. The domain administrator creates the domain user, for example
MYDOMAIN\sqdr_svc, with a password that doesn't expire. Add it to the local Administrators group of the server where SQDR runs. -
SQL Server logins. The SQL Server administrator adds the domain user as a login on each SQL Server (Security › Logins) and, under User Mapping in the login's properties, gives it:
Database Roles Source db_owner, or the rights in Give the login its rightsDestination db_datareader,db_datawriteranddb_ddladmin(ordb_owner)SQDR control database, when it's on SQL Server db_owner -
Stelo Capture services. In Services, stop the Stelo Capture services, set them to log on as the domain user on the Log On tab, and start them again (see Stelo Capture services).
- The agent. In the Add Capture Agent wizard, select Windows Security (see Step 1: Database).
- The Replicator Service. Run it as the domain user: see Change the service account. For a SQL Server control database, the SQDR Configuration Tool can connect with Windows integrated security when you run it as the domain user.
- SQDR source and destination. In the Data Replicator Manager, choose Use Integrated Security for the source and the SQL Server destination (see Create a source).
Membership in the local Administrators group is also what lets the Stelo Capture services, once they run as the
domain user instead of Local System, create the staging databases in Db2: Db2 on Windows gives local administrators
SYSADM authority while SYSADM_GROUP isn't set (see
Why the Db2 user needs no authority).
Docker
Windows Security doesn't work in the Stelo Replicator container: the container runs Stelo Capture on Linux, and the agent's Windows authentication needs the SQL Server JDBC driver's Windows library, which only the Windows installer installs. Clear Windows Security in the wizard and use a SQL Server login.