.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SQL Server Management Studio is not attaching a database.

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
Hi folks,I'm a newbie in development, and i'm facing a grave concern here.  Sql Server Management Studio (2008) does not seem to be able to attach  a database that i've already created in Sql Server 2005 express within my ASP.NET application.  When I try to attach the database, by clicking "Attach" after right clicking the Database note in object explorer, I get to see a dialog box with an Add button.  I then click that button, and try to navigate to the database, and I'm simply not able to reach that folder!!! The folder containing the databse physically exists, but i can't see it when i'm trying to browse to it.This is a Windows 7 (home edition) laptop, with VS 2008.Can someone please help me here???Thanks!

View Complete Post

More Related Resource Links

Cannot Create Database Diagrams - SQL Server 2008 Management Studio

I cannot create a database diagram with my client-side SQL Server Management Studio.  I can do this if I am on the actual db server itself.  Please help.

Error Attaching .mdf in SQL Server Management Studio Express

I originally had a database setup using SQL Server 2005 Express that was being accessed by a Point-of-Sale client. I would connect to the server using SQL Server Management Studio and everything worked fine. I was out of the office and someone using my machine uninstalled Management Studio. I reinstalled and tried to attach the .mdf file to the database. However I keep receiving this error: TITLE: Microsoft SQL Server Management Studio Express ------------------------------ Attach database failed for Server 'FRONTDESK-PC\SQLEXPRESS'.  (Microsoft.SqlServer.Express.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo) ------------------------------ Unable to open the physical file "c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\PRM - THOR.mdf". Operating system error 2: "2(The system cannot find the file specified.)". (Microsoft SQL Server, Error: 5120) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.

SQL Server Management Studio cannot locate my database

I had to uninstall SQL Server 08 when I left my last project, I have reinstalled the management studio but it no longer recognizes the databases that are on my local machine.  How can I reconcile the connection to the preexisting databases?  When I choose connect, nothing comes up in the options and when i type in the database name it errors out.  I thought it was just that the old files were corrupt but I installed a brand new database and while i can verify that it exists on my machine, I cannot connect through Management Studio.

Problem trying to attach database file to Microsoft SQL Server Management Studio

I was trying to attach a database to SQL Server MGT Studio and got an exception error.  The message stated that the database file I was trying to attach could not be opened because it was version 661.  The SQL Server shows to support version 655 and earlier.  It states that a downgrade path is not supported. Question:  Is there some download ; fix; I can make to SQL Server 2008 that will allow me to attach the version 661????  I am not technical at all.  Please speak slowly.  :)  Thanks

C# Database created but does not show up in Server Management Studio unless I manually attach it.


I used C# Linq to Sql to create a database. I look on the hard drive and the database .mdf and .ldf files are there. I open Server Management Studio 2008, attach to SQL express and the database is not there unless I actually attach the database.


First, is this correct behavior?

Second, is it possible to create a Sql Express database that is automatically registered(?) in Management Studio? If so, please give pointer.


Thanks very much.



how to connect my hosting database from my pc using sql server management studio 2005



I have one asp.net hosting account with some service provider.. 

They have given me some xxx.xxxxxx.com to access sql server from my desktop... 

I enter xxx.xxxxx.com in server name and username and password but it will not connect.. 

so please let me know what are the steps i have to do to access my hosting database...

they have given sql server 2008 im using in local sql server 2005 management studio so let me know how to connect

thanks in advance

Microsoft SQL Server Management Studio 2008 does not list all tables in database

When logging into SSMS 2008 to a SQL2008 database when I expand the tables in a database I only see a few tables listed.  I can login to the same instance with SSMS 2005 and all of the tables are there.  Is there a reason why this is this way?

I can do a select * from in a query window for any of the tables in the database via SSMS 2008 as well and it work fine.  It just does not display the tables.

set up database with .bak files in SAL server management studio



I need to connect to 3 remote databases from my local machine and  restore 3 .bak files, one for each database.

I am new to asp and sql server and am finding SQL Server Management studio quite confusing.  I cannot find any options to connect remotely or restore a database from .bak.

Many thanks

Can't attach my project database (.mdf file) using SQL Server Management Studio R2

Hi.  I've encountered a strange issue in SQL Server Management Studio (not the express version).  I had to uninstall SQL Server 2008 Developer in order to install SQL Server 2008 R2 Developer.  As a result of doing this, the database from one of my ASP.NET MVC projects is not attached to the database server.  I see the ".mdf" file in my project's AppData folder in Windows Explorer, but I can't navigate to it in SQL Server Management Studio.  I go to "C:\Users\<my name>" and the attach database interface will not let me go any further.  The folder that I need to access is "C:\Users\<my name>\Documents\Visual Studio 2010\NerdDinner\NerdDinner\App_Data".  How can I access this directory from SQL Server Management Studio?  Is there some sort of strange permission issue?  Thanks in advance for any help.

Failed to create new database in SQL Server Management Studio Express



I don't know why I can't create a new database in SQL Server Management Studio Express.



This is the reason:


CREATE DATABASE permission denied in database 'master'. (.Net SqlClient Data Provider)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=262&LinkId=20476

Server Name: Ning-PC\SQLEXPRESS
Error Number: 262
Severity: 14
State: 1
Line Number: 1

Program Location:

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndW

Create table in the database using management studio


 I have database already on the server. However, when I created new table, the new created table Schema is not dbo. it is my user name. How to solve this?

It shows the new created table Schema is my username but not dbo.

Even though I rename it, it couldn't change. I can see this in table property.



SQL Server Management Studio


Hi folks


Am sorry if this mght be abit silly question am a Novice Developer.

If am using Visual Studio 2008 Pro, Do I need SQL Server Management Studio? or is it included in the VS 2008 Pro Suite? Am learning C# and SQL Server.



How to connect to local instance of SQL Server 2008 Management Studio Express ?


I just installed SQL Server 2008 Management studio Express on my Vista machine.

i tried connecting to local machine using :

.\sqlexpress, (local)\sqlexpress, or .\SQLExpress, MyPCNAME\SQLExpress

nothing is working, getting this error:

Cannot connect to PC-NAME\SQLEXPRESS. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

SQL Server Management Studio Slow Grid Draw and Refresh

I've istalled SQL2005/SSMS on my development machine and connecting to a local SQL Server 2005. Executing queries is fast but the results grid populating is slow and so is the refresh of the same data. This is not a slow query, its the gridview draw/redraw. I've other PC's with slower processors and less ram with the same software run circles around the SMSS Performance on this Laptop   I've read posts about nvidia graphics drivers and mouse drivers causing issues similar to this. I do have an nvidia quadro x1600M (this is a laptop Compaq 8710w) and switching off the accelerator using Displays/Advanced/Troubleshooting by moving the slider to the middle/center position causes the gird refresh to dramatically increase. It's funny how turning oof the accelerator increases performance.   I have the latest HP nvidia drivers and SSMS is useable without hardware acceleration  but I also develop software that uses directx and its getting really troublesome to work this way.   I am running:   Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2 (2600.xpsp_sp2_qfe.070227-2300)Language: English (Regional Setting: English)System Manufacturer: Hewlett-PackardSystem Model: HP Compaq 8710wBIOS: EPP runtime BIOS - Version 1.1 Processor: Intel(R) Core(TM)2 Duo CPU     T7300  @ 2.00GHz (2 CPUs)Memory: 3072MB RAMPage File: 515MB used, 4439MB availableWindows Dir: C:\WIN

SQL Server managment studio (Error occur Attaching a .mdf file )

An exception occur while executing a Transct-SQL statement or batch. (Microsoft.SQL server.express.Connection info)   Enable to open the physical file "E:\OutsourceProjects\shuja\MyProject_mdf\MyProject.mdf" (Operating System error 5: "5 (Access is denied.) " (Microsoft SQL server error E:5120)   Hello         I have an error while attaching a .mdf file to SQL server management studio,kindly solve my problem,i shall be very thankful. Thanks Regards Kh Hammad

Please Help Installing SQL Management Studio (not Express) w/ local SQL Server Express

I have recently formatted my hard drive and over the past few days I've been reloading my software.  I have installed on my machine SQL Server Express 2005 SP3.  I prefer to have SQL Express running on my development machine because that is what my customers primarily use.  I also have a full MSDN license, and I would need to install SQL Management Studio 2005.  However, when I download the SQL Server 2005 Developer ISO from MSDN, and run the setup file I get an error message that states: Installation of Microsoft SQL Server Native Client failed because a higher version already exists on the machine.  To proceed, uninstall the higher version and then run Microsoft SQL Server Native Client Setup. I would assume the problem is that the copy of SQL Server - Dev Edition that is available through my MSDN subscription is using an earlier version of SQL Server 2005 (most likely the version prior to SP1.)  I would just unistall SQL Server Express 2005 SP3 and reinstall it with out any service pack updates.  The problem is that I also see within my Add or Remove Programs list  four SQL Server 2008 R2 entries, that I believe were installed when I installed Visual Studio Pro 2010 (they are, Microsoft SQL Server 2008 R2 Data-Tier Application Framework, Microsoft SQL Server 2008 R2 Data-Tier Application Project, Microsoft SQL Server 20

SQL Server CE in Management studio express

Hello,I am trying to connect to sql server CE trough SQL Management studio express. But it seems like it only wants to connect to an SQL server express instance. Does SQL server CE needs to run as a server? because I can't seem to be able to just connect to a file. Does Anyone know how to connect to SQL CE?Thanks!Greetings,Mark
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend