?
Solved

Attach database dialog does not show in Sql Server Management Studio 2008

Posted on 2010-09-22
6
Medium Priority
?
976 Views
Last Modified: 2012-06-27
First, thank you for your time.

In Windows 7 I just installed Sql Server Management Studio Express 2008.  I can successfully connect to the default instance using Windows Authentication.  After connecting, when I right click on the "Databases" node a context menu appears.  If I select the "Attach" menu item I immediately get an error (btw the error is shown before the Attach dialog appears).  

The error I get is "Cannot show requested dialog.  Parameter name:  nColIndex.  Actual value was -1. (Microsoft.SqlServer.GridControl)

Again, thank you for your time.
0
Comment
Question by:MichaelCarr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:sureshbabukrish
ID: 33735660
0
 

Author Comment

by:MichaelCarr
ID: 33736053
Thank you very much for responding Sureshbabukrish.

I read the article and tried running SSMS as administrator and that didn't work, I get the same error.  Further down in the article it says try turning User Account Control to off.  So I tried that and it didn't work either.  Then I tried running SSMS as administrator with User Account Control set to off and tried attaching again.  I get the same nColIndex error.  

What should I try next?

Again, thank you for your time.
0
 
LVL 8

Accepted Solution

by:
avirups earned 2000 total points
ID: 33741025
This is a known issue when attaching a database through SSMS using a login which is not sysadmin (not the administrator of the box), one hits this error.

The workaround for this currently is to use T-SQL to attach database .

CREATE DATABASE [databasename] ON

( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\databasename.mdf' ),

( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\databasename_log.LDF' )

FOR ATTACH
0
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 

Author Comment

by:MichaelCarr
ID: 33741638
Thank you very much for responding avirups.

A couple weeks ago my machine went down and I am now in the process of rebuilding my machine.  At this particular moment there is only one login on this machine...the administrator login.  

Referring to your comment, does the administrator of the machine automatically get the sysadmin role or do I need to manually assign the sysadmin role to the administrator?

To determine if my administrator login is a sysadmin I tried this:
1) Using SSMS I connected to SqlExpress using windows authentication
2) Then I expanded the Security | Logins node.
My administrator login is not there.

When I attempt to create a administrator login with the sysadmin role, the action fails with this message, "User does not have permission to perform this action."

By the way, what is the default sa password?

Again, thank you for your time.
0
 
LVL 8

Expert Comment

by:avirups
ID: 33775942
There are two things now:

When you installed the SQL Server did you select Mixed Authentication or Windows Authentication? If you don't remember then right-click on the servername in SSMS and select Properties and select the Securities Tab.
If it is Windows Authentication only then change it to Mixed Authentication, then only you will be able to login with sa.

AND if you have Mixed Authentication you must have specified a password for sa while installing, if not then most probably the password is blank at this point. Try to login with a blank password and find out.

Let me know how it goes.
0
 

Author Closing Comment

by:MichaelCarr
ID: 33905936
Sorry it took me so long to respond.  Even though this didn't actually solve my problem the workaround that was provided is good enough.  Thank you very much.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question