I am accessing my sql server 2008 r2 express serverSQL Server using SSMS. I have, and a user which has got db_owner permission for all database and allwith adequate permissions in server role other than sysadmin. When
When this user tries to attach a database by using ssmsSSMS (by right clicking on database node and then clicking on attach) the, they get an error message comes like:
Cannot show requested dialog.
------------------------------
ADDITIONAL INFORMATION:
Parameter name: nColIndex
Actual value was -1. (Microsoft.SqlServer.GridControl)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.UI.Grid.GridControl.SetColumnWidthInternal(Int32 nColIndex, GridColumnWidthType widthType, Int32 nWidth)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.SetColumnWidthInternalForPublic(Int32 nColIndex, GridColumnWidthType widthType, Int32 nWidth)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.SetColumnWidth(Int32 nColIndex, GridColumnWidthType widthType, Int32 nWidth)
at
Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.SetGridColumnWidth(SqlManagerUIDlgGrid grid, Double[] columnWidthRatio, Int32 columnIndex)
at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.SetDatabasesGridColumnWidths()
at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.OnScale()
at Microsoft.SqlServer.Management.SqlMgmt.SqlManagementUserControl.ScaleToFont()
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.DynamicallyEmbedUserControl(ViewInfo vi, TreeNode node)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SetView(Int32 index, TreeNode node)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SelectCurrentNode()
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.InitializeUI(ViewSwitcherTreeView treeView, ISqlControlCollection viewsHolder, Panel rightPane)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.InitializeForm(XmlDocument doc, IServiceProvider provider, ISqlControlCollection control)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm..ctor(XmlDocument doc, IServiceProvider provider)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolMenuItemHelper.OnCreateAndShowForm(IServiceProvider sp, XmlDocument doc)
at Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartThread()
Cannot show requested dialog.
Parameter name: nColIndex
Actual value was -1. (Microsoft.SqlServer.GridControl)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.SetColumnWidthInternal
(Int32 nColIndex, GridColumnWidthType widthType, Int32 nWidth)
...
at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.SetGridColumnWidth
(SqlManagerUIDlgGrid grid, Double[] columnWidthRatio, Int32 columnIndex)
...
If the same user uses ta T-sqlSQL command such as below to attach database, then it works fine.:
USE [master]
GO
CREATE DATABASE [hgnx] ON
( FILENAME = N'E:\db\hgnx.mdf' ),
( FILENAME = N'E:\db\hgnx_log.ldf' )
FOR ATTACH
GO
So what is the error causing me while attaching database in SSMS? How to solve it?