SQL Server 2008 Express failed to attach mdf file

Here is the message. What is wrong with it? Is this a problem with the installation?

TITLE: Microsoft SQL Server Management Studio

Unable to display the requested dialog.


ADDITIONAL INFORMATION:

Parameter Name: nColIndex The actual value is -1. (Microsoft.SqlServer.GridControl)


BUTTONS:

Ok

+2
source share
3 answers

Are you trying to mount mdf using SQL Authentication or Windows Authentication? If you are using SQL Auth, try using Windows Auth instead.

You can also check out this MSDN forum post or this post that suggests using a single-file version of the database:

USE master; GO EXEC sp_attach_single_file_db @dbname = 'AdventureWorks', @physname = N'f:\dataAdventureWorks_Data.mdf'; 

Edit: When you run this script, you must be logged in as a user with at least dbcreator privileges. You can also try CREATE DATABASE FOR ATTACH as shown on this blog post.

+1
source

I prefer Windows authentication and had the same error with SQL Server Standard Edition because my Windows authentication identifier did not have sufficient privileges (it was only a β€œpublic” role). Thus, registering as "sa" and adding the "sysadmin" role to log into your Windows account solved the problem.

+1
source

There was the same problem. It seems that the error arose because I connected to SQL SERVER 2012 INSTANCE with Sql Server 2008 R2 management studio. hope this helps someone else.

0
source

Source: https://habr.com/ru/post/903554/


All Articles