Solved

How to open this database in Sql express?

Posted on 2014-11-08
3
131 Views
Last Modified: 2014-11-09
Hi,
I'm given a sql mdf file and its log file.  I tried to right clicking on the "Database" in Sql Management Studio, selecting attach and selected to add the mdf file from my Drive.  The database and log file shows up in the lower window.  But when I click okay it gives me error.  Attached is a screen shot.  How can I fix this?

Looks like I was denied access to open this database.  Do I get user id or password from person who owns the database to open it?  How is that done?  I usually just restore database backup file.  This is the first time attaching to one.  I didn't know I need to be given access but the sql express is running on my local pc.  the database is on my local drive.  I'm not sure how to setup access for this.

I'm using sql express 2012
0
Comment
Question by:lapucca
  • 2
3 Comments
 

Author Comment

by:lapucca
ID: 40430869
Attached is the error message that says I have no access.
sqlErr.txt
0
 
LVL 10

Accepted Solution

by:
HuaMinChen earned 500 total points
ID: 40431121
Hi,
Can you try to copy both .mdf and .ldf files into the folder like

C:\Program Files\Microsoft SQL Server\MSSQL11.SS2012EXPR\MSSQL\DATA

and then redo this

Right-click Databases > Attach

again?
0
 

Author Closing Comment

by:lapucca
ID: 40431324
Perfect!  That worked!  Thank you.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL USE DATABASE VARIABLE 5 30
SQL Syntax Grouping Sum question 7 27
Finding gaps or missing dates in a date range using TSQL 3 28
Parse this column 6 27
I have a large data set and a SSIS package. How can I load this file in multi threading?
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

821 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