Incorrect Syntax near ': '

May 26, 2009 at 8:49 PM
Edited May 26, 2009 at 9:24 PM

I'm having some issues running the scripts. When I first tried the EPM_Create_Database_Table.sql script I got the error but I was able to go into sqlcmd and run it that way.

The XML Indexes didn't create properly so I copied that code over and ran it in analyzer and it worked. Now I'm trying to run CMS_1_Setup_Management_Server_Tables.sql and I'm running into the same issue, only this time I can't get it going in sqlcmd.

Here's the error out of analyzer:

Msg 102, Level 15, State 1, Line 13
Incorrect syntax near ':'.
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ':'.
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '$'.
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near '$'.

Edited to add SQL Version : 10.0.1600

May 27, 2009 at 2:10 PM

Hello Jason.  All scripts are designed to run in SQLCMD.  You can bring the scripts into Management Studio and choose to run them in SQLCMD mode: On the file menu, select Query>SQLCMD mode.  You will need to change the variables to connect to your instance and database.  The instance must be SQL Server 2008, and it is best if this is also the Central Management Server and the instance where the policies are stored. 

Keep in mind that the CMS_... scripts are not necessary for the EPM framework.  These are considered "helper" scripts, and are simply to support loading a large number of instances and groups to a Central Management Server.  If you have already loaded these to the CMS, you will not need to execute these scripts or create the table objects.  Remember that the framework and the CMS... scripts do not support nested groups in the CMS, which is not always a real-life representation of how you will want to create the groups.  Do note: a new version of the framework is coming very soon - and the new version of the framework will support nested groups. 

All of this informaiton is also available in the supporting documentation available on this site.  I recommend reviewing the documentation as it will help you understand how to set up the infrastructure, and any dependencies on the physical implementation.

Thanks for your feedback!