There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Ascmd.exe XMLA batch delimiter regex bug
I was running into issues trying to run an OLAP DB scripted out XMLA create (from management studio). The XMLA was valid and could be run fine in management studio, and AScmd would run simpler XMLA just fine.
It appears to be the "BatchRegex" pattern defined on line 316 in Ascmd.cs. It looks for "GO" statements within the xmla, however the pattern looked for any "go" text followed by a space. We had a dimension attribute of "Year
Ago Today", and the ascmd would try to split the xmla into batches, and truncate the large CREATE statement at "Year Ago".
I've changed the regex to include and end string token and this seems to fix the problem, however I don't understand the batching properly to know if this is an adequate fix:
My Chagne: const string BatchRegex = @"^[\w\W]*?[\r\n]*go\s$";
Create an olapdb/cube with a measure or dimension having "go" in the name, anything like "go time" or "year ago today" should work.
Script entire olap database as "CREATE" from Management studio
Try to run this create script to create the olapdb on a new server using Ascmd.exe.