Showing posts with label denied. Show all posts
Showing posts with label denied. Show all posts

Thursday, March 22, 2012

Error: 5123 CREATE FILE encountered operating system error 5A(Access denied.)

HI ,

This is a problem I encountered when I had to detach a database file (type .mdf):

1) I went to the MS SQL Management Server Studi and detached my database file successfully from a connection called Workhorse.

2) I needed to place the .mdf database file into a zip file in order to put it on a remote server. I did this using Shared Portal. This was also successful

3) However when I tried reattaching the database file, I got this error:

CREATE FILE encountered operating system error 5A(Access denied.) while attempting to open or create the physical file "C\Program Files\MSSQL Server\MSSQL\Data\<databasename>.mdf'

Q) The database file and log file (ldf) exist in the correct directory so I don't know what happened. Can any one help?

Thanks much

Tonante

Dear Tonate,

Please, take a look on the following link and might be it will help you :)

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=120536&SiteId=1

|||

Hi Tonate,

I got the solution for this. I proud this is my first blog to provide the answer on internet

I got the same error too:

CREATE FILE encountered operating system error 5A(Access denied.) while attempting to open or create the physical file "C\Program Files\MSSQL Server\MSSQL\Data\<databasename>.mdf'

the solution is:

set the Operating system permission on that .mdf file to full permission to 'Everyone' in new server.

this will helps me to attach the database in other server..

Have a Great Day..

vino...

|||

Well that could be a security issue, its better to give permission to the SQL Server account.

Error: 5123 CREATE FILE encountered operating system error 5A(Access denied.)

HI ,

This is a problem I encountered when I had to detach a database file (type .mdf):

1) I went to the MS SQL Management Server Studi and detached my database file successfully from a connection called Workhorse.

2) I needed to place the .mdf database file into a zip file in order to put it on a remote server. I did this using Shared Portal. This was also successful

3) However when I tried reattaching the database file, I got this error:

CREATE FILE encountered operating system error 5A(Access denied.) while attempting to open or create the physical file "C\Program Files\MSSQL Server\MSSQL\Data\<databasename>.mdf'

Q) The database file and log file (ldf) exist in the correct directory so I don't know what happened. Can any one help?

Thanks much

Tonante

Dear Tonate,

Please, take a look on the following link and might be it will help you :)

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=120536&SiteId=1

|||

Hi Tonate,

I got the solution for this. I proud this is my first blog to provide the answer on internet

I got the same error too:

CREATE FILE encountered operating system error 5A(Access denied.) while attempting to open or create the physical file "C\Program Files\MSSQL Server\MSSQL\Data\<databasename>.mdf'

the solution is:

set the Operating system permission on that .mdf file to full permission to 'Everyone' in new server.

this will helps me to attach the database in other server..

Have a Great Day..

vino...

|||Well that could be a security issue, its better to give permission to the SQL Server account.|||Greetings SQL Server users, I rarely post to forums but think I probably should start doing so. I know this problem was probably solved, but just in case it wasn't, this was my solution to the exact same problem when attempting to do exactly what you tried (detaching, zipping, then re-attaching the database file *.mdf) using SQL Server 2005 with Mgmt Server Studio. First, Stop all SQL services, Secondly, go to the sql folder (default: MSSQL) and right click on it and see if you can change your folder and all subfolder atrributes to NOT read only (unchecked). I noticed that on my server, the log and data files could not be changed. So I immediately went to those files *.ldf and *.mdf and took ownership of both of them (the permissions can easily get wacked). Once I did that, I was able to zip them and move them to safer ground. I then restarted all SQL Services, and was able to re-attach the *.mdf file. If you are like me, you probably log in using a few different usernames and move files around a lot. For some odd reason, our permissions get hosed up from time to time. I hope this helped.

Sunday, March 11, 2012

Error: [DBNMPNTW]Access denied.

Hi,
I have set up a server with IIS. The pages needs authentication to browse.
When the pages are browsed from the machine where IIS is set up It is loging
in the user.
When a user is trying to login from a different location or machine, its
gives the following error message, How to fix the issue.
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNMPNTW]Access denied.
We are using Named Pipes. Do we have to make any settings changes...
Can any one help...
I always use TCP/IP when connecting from ASP/VB. Have you tried that
instead?
http://www.aspfaq.com/
(Reverse address to reply.)
"Deepak Natarajan" <Deepak Natarajan@.discussions.microsoft.com> wrote in
message news:D933A8B2-34FB-4DE4-A7D0-5C9355A60B5B@.microsoft.com...
> Hi,
> I have set up a server with IIS. The pages needs authentication to browse.
> When the pages are browsed from the machine where IIS is set up It is
loging
> in the user.
> When a user is trying to login from a different location or machine, its
> gives the following error message, How to fix the issue.
> Microsoft OLE DB Provider for SQL Server error '80004005'
> [DBNMPNTW]Access denied.
>
> We are using Named Pipes. Do we have to make any settings changes...
> Can any one help...
>
>
|||Aaron,
Thanx for your reply, The problem is like this.
Like if i logion to the machine where teh site is set up and Login, for the
next five minutes or so i am able to login from different machines/ location.
After that if the session in the Server Machine expires then from all the
other places if i try to login the login is giving the below mentioned error
message
Deepak
"Aaron [SQL Server MVP]" wrote:

> I always use TCP/IP when connecting from ASP/VB. Have you tried that
> instead?
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Deepak Natarajan" <Deepak Natarajan@.discussions.microsoft.com> wrote in
> message news:D933A8B2-34FB-4DE4-A7D0-5C9355A60B5B@.microsoft.com...
> loging
>
>

Error: [DBNMPNTW]Access denied.

Hi,
I have set up a server with IIS. The pages needs authentication to browse.
When the pages are browsed from the machine where IIS is set up It is loging
in the user.
When a user is trying to login from a different location or machine, its
gives the following error message, How to fix the issue.
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNMPNTW]Access denied.
We are using Named Pipes. Do we have to make any settings changes...
Can any one help...I always use TCP/IP when connecting from ASP/VB. Have you tried that
instead?
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Deepak Natarajan" <Deepak Natarajan@.discussions.microsoft.com> wrote in
message news:D933A8B2-34FB-4DE4-A7D0-5C9355A60B5B@.microsoft.com...
> Hi,
> I have set up a server with IIS. The pages needs authentication to browse.
> When the pages are browsed from the machine where IIS is set up It is
loging
> in the user.
> When a user is trying to login from a different location or machine, its
> gives the following error message, How to fix the issue.
> Microsoft OLE DB Provider for SQL Server error '80004005'
> [DBNMPNTW]Access denied.
>
> We are using Named Pipes. Do we have to make any settings changes...
> Can any one help...
>
>|||Aaron,
Thanx for your reply, The problem is like this.
Like if i logion to the machine where teh site is set up and Login, for the
next five minutes or so i am able to login from different machines/ location.
After that if the session in the Server Machine expires then from all the
other places if i try to login the login is giving the below mentioned error
message
Deepak
"Aaron [SQL Server MVP]" wrote:
> I always use TCP/IP when connecting from ASP/VB. Have you tried that
> instead?
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Deepak Natarajan" <Deepak Natarajan@.discussions.microsoft.com> wrote in
> message news:D933A8B2-34FB-4DE4-A7D0-5C9355A60B5B@.microsoft.com...
> > Hi,
> >
> > I have set up a server with IIS. The pages needs authentication to browse.
> > When the pages are browsed from the machine where IIS is set up It is
> loging
> > in the user.
> >
> > When a user is trying to login from a different location or machine, its
> > gives the following error message, How to fix the issue.
> >
> > Microsoft OLE DB Provider for SQL Server error '80004005'
> >
> > [DBNMPNTW]Access denied.
> >
> >
> > We are using Named Pipes. Do we have to make any settings changes...
> >
> > Can any one help...
> >
> >
> >
> >
>
>

Error: "EXECUTE permission denied on object..."

I get this error when I try to preview a report that uses a stored procedure. The stored procedure does not exist in the database, but in the directory I run the report from. The stored procedure declares which database to use, and to create the temp table I want. Do I require special permissions on the sql db I am using to be able to create temp tables? Any help would be great, thanks!

Michael

How are you connecting to the stored procedure in a directory?

SQL Profiler may let you troubleshoot what user account and object this error message relates to.

|||

I had a developer do this awhile ago too; you require elevated permissions to create tables. Try just clearing the table rather than deleting and recreating the table every time the report is run it requires less security.

Friday, March 9, 2012

Error>>"SQL Server does not exist or access denied"

I have re-installed Visual Studio and SQL Server and now i am getting this error for all applications i try to run
Error:

"

SQL Server does not exist or access denied.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[SqlException: SQL Server does not exist or access denied.] System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474 System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372 System.Data.SqlClient.SqlConnection.Open() +384 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36 ResNet2.top_animals.BindGrid() +64 ResNet2.top_animals.Page_Load(Object sender, EventArgs e) +525 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +731

"
any suggestions?We will need to see your connection string to be able to help you.
|||

tmorton wrote:

We will need to see your connection string to be able to help you.


Connection String:

Session("ResNet_Connection_String") = "workstation id=PC_ID;packet size=4096;user id=USER_ID;data source=SAC063;persist" & _

" security info=True;initial catalog=Jo;password=PASSWORD"

The connection string was working fine before installations. I got a feeling that the application is not able to connect to sql server at all and there is some wee configurations which got to be done.

|||

Other than just trying to connect to the SQL server i was even trying to connect to the local SQL Sserver (MSDE 2000) which gives a slightly different error:

Error:
***************************************************************************************************************************************************************************************************************

Server Error in '/TestApp' Application.

Login failed for user '4NSQ11J\ASPNET'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user '4NSQ11J\ASPNET'.
Source Error:

Line 179: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadLine 180: 'Put user code to initialize the page hereLine 181: Me.SqlDataAdapter1.Fill(Me.DataSet1)Line 182: Me.DataGrid1.DataSource = Me.DataSet1Line 183: Me.DataGrid1.DataBind()

Source File:c:\inetpub\wwwroot\TestApp\DbTest_App.aspx.vb Line:181
Stack Trace:
[SqlException: Login failed for user '4NSQ11J\ASPNET'.] System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472 System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372 System.Data.SqlClient.SqlConnection.Open() +384 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38 TestApp.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\TestApp\DbTest_App.aspx.vb:181 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +731


Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

***************************************************************************************************************************************************************************************************************
Where 'NSQ11J' is my local server as well as computer name.

|||Does the user who is trying to run the query have sufficient access rights on the database/table?
Tryst
|||

Tryst wrote:

Does the user who is trying to run the query have sufficient access rights on the database/table?
Tryst


Yes DB Owner rights!|||Do you have your <machinename>/ASPNET as the user in the USER accounts ? and make sure this user account has permissions on the tables/stored procs.|||

ndinakar wrote:

Do you have your <machinename>/ASPNET as the user in the USER accounts ? and make sure this user account has permissions on the tables/stored procs.


As i mentioned earlier the account i am using has got DBO rights.|||Solution Found:

Ther Alias port had to be set to a specific one to listen to TCP/IP protocols.

Steps to check the Alias settings:

1) go to 'Client Network Utility' in Microsoft SQL Server utlities

2)check if there are any protocols disabled which you going to use in the application

3)click on the tab 'Alias' to add/edit/remove currently Alias servers in the list

Thanks for you guys help anyway!

Cheers
Umer|||Hi UmerTahir,
you solved the problem by doing this, but what exactly was the problem you had with the Server Network Utility?
Tryst
|||

Tryst wrote:

Hi UmerTahir,
you solved the problem by doing this, but what exactly was the problem you had with the Server Network Utility?
Tryst


The problem was with the application and its connection to the SQL server. To access the sql server through TCP/IP protocols some empty port is required which is usualy left to be detected automatically. In my case i had to access through specific port which my company has set for some security issues so that solved the problem.
Umer

Wednesday, February 15, 2012

Error while connecting to DB through Public IP

While connecting to the DB through a public IP from my system i'm getting an SQL Server does not exist or access denied.But while using localhost its working fine.DB setting in the web.config file.The Code is

<!-- application specific settings -->
<appSettings>
<!-- <add key="connString" value="data source=10.1.1.228;initial catalog=ACE;password=XXXX;persist security info=True;user id=sa;packet size=4096" />-->
<add key="connString" value="packet size=4096;user id=sa;data source=EBIZ;persist security info=True;initial catalog=ACE;password=password" />
</appSettings>

What to do for this error.Did you try following the connection string advice athttp://www.connectionstrings.com?

Terri