![]() $rs = $conn.GetSchemaDataSet("DISCOVER_INSTANCES", $res)įrom SystemRestrictSchema($system. $conn = new-Object ("data source=localhost\sql08 initial catalog=Adventure Works DW") In Powershell you can call this with the following: ![]() The documentation on this function is not great and I'veĪsked a few people, but have not recieved any responses yet. I'm not sure if leaving the INSTANCE_NAME restriction as an empty string will return all the named instances or just the current instance (I only have the one named instance on my machine). Or you can issue the same thing as an XMLA query which should work in 2005. Select * from SystemRestrictSchema($system.Discover_Instances,INSTANCE_NAME='') In SSAS 2008 I think you can do something like the folllowing: Resource and server operations Install module - Az.AnalysisServices Documentation - Az. $ds.em(0).rows |Format-Table Cube_name, Last_data_update, last_schema_update, cube_type For server operations using Azure PowerShell cmdlets, your account or the account running scheduler must also belong to the Owner role for the resource in Azure role-based access control (Azure RBAC). $ds = $adomd.GetSchemaDataSet("MDSCHEMA_CUBES",$res) $res.Add("CATALOG_NAME","Adventure Works DW") > $null # get a list of cubes for the Adventure Works DW database ![]() $ds = $adomd.GetSchemaDataSet("DISCOVER_DATASOURCES",$null) #Get a list of data sources for the current DB $adomd = new-object ("data source=$srv initial catalog=$db") $db = "AdventureWorksDW2012Multidimensional-EE" ![]() only works with rowsets that return a flat set of "columns" - some datasets return a hierarchical xml document which can't easily be converted into a column based result.ģ) below is a PoSH example of calling GetSchemaDataSet with or without restrictions 2) you don't use the "SELECT * FROM $SYSTTEM." syntax with GetSchemaDataSet you just pass in the schema name or guid. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |