1

This seems to be something new, or at least since the last time I created an ODBC connection to SQL Server from Minitab 16.

When I created a new ODBC connection, the database name is now in the dropdown list.

enter image description here

As you can see, I can't read the full table name, and several of my tables have similar names. It didn't always include the database name, is there some option I need to uncheck or something to remove it?

Johnny Bones
  • 8,786
  • 7
  • 52
  • 117
  • The screenshot you posted is not the ODBC Data Source Administrator tool that ships with Windows. To setup a Windows ODBC DSN, launch the ODBC administrator tool from Control Panel (System-->Administrative Tools-->ODBC Data Sources) or by running odbcad32.exe from a command-prompt. If you need help with a specific application that uses ODBC, I suggest you specify the application name in your question. It looks like it may have an issue with Windows 7. – Dan Guzman Oct 13 '14 at 17:00
  • This specific instance i shappening in Minitab 16. I just tried doing it in Access, and it only showed "dbo.MyTableName" in the list, so you may be correct that it's application-specific. – Johnny Bones Oct 13 '14 at 17:05
  • I suggest to install the latest product updates to Minitab 16. I see they have critical updates for Windows 8.1. – Dan Guzman Oct 13 '14 at 17:09
  • How have you created the ODBC connection in Windows? – DavidG Oct 16 '14 at 12:35

3 Answers3

0

I did a from-scratch experiment on my system to get a grasp of the situation:

First Lets add User DSN to my machine [Windows 7] and remote [SQL Server 2012] by doing the following: Control Panel > Set up data sources (ODBC) > User DSN [Tab] > Press Add button

Add User DSN

Choose "SQL Server Client 11.0" and press finish You will see something like the following:

Create a new data source to SQL SEERVER

and follow the wizard to the end(I chose master as my default database in the wizard).

Now what? Lets see if we can use this inside our client application (visual Studio 2013 in my case):

  1. Go to "Server Explorer" > "Data Connections" > Right click and "Add Connection..." > "Change Data Source to "Microsoft ODBC Data Source" > Press OK >

Now the Data Source which you added earlier [Test_Plan2] will appear in Data Source Specification

Data Source Specification

Test the connection and Press OK.

Now use this newly created connection by querying it

ODBC Connection

[Right click on the newly created ODBC connection and choose "New Query" : You dont even need to select any table at all if-you-don't-want-to but if you want select the the ones you need] > Close it and write your SQL query

SELECT * FROM MSreplication_options

enter image description here

I did not have that database name issue at all.

MHOOS
  • 5,146
  • 11
  • 39
  • 74
0

This happened during upgrade of your SQL Server - 2012.

In SQL server fully qualified table names are in the following format:

[database].[schema].[table]

In SQL Server Management Studio you can configure/alter all the defaults.

You can set up the default schema on a per-user basis:

Security > Logins > (right click) user > Properties > 
User Mapping > Default Schema

Luckily, SQL Server 2012 addresses this security issue by allowing us to assign a default schema for Windows Groups, which helps organizations simplify their database schema administration.

The following Transact SQL (T-SQL) demonstrates the process of assigning the default schema for Windows Group:

-- Creating Default Schema "ProdAdmins" for Windows Group "MyDomain\ProdDBAs"

CREATE SCHEMA [ProdAdmins] AUTHORIZATION [MyDomain\ProdDBAs]
GO

-- Set Default Schema for Windows Group "MyDomain\ProdDBAs"

ALTER USER [MyDomain\ProdDBAs] WITH DEFAULT_SCHEMA=[ProdAdmins]
GO

The following links may help you:

http://blog.mclaughlinsoftware.com/2012/09/16/setup-sql-server-schema/

http://searchsqlserver.techtarget.com/feature/SQL-Server-2012-security-Changes-for-the-newest-version

Santosh Panda
  • 7,235
  • 8
  • 43
  • 56
0

It turns out this is a function of Minitab and there's no way to actually change it. It's just how the program was designed.

Johnny Bones
  • 8,786
  • 7
  • 52
  • 117