Here the problem I faced: AS user query via Excel, have a connection string in this instance AS without specifying the database (Keyword Catalog absent from the connection string : to avoid). After several hours of use, they realize that their numbers are not good and for good reason. The day before, new versions of their databases had been delivered in an order that, I do not know why, has changed the basis called default. Suddenly, their requests were attacking the wrong database (the Catalog is not specified, the default database is used).
My question: how determine the base that is used by default by our body? In SQL, a query such Exec sp_defaultdb @ loginame = 'monLogin', @ defdb = 'mydb' can change this setting easily. I have not found the equivalent on SSAS, in any case not in 2005 (I have not watched for 2008 and 2008R2).
Digging a little in the xml files of AS, I found the solution. Each database has a file called "reference" for the entire proceeding. The name of this file is of the form NomDeMaBaseAS.db.xml. It contains between another name and ID of the database, the parameters of translation, annotations, etc.. It also contains a property that is called Ordinal, and which specifically states that the square of the database among the other via a number. If the ordinal is 0, this basis will be the first, 1 second and so on. The base with the smallest ordinal which will be considered the default. So just arrange for the database you want to set as the default has the smallest ordinal. Tedious when there are many database (a little trick to avoid having to through all the files to find the smallest ordinal is to give a negative value to the ordinal of the default database: it works). That is why if ever you know of another solution, I'm interested. Other details, I do not know how these are determined ordinals during deployment.
My question: how determine the base that is used by default by our body? In SQL, a query such Exec sp_defaultdb @ loginame = 'monLogin', @ defdb = 'mydb' can change this setting easily. I have not found the equivalent on SSAS, in any case not in 2005 (I have not watched for 2008 and 2008R2).
Digging a little in the xml files of AS, I found the solution. Each database has a file called "reference" for the entire proceeding. The name of this file is of the form NomDeMaBaseAS.db.xml. It contains between another name and ID of the database, the parameters of translation, annotations, etc.. It also contains a property that is called Ordinal, and which specifically states that the square of the database among the other via a number. If the ordinal is 0, this basis will be the first, 1 second and so on. The base with the smallest ordinal which will be considered the default. So just arrange for the database you want to set as the default has the smallest ordinal. Tedious when there are many database (a little trick to avoid having to through all the files to find the smallest ordinal is to give a negative value to the ordinal of the default database: it works). That is why if ever you know of another solution, I'm interested. Other details, I do not know how these are determined ordinals during deployment.