Solved

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

Posted on 2010-09-22
6
959 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
  • 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 500 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

776 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