Solved

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

Posted on 2010-09-22
6
955 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
Comment Utility
0
 

Author Comment

by:MichaelCarr
Comment Utility
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
Comment Utility
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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:MichaelCarr
Comment Utility
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
Comment Utility
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
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now