Once you installed Primavera P6 API, follow the below steps to connect it with Primavera database at the remote location.
1. Go to the API Home, and double-click to execute the dbconfig.cmd file
2. Select your Database type on Database Configuration page (In this example I have “Microsoft SQL Server” )
3. Enter the Database connection parameters
4. Here, you can either select existing P6 configuration or can additional P6 configuration for API
5. You will get confirmation window once P6 configuration successfully created
6. Configure the Primavera administrator settings as below to use default RMI port to get connected to API server.
7. To check the connection between API & P6 Database, run andy Demo Java code provided in API Home.
8. Enter the Primavera Database server IP and Default RMI port 9099 (as configured in steps 6)
9. Enter P6 administrator username & password.
10. Select the Output file location and click Next to execute.
This is how to execute objects in Primavera database from P6 API.