I'm creating an SSAS cube and I would like to provide friendly names for dimensions, measures, KPIs etc.. So, I created all transactions for all properties in Visual Studio Data Tools.
When I browse my cube in Visual Studio it works well, all properties are translated.
However, if I launch PowerPivot for Excel and trying to import data, no property is translated, It gives me strange names such as [Dimension Name] [Hierachy Name] etc.
Any idea to provide friendly translaed names in Excel ?
You can try the following:
On the Table Import Wizard, where you setup your connection to the SSAS click Advanced.
Change the Locale Identifier setting to the preferred locale.
You can find the locale Ids here, in order to find the Id of the language you used at the translations you made at the cube.
Related
Hey I'm pretty new to databases and I want to create a diagram of the db I'm using with dbdiagram.io so that I can't understand the relationships better. What sort of script/file am I supposed to use to import the schema from sql server? I'm currently using azure data studio to query the database. I would prefer not to have to write out all the tables by hand.
Based on the docs and the DBML language, you need to generate a DBML script in the following format from your RDBMS of choice - in this case, SQL Server:
Table Users {
UserID integer [pk]
}
Table Posts {
PostID integer [pk]
UserID integer [ref: > Users.UserID] // many-to-one
}
Note that this DBML output is not intended to run on your RDBMS, SQL Server or otherwise - those platforms don't understand DBML. It is an example of output you need to generate from your RDBMS that you can paste directly into the left editor pane on dbdiagram.io, as demonstrated here.
This more complicated example - which uses DBML to build a diagram from SQL Server based on a subset of the tables in Stack Exchange Data Explorer (and which I described here) - took about 40 seconds to create.
You can build this syntax from a set of tables without having to hard-code each one using catalog views like sys.tables and sys.columns, but there are a lot of little things that you'll have to do to make it compatible with this web site, and that will be a project all its own. Basically, nothing in SQL Server exists to generate nice, tidy DBML for you.
If you don't want to use DBML but would rather use the Import feature on the web site, then you can generate traditional DDL scripts instead - from SQL Server, you can do this by right-clicking the database in SSMS / Object Explorer and using Script Database as > CREATE To. Azure Data Studio doesn't yet have this functionality, but you can use an extension.
I am using Visual Studio 2017.
Functionality - Open Visual Studio - Go to Tools - Click SQL Server -
New Data Comparison
After mentioning source and target database and running the tool, I get results -
(Different Records, Identical Records)
Is there a way to export this data result to Excel?
Harshit Virdi has noted he has access to Microsoft SQL Management Studio. There are two easy ways I know of to export results into Excel:
Option 1 the "right click on your results" option:
Run your query like normal in Microsoft SQL Management Studio. Then right click on the results like this:
.
Choose "Save Results As..." and if you pick CSV (comma separated value) you'll be able to open that in Excel.
Option 2 would be to Export from a table or view directly. Right click on the database (not the table) you want to export from, choose tasks, and Export Data...:
A wizard will appear (ha!)
Choose your Data Source (SQL Native Client)
Pick your server and database
Choose your Destination
Select Excel, and pick a path. I keep it at Excel Version 97-2003 but you can try different ones
Now you can choose to either write a query or pick a table, the choice is yours!
Hit next and finish it up and boom, you have your data in Excel.
The export data wizard is rather powerful, you can also transfer data between servers very fast and easily. It's a tool worth learning more about. You may have noticed on the last steps of the wizard you can save your 'code' as an SSIS package. That way you could run the same export again, or automate it. However that goes beyond the scope of this question. Good luck!
In my database, I have a column called "Names". I imported my database onto visual studio, and using Visual Basic, I want to be able to import all of the elements of the column "Names" into a combo-box called "rec", but I can't figure it out.
I'm only 16 and new at this, so please be kind.
If it's Excel to vb. Just cut from Excel and paste into the database. Make sure it's the same data type. I did this with baseball stats for an entire season and it worked.
I am looking at a sql server database for a tfs 2010 install and I am trying to find bugs/files logged by date.
Is this information contained in the database?
I see other information such as a view named WorkItemChanges which shows all the stories that have been changed by date.
* Directly querying the collection database is unsupported *
The Tfs{YourProjectCollection} database contains all work items for a specific project collection. They live in the different Work Item tables, since a bug is a specific type of work item.
If your TFS environment is configured for reporting using Report Server, then you can use the Analysis cube or the TFSWarehouse databases to query this kind of information. For work items, a limited set of fields is stored and the same goes for files in source control. You should at least be able to find out which have changed. The following doc describes the warehouse structure: Creating, Customizing and Managing reports for Visual Studio ALM. A quick way to get started is from the Excel Powerpivot reports which are installed to your team project by default if your TFS instance is connected to a Sharepoint server with teh appropriate features enabled.
* You have a number of alternatives *
I suppose that your Visual Studio is currently working, if that's the case then there is no need to use a SQL query to get to the information you're after.
To query all bugs (or other work item types) that have changed between two dates, create a work item query (in Visual Studio) that looks like this:
You can import these into Excel for easy manipulation or further aggregation. And you can even quickly create a Report from that. More information can be found in the Bulk Add or Modify work items in Excel.
To query all files changed between a specific date range, is a little harder. You can quickly get all changesets between two dates using the commandline using tf history $/Project /collection:yourprojectcollectionUri /recursive /version"D2012-10-10~D2013-10-10" this will popup window with all changesets between these dates. You can specify /noprompt /format:detailed to dump all details to the command prompt window.
Alternatively, you can do a folder diff between two dates. This can be done from the UI in the Source Control Explorer. Or from the commandline using tf diff or tf folderdiff
I have a number of reports deployed to a SQL Server 2005 Reporting Services server. They were all developed using the same Report Model (SDML) that references the same Data Source View (DSV) that points to a test database filled with mostly dummy data. Now, I would like to make those reports pull data from the live database with our real data instead. The two databases have exactly the same structure.
It seems to me, that if I could just change the Data Source being referenced in the Data Source View, then I could redeploy the report model, and all the reports based on it would also reference the correct data. I can see in Business Intelligence Development Studio 2005 that there's an option in the Data Source View property list in Design mode to change the Data Source. So I changed the Data Source, thinking that would work. However, when I try to redeploy the report model after changing the Data Source in the Data Source View, I get a number of error messages like this one:
Error 1 The Table property of the Entity 'Address' refers to the Table 'dbo_address', which is not in the primary data source. Events.smdl 0 0
Is there something else I need to be doing here? Something in the Report Model or Data Source View that should be updated? Is there another way to do what I need to?
Edit 1:
I tried changing the datasource of the report model on the server after the reports were deployed, and that seemed to work pretty well. It's not exactly what I wanted to do, but it works. Thanks everyone.
The strategy that has worked best for me is to deploy the "test" shared datasource to the server then edit it via the Report Manager interface to point to the "production" database (changing the connection string). Making sure of course Overwrite Datasources is set to false on deploy.
Also, your database schema must be the same in test as it is in production.
I don't have as much experience with the report models but generally SSRS doesn't like it when you make changes to the datasource and asks you to refresh all the datasets that you have if you do.
Alternatively, just change the datasource definition on the report server itself.
It sounds like you're changing the data source that the dsv references. Instead, why don't you try to change connection string of the data source. Internally the DSV uses GUIDs to identify the various tables and fields, I suspect that by creating a new data source the GUIDs will change and that is why you're seeing these error messages (as the error message is mapping the internally used GUID to it's "friendly name").
The setup I use has an identically named Data Source (.rds) file for each environment, in the same folder the reports are deployed to. It's just a connection string...
My experience has been the same as zalzaw's - if you change the Data Source, you have to refresh all the datasets associated with the report while pointing at the new environment based on the data source changes. It's very tedious - you go to the Data tab for the report in Business Intelligence Development Studio 2005:
Select a Dataset from the dropdown menu
Click the Refresh button (2nd to the right of the Dataset dropdown, icon looks like recycle)
Repeat steps until all datasets have been refreshed.
Make sure that the database(s) (and stored procedures) are in sync. It's all for naught if a table exists in Dev but not in Test or Prod...