In this blog post you will learn how to completely configure your Dynamic User Directory.
1. When installing Dynamic User Directory did you receive an error like this:
“Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Incorrect syntax near '@LimitResults'. Incorrect syntax near '@LimitResults'. Incorrect syntax near '@LimitResults'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at”
The reason you received this error is likely because even though you are running on SQL Server 2005 higher the ‘SQL Server Compatibility Mode’ isn’t set to 90 or higher (2005 or higher). The steps below will set the compatibility mode to 2005 or higher and it will also regenerate the queries necessary:
Step 1.
Go to HOST -> SQL and run this query:
declare @dbname nvarchar(200)
set @dbname = (select db_name())
EXEC sp_dbcmptlevel @dbname, 90;
After you click ‘Execute’ Please go to Host, Host Settings and click ‘Restart Application’.
Step 2.
This opens a txt file with the next query.
Run this under HOST-> SQL
2. Verify the scheduled task was added by checking at HOST -> Scheduler. The reason the schedule needs to exist is for performance reasons. The Schedule uses a feature called PIVOT table which requires SQL Server 2005.
In DNN 5.4.4 it seems the scheduler for Dynamic User Directory isn't getting added. There's an easy fix for this case though. Go to HOST -> SQL and run this simple query to add the scheduler for Dynamic User Directory:
execute {objectQualifier}AddSchedule 'DataSprings.DNN.Modules.DynamicUserDirectory.DUDSchedulerClient, DataSprings.DNN.Modules.DynamicUserDirectory',60,'m',30,'m',25,'',1,1,'', NULL,0, 'Dynamic User Directory'
If you can't find the Schedule for your Dynamic User Directory module please refer to this post:
Click here to follow post
3. If you find the scheduler in this area then if they make changes to Dynamic User Directory the scheduler has to kick off before those changes are displayed. If your schedule is set for 60 minutes then the changes won't be displayed until 60 minutes.
In order to kick off the scheduler you can go to HOST -> Scheduler and click the edit icon(blue pencil)
and once in this menu it will look like this:
Then you will click the "Run Now" icon at the bottom left corner. This will start your scheduler for Dynamic User Directory.
NOTE: If you don’t see a Run Now you are running on an earlier version of DNN that doesn’t support that feature. You can simply change the time (example from 60 minutes to 59 minutes or 61 minutes) and this will kick the scheduler off right away.
4. You can click "History" to see if your scheduled task ran successfully. Go to Host -> Scheduler and find the Dynamic User Directory schedule and there will be an icon to the right. Please refer to the screenshot below if you have difficulty locating your "History":
When you click the "History Icon" it will take you to a page which shows you all of the history when the schedule is running. Please see the image below to see an example of a successful schedule.
5. If you add a profile property, the schedule task will only add this to your list of available tokens if at least one user has data in that profile field. For example: If you added a profile property called "Business Unit" and not one user had data for this profile property, then the token won't show up in your list.