Solved

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

Posted on 2010-09-22
6
973 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 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

Back Up Your Microsoft Windows Server®

Back up 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.

Question has a verified solution.

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

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.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

688 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