Solved

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

Posted on 2010-09-22
6
956 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
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.

920 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

16 Experts available now in Live!

Get 1:1 Help Now