Jeff Pries

Business Intelligence, SQL Server, and other assorted IT miscellany

Category: SQL Server (page 1 of 3)

Creating an SSRS Report Using Natural Earth Geospatial Data (A Shapefile Alternative)

In my previous article, I covered creating geospatial SQL Server tables using the freely available Natural Earth resources.  Natural Earth is an extensive public domain map dataset available at 1:10m, 1:50m, and 1:110 million scales in  vector and raster data formats which can be used as an alternative to ESRI Shapefiles for geospatial data.   In this article, we’ll be creating a simple SQL Server Reporting Services report which utilizes this spatial data in lieu of the more commonly used shapefiles to plot data on a custom map.

To get started, we’ll first need to create some assets.  Follow the steps in the previous article to setup the Natural Earth tables.  Next, we’ll create some views to simplify queries, then we’ll create a report using these assets as well as some sample data.

Continue reading

Getting Started with Natural Earth — A SQL Server Shapefile Alternative (Geospatial Resource)

SQL Server Reporting Services (SSRS) has excellent geospatial support for displaying data on a map.  Maps are typically created using ESRI Shapefiles (.shp files).  These Shapefiles are typically created with complex GIS software and made available for download (sometimes free and sometimes not) to be used.  Additionally, SSRS has an excellent default set of Shapefiles built in for the US which can show the country, states, and individual counties.

Example of SSRS Shape File showing Georgia and its 159 counties.

But what about when you need more flexibility in your geographic display?  Some examples of this may be wanting to display something that you can’t find a shape file for (maybe all the states and provinces in North America) or maybe you want to dynamically draw the geography based on some property of the dataset.  Geospatial data queries to the rescue!  Using SQL Server’s native geospatial support, a geospatial query can be created to return something as simple as a point or rectangle, or complex as the geography of an entire country and all of its rivers.

Getting all of the latitude and longitude coordinates to create a useful geospatial query could potentially be an enormous amount of work.  Fortunately, that work has already been done in a freely available resource, thanks to Natural Earth and Laurent Dupuis.  SQL Server 2012 or greater is recommended for this process.

Example of a geospatial query, shown in the SSMS results pane, based on the imported Natural Earth data.

Continue reading

Microsoft Excel Unable to Connect to SQL Server Analysis Services

Microsoft_Excel_2013_logo.svgRecently, I experienced an issue trying to get a new installation of Microsoft Excel 2016 to connect to SQL Server 2014 Analysis Services Multidimensional.  Whether I would try to connect directly from Excel, via the “From Other Sources” menu or via the Cube Browser in SQL Server Management Studio, I would receive an error that Excel was unable to connect to the database.

I verified that the service was running, firewall not blocking it, and credentials good.  Read on for the solution to this issue.

Continue reading

Learning MDX Part 2 – Let’s Get Visual

ssaslogoMost introductions start with an explanation of cubes and MDX and then work their way toward the syntax and structure of a query and then start to cover the various syntax options in increasing difficulty.  While that is a great approach, sometimes you just need to get going right away.  Fortunately, MDX actually has a few good visual methods of querying an existing cube to access data without necessarily needing to know the syntax and theory (however, that doesn’t hurt!).  This post is going to cover a few of the visual methods of querying a multidimensional analysis services cube.

All that being said, it does still help to understand the structure of your data and the various relationships before trying to query it.  I’m using the Adventure Works 2014 Data Warehouse and Analysis Services data sets (previously discussed here).  The Adventure Works 2014 Data Warehouse contains a number of different fact tables and related dimensions.  I primarily use FactInternetSales (and its related dimensions) which is data for the Internet Sales of Adventure Works.  The diagram for the relational data warehouse database can be seen below.

Adventure Works 2014 Data Warehouse Internet Sales diagram

Adventure Works 2014 Data Warehouse Internet Sales diagram

Continue reading

Learning MDX – Resources

ssaslogoThis post serves as a full reference of all of the resources I used while on my journey to learn MDX / SSAS Multidimensional.  I’ll try to keep this post updated with an index of resources as I consume them.  Some will be free, some will not, I’ll note which are which.

 

Continue reading

Learning MDX Part 1 – Introduction and Environment

ssaslogo

Recently I had the need to start learning MDX to query against an existing Microsoft SQL Server Analysis Services (SSAS) cube. As this can be a long and difficult journey, I thought it’d be useful to make notes about specific things I learn as well as to list and review resources I find along away. I will be paying special attention to using MDX with SQL Server Reporting Services (SSRS) as this is a very common usage scenario, but one in which there are sparse learning resources.

I’ll try to keep this post updated with an index of resources as I consume them.  Some will be free, some will not, I’ll note which are which.  But first, some housekeeping:

Continue reading

PASS Summit 2015 Roundup — My Third Summit

PASS_2015_200x200Now in my third year, I recently attended PASS Summit in Seattle, Washington.  This was my second visit to Seattle for PASS Summit, with my first Summit experience in Charlotte, NC.  Having experience my “first time in Seattle for Summit” last year, I had a pretty good idea of where things were and what things would be going on and when and for the most part, things followed the previous year’s pattern very closely.

I arrived in Seattle a few days early so I could work some sightseeing in.  While it’s generally not a good idea to try to have a rental car during the conference, in the days leading up to the conference when you want to see a lot of places, it’s the way to go.  I rented a car from the airport and made my way down to Portland for a couple of nights.

I spent my first two days of vacation, Saturday and Sunday doing some geocaching and exploring the Portland area.  The weather was overcast but nice the first day and lots of rain the second day.  I’d really wanted to see Mt. Hood, but unfortunately the weather didn’t cooperate at all.

Mt. Rainier while driving down to Portland after arriving in Seattle

Mt. Rainier while driving down to Portland after arriving in Seattle

Continue reading

Importing Cisco Call Data into SQL Server with SSIS

cisco_phoneRecently, I had the need to analyze phone call data to answer questions such as how many phone calls were received in a given day and how frequently voicemail answered instead of a live person.  In this scenario, I was fortunate enough to have a fairly accessible phone system to work with — a Cisco UC520.  While this guide is specific to working with a Cisco UC520 device, most Cisco phone systems (the UC series or anything utilizing CUE/CME) should be pretty comparable.

So, you want to be able to analyze Cisco call data?  Well, you’re in luck!  There are three major steps to this process:

  1. Extract raw call data from the phone system
  2. Capture the exported data and interpret it
  3. Insert it into SQL Server and perform reporting

This won’t be a complete step-by-step guide, but I’ll try to hit all the high points and am always open to questions.

Continue reading

Windows 10 Upgrade – Part 5: SSRS Report Preview Error in SSDT-BI

Windows 10Having just recently successfully installed the current release of SSDT-BI (the current version as of this writing is based on SQL Server 2014 32-bit and the Visual Studio 2013 Integrated Shell), it was time to finally open up some SSRS (SQL Server Reporting Services) projects and get to work.

For anyone that use used the report Preview button within SSDT-BI, you know getting it to work can be a bit dicey.  Microsoft has changed the internal behavior of what happens behind the scenes when the preview button is pressed, and that has created a number of problems.

No surprise, the first time I pressed the preview button, I was greeted with this:

Report Preview error in SSDT-BI

Report Preview error in SSDT-BI

Well, that’s not good.  I should preface this by saying that I did two significant things to ultimately resolve this issue.  It’s possible that only the second one was needed, but I’m going to list them both (as well as a workaround) just in case it’s helpful.

Continue reading

Windows 10 Upgrade – Part 4: Cannot Install SSDT-BI (Install Error)

Windows 10With all of my driver, aesthetic, and networking issues worked out in previous parts, it was time to get down to business.  After all, I’m going to have to do some work from this laptop at some point, right?  And in the Microsoft Business Intelligence world, that means I’m going to need SSDT-BI (SQL Server Data Tools – Business Intelligence).  As of this writing, the current version of SSDT-BI is still based on SQL Server 2014 32-bit with the Visual Studio 2013 Integrated shell.  It’s expected at some point, with the release of 2016, there’ll be a new and improved version more tightly integrated into Visual Studio 2015, but for now, if you want to edit SSRS projects, this is the way to go.

I started out by downloading the currently release of SSDT-BI, which is 32-bit only (regardless if you’re using a 64-bit machine).

I encountered my first minor hurdle during the initial install.  Since SSDT-BI is based on SQL Server 2014 32-bit, it doesn’t play nice with SQL Server 2014 64-bit.  I wasn’t thinking clearly and when presented with the option to “Perform a new installation” or “Add features to an existing instance,” I first tried to add features and the installer yelled at me for having an incompatible installation already in place (SQL Server 2014 64-bit).  So the correct answer is Perform a new installation, which will put these 32-bit components side-by-side with any existing 64-bit components.

After selecting the right installation type and checking the box for the SQL Server Data Tools – Business Intelligence for Visual Studio 2013 shared feature to install, I thought I was on easy street.  Boy was I wrong, the fun was just beginning.  While the installer was running, it eventually failed with this error:

SSDT-BI Install Error - VS Shell Installation has failed with exit code -2147205120

SSDT-BI Install Error – VS Shell Installation has failed with exit code -2147205120

That’s not good.  I immediately tried all the basic IT things before going deeper.  I rebooted and retried the installation, this time running as administrator.  Same error.  Time to go deeper.

Following the error dialog is more detail regarding the error.  To any developer that writes an installer that includes the option to view detailed log files….THANK YOU.

SQL Server Data Tools - Business Intelligence for Visual Studio 2013 installation completed with failures

SQL Server Data Tools – Business Intelligence for Visual Studio 2013 installation completed with failures

Continue reading

Older posts

© 2017 Jeff Pries

Theme by Anders NorenUp ↑