AD Connect has two database options, which is either an existing SQL Server or the most used, which is installed by default when using the Express Install of AD Connect, which is the Microsoft SQL Express Database.
If you have a large environment with a lot of objects, then the SQL Express is not for you and you should consider using a SQL server.
The SQL Express is fine, but is has a limitation, which is a size limit of 10 GB.
For most organizations, the local database option (the default SQL Express) is quite enough, but the database contains historic data and will grow over time. You could also have gotten a warning during an AD Connect upgrade, that your database in near the 10 GB limit:
So how do we check how much data actually is in our AD Connect database. One method is described here using the sqlcmd.exe.
On the server running AD Connect, go to command prompt and run the following commands:
"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SqlLocalDB.exe" info .\ADSync
This command shows you the information about the local AD Sync database instance, such as:
Next we connect to the instance using the instance pipe name from our last command, in my case, it is:
"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SQLCMD.EXE" -S "np:\\.\pipe\LOCALDB#SHDDF17A\tsql\query" -Q "sp_helpdb ADSync;" > C:\Temp\ADSyncDBSize.txt
Dumping the result to the file: c:\temp\ADSyncDBSize.txt
The result of the file
In my scenario, the data in the Local database in near the 10GB. So this database will need to be shrink, this is described in another blog post.
Hope you find the information useful to document the actual database size of your AD Connect SQL Express database.