[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cannot open a sql file from Management studio.

Posted on 2012-08-31
6
Medium Priority
?
689 Views
Last Modified: 2012-09-04
Hi,

A user on one of the client machines is trying to open a file using SQL Management studio but he gets access denied error message.
He can connect to any of the servers with his credentials and execute queries or do any DDL
or DML operations, though.
Any ideas?

Thanks.
0
Comment
Question by:Sonali P
6 Comments
 
LVL 18

Expert Comment

by:vasto
ID: 38355623
Opening  a file has nothing to do with the user rights in SQLServer. Did you check if the user has read /write permissions for the file  (or the folder) ?
0
 

Author Comment

by:Sonali P
ID: 38355670
Basically when the user clicks on file->open in SQL management studio , it says access denied,
its not specific to any file or folder.
0
 
LVL 18

Accepted Solution

by:
vasto earned 1500 total points
ID: 38355707
This is strange. It might be the default folder which is going to be opened in the file dialog box. Still not SQL issue - try to add the user as local administrator to check if this will help
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 5

Expert Comment

by:VIVEKANANDHAN_PERIASAMY
ID: 38355740
Try below:

Right click on the file ->properties->choose security tab-> edit->click on add->give the username->click ok button->select full control in the below permissions for administrator tab-> click ok.

Now try to open the file through SSMS FILE option or drag and drop the file directly on query optimizer window.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38356106
What kind of file?  You should be able to open an SQL file but I thought that an MDF has to be 'attached' to the server before you can look at it.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 38356391
Yes, that explains it.  I suspect the user is trying to open a data file and not a SQL Script.  Since the database is already attached, there is no need to "open" it and the user just needs some basic lessons using SSMS.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to shrink a transaction log file down to a reasonable size.
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.
Suggested Courses

834 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