none
An error occurred while scripting the catalogue RRS feed

  • Question

  • I am working on an Analysis Services Tabular project. When I tried to save it last time I got an error that it cannot be saved since it's in read-only. Tried to save a few times and kept getting same error. So I closed the project without saving, in order to resume from where I last left it.

    But when I opened the project again, I got that 'An error occured while opening the model' - 'an error occured while scripting the catalog'. Below is the full error code. Now I cannot open the model anymore. I did manage to retrieve the last deployed version from server and thus continue to work on it, but would like to know how I could fix this error.

    ============================
    Error Message:
    ============================

    An internal error has occured.
    ----------------------------
    An error occurred while scripting the catalog. An internal error has occured.
    ----------------------------
    An error occurred while opening the model. Click Details for more information.

    ============================
    Call Stack:
    ============================

    at Microsoft.AnalysisServices.Tabular.ObjectLinkBase`2.ResolveById(Dictionary`2 objectMap, Boolean throwIfCantResolve)
    at Microsoft.AnalysisServices.Tabular.ColumnPermission.ResolveLinks(Dictionary`2 objectMap, Boolean throwIfCantResolve)
    at Microsoft.AnalysisServices.Tabular.DdlUtil.LoadObjectsFromSchema(DataSet schema, ObjectType[] types, Dictionary`2& objectMap, StringComparerInfo comparerInfo)
    at Microsoft.AnalysisServices.Tabular.DdlUtil.LoadModelFromSchema(DataSet schema, ObjectType[] objectTypes, Dictionary`2& objectMap, StringComparerInfo comparerInfo)
    at Microsoft.AnalysisServices.Tabular.DdlUtil.DiscoverModel(Database db)
    at Microsoft.AnalysisServices.Database.LoadModel()
    at Microsoft.AnalysisServices.Database.OnAfterRefresh(Boolean full, Nullable`1 refreshType)
    at Microsoft.AnalysisServices.MajorObject.Refresh(Boolean full)
    at Microsoft.AnalysisServices.BackEnd.DataModelingServer.<GetSerializedDatabaseContent>b__0(Database x)
    at Microsoft.AnalysisServices.BackEnd.Helpers.DatabaseExtensions.ExecuteWithRetry(Database database, Server owningServer, Action`1 action)
    at Microsoft.AnalysisServices.BackEnd.DataModelingServer.GetSerializedDatabaseContent(String databaseName, Boolean modifyDatabaseInfo, Boolean skipRefresh)
    ----------------------------
    at Microsoft.AnalysisServices.BackEnd.DataModelingServer.GetSerializedDatabaseContent(String databaseName, Boolean modifyDatabaseInfo, Boolean skipRefresh)
    at Microsoft.AnalysisServices.VSHost.VSHostManager.IsWorkspaceDbReadyForModel(String modelFilePath, String databaseName)
    at Microsoft.AnalysisServices.VSHost.VSHostManager.HandleExistingProject(Boolean isImported, Boolean& isRefreshNeeded)
    at Microsoft.AnalysisServices.VSHost.VSHostManager.PrepareSandbox(Boolean newProject, Boolean& isRefreshNeeded, Boolean& isImpersonationChanged, Boolean& saveRequired, List`1& truncatedTables, Boolean isRealTimeMode, Int32 clientCompatibilityLevel)
    ----------------------------
    at Microsoft.AnalysisServices.VSHost.VSHostManager.PrepareSandbox(Boolean newProject, Boolean& isRefreshNeeded, Boolean& isImpersonationChanged, Boolean& saveRequired, List`1& truncatedTables, Boolean isRealTimeMode, Int32 clientCompatibilityLevel)
    at Microsoft.AnalysisServices.VSHost.Integration.EditorFactory.CreateEditorInstance(UInt32 grfCreateDoc, String pszMkDocument, String pszPhysicalView, IVsHierarchy pvHier, UInt32 itemid, IntPtr punkDocDataExisting, IntPtr& ppunkDocView, IntPtr& ppunkDocData, String& pbstrEditorCaption, Guid& pguidCmdUI, Int32& pgrfCDW)

    ============================

    • Edited by Luiza Oancea Monday, June 11, 2018 8:26 AM Give more explanations
    Monday, June 11, 2018 8:24 AM

All replies

  • This just happened for the second time! :( Since I couldn't wait for an answer to fix the previous project, I imported the latest deployed version from the server. I was working with this model for a few hours, saving and deploying it regularly as to avoid new crashing issues. But suddenly VS crashed and reopened and on reopening, the project gave me the same error as above. What are the last steps I did before the crash? Well, I renamed in Power Query the columns on one of the tables and reordered them. Power Query accepted this and didn't give me any error. The table has originally been created a few days ago and been deployed a few times, new columns were merged into it from other tables, new columns were created. Looking back, I think that the previous crash also happened after renaming the columns in that table.
    Monday, June 11, 2018 10:08 AM
  • Have been testing it some more, and yes, the error seems to show up when saving or deploying after I have renamed a column. 

    I have been previously renaming columns in other tables, and didn't get this error. But it seems right now, when I am renaming in Power Query, it accepts my changes but when saving the file I get An error occurred while scripting the catalog. An internal error has occured. and then the project cannot be opened anymore. 

    Monday, June 11, 2018 11:13 AM
  • We have the same issue in our company. I think it's related to the size of the cube, since it doesn't happen to my 'proof on concept' small cubes.

    We work around this by never renaming or deleting columns. Just hiding them from client tools. And only add new columns.

    Updating to the newest VS2017 (15.8.0) and SSDT plugins does not change anything either. I'll be following this thread and hope someone might provide us a solution. 

    Wednesday, August 15, 2018 11:52 AM
  • I have been able to remove a couple of columns from a measure table. I did this by opening the tabular workspace at the server and scripting the table as "Create or Replace to". 

    Lookup the columns to remove and edit the XMLA file accordingly. I got a meaningful error while I tried to execute, namely "perspective is still using this column". So I went back to Visual Studio and removed the columns from the mentioned perspectives. The XMLA script executed afterwards, removing the columns!

    Unfortunately I have not yet been able to reproduce this. Trying to remove another column I scripted the entire database to see references, calculated columns, measures, roles, partition definitions etc. that might be referencing the column I wanted to delete. But it didn't work anymore. It might be that the ordinality/order of the columns is also important, since in the XMLA script they are all numbered in sequence. But this also did not lead to a deleteable column.

    It's interesting to try things and learn how it works. But very weird so few people seem to encounter this issue? Did you gain any knowledge so far Luiza?

    I also tried integrated workspace mode (sort of localhost ssas express). But that did not change a thing. 

    Tuesday, September 18, 2018 11:33 AM
  • HI all, the same problem which I am facing 3-4 times, still do not know what is reason to see such error which Luiza is facing.Just now remember that I deleted one column from dev branch when switching to test branch VS asked me to save your saving on your local workstation, I pressed not save button, then when to check out test branch i faced same error.I have never find out what is reason for that:((( only way to solve it now need to connect to server and download project again and process some tables to work over that which is very annoying:((((

    Please if somebody has good solution for such kind of issue or know not to face such kind of issues what actions should be done not facing such surprises....

     Looking forward to help from more experience SSAS guru guys.............

    Monday, January 7, 2019 3:23 PM
  • Dear Luiza, did you figure out what is the cause for such kind of issue?

    Would be nice to hearing by your side.

    Monday, January 7, 2019 3:24 PM
  • I encountered this exact error, and, amazingly (considering the completely unhelpful error messages), I found a solution that worked for me. Hopefully it will work for everyone else if/when they have the same problem again.

    Navigate to the folder that holds the .sln file for your project and delete the bin\ folder (Depending on how you created your project, the bin folder may be deeper in the directory).

    Now open the solution in Visual Studio again, and you'll notice that it reconstructs the bin\ folder. This time, however, try to open the .bim file in Visual Studio, and it should give you an error message; except, this time it should be descriptive and actually useful (it was for me, at least; apparently I had deleted a column that was being referenced in permissions, and that did not translate to removing the reference from those security settings...).

    To resolve this problem, open the .bim in a text editor and do a CTRL+F for what the afore-mentioned error message said was causing the error. Remove the XML that is creating/referencing the source of the issue, save, and attempt to open the .bim again. It should continue to give you helpful error messages until all are resolved and .bim successfully opens.

    Hope this solves the issue!

    Tuesday, June 11, 2019 3:15 PM
  • Thanks to Morak.Izaac (and other posters) for taking the time to put in your solution. After having successfully pulled out my hair at this one I used your suggestion and it worked perfectly for me. Turned out I was deleting a column used in a hierarchy.

    Tuesday, September 17, 2019 4:23 AM