Error 7416 Access To Remote Server Is Denied
Feb 6, 2007hey guys i am getting this error on my link server it is sqlsqever to sqlserver link
error 7416 access to remote server is denied because no loggin mappings exists
hey guys i am getting this error on my link server it is sqlsqever to sqlserver link
error 7416 access to remote server is denied because no loggin mappings exists
I am trying to use a linked server and it works as long as I do not specify the sp_addlinkedserver @provstr parameter. If I specify that parameter I always get a 7416 "Access to the remote server is denied because no login-mapping exists" error. I have tried adding the logins various ways but it's very specific to the @provstr parameter, and it doesn't even matter what I put in that parameter. As soon as I put something in there whether it is valid or invalid, I get the error.
Anyone else seen this? There is an amazing lack of any discussion about the error when I search for it.
If I do this it works fine,
EXEC sp_addlinkedserver @server= 'linkedname', @srvproduct='', @provider='SQLNCLI', @datasrc='servername', @catalog='mydatabase'
EXEC sp_addlinkedsrvlogin 'linkedname', 'true', 'AppUser'
But as soon as I add the @provstr parameter, then I get the error if I try to use linkedserver,
EXEC sp_addlinkedserver @server= 'linkedname', @srvproduct='', @provider='SQLNCLI', @datasrc='servername', @catalog='mydatabase', @provstr='Failover Partner=otherservername'
EXEC sp_addlinkedsrvlogin @rmtsrvname='linkedname', @useself='true', @locallogin='AppUser'
It doesn't even make any difference what I put in the @provstr parameter - the sp_addlinkedserver statement always executes without an error, but running a query that uses the linked server generates the error.
Hi,
I have a stored procedure servicing a queue (sql 2005).
The stored procedure updates some data in a different server and database.
If the queue contains messages and I execute manually the stored procedure, I don't have any problem at all.
However, if I set the queue to use the same stored procedure, it gives me the following error:
Error 15274: Access to the remote server is denied because the current security context is not trusted.
Any ideas?
Thanks,
Aron
I am using XP_CMDSHELL to run 2 Windows commands (from a SQL 2005 SP2 server) that access files on a remote server (called webserver). The two commands are:
1. cscript.exe \webserverwwwrootEur_SaveProductImages.vbs
2. dir \webserverwwwroot
Up until very recently this worked fine. Now I am getting Access Is Denied errors:
For #1:
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
CScript Error: Loading script "\webserverwwwrootEur_SaveProductImages.vbs" failed (Access is denied. ).
For #2:
Access is denied.
This happens if the above commands are run through a job, or directly with Query Analyzer as SA.
I understand that XP_CMDSHELL commands are run in the security context of the SQL Server startup account. The SQL Server startup account is called SQLServer and this account exists on both webserver and the database server. On both servers the username & password are identical and the user is in the local Administrators group. The two servers are in a workgroup.
Things I have tried (with no effect):
1. Restarted the servers
2. Deleted and recreated the SQLServer login on both servers
3. Changed the startup account for SQL Server through the SQL Server Configuration Manager to another account and back to SQLServer.
The most revealing tests are these:
1. If I log into the database server myself using the SQLServer account I can run the above commands in a Command Prompt with no problem
2. I installed SQL 2005 Express SP2 on webserver using the same startup account (SQLServer). If I run the same XP_CMDSHELL commands as above but accessing files on the database server, the commands work!
So, an XP_CMDSHELL command run under SQL Express using the local SQLServer account to access a remote server works, but an XP_CMDSHELL command run under SQL Server using a local SQLServer account (that is supposedly identical to the same named account on the other server) does not work !!?!?!?
It is almost as if XP_CMDSHELL commands run under SQL Server are NOT using the SQLServer startup account, but using some other weaker account. How can I tell if this is true?
How can I get this back working (as it was a week ago). The only thing I can think that happened on the servers to cause this is the installation of Windows Updates.
Thanks
I am unable to run a stored procedure that accesses a linked Oracle database as a dataset for a deployed report in Reporting Services. I receive the following error:
An error has occurred during report processing.
Query execution failed for data set 'spName'.
Access to the remote server is denied because the current security context is not trusted.
A few facts ...
The report previews fine in Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) report designer with VS being installed on my local machine and a shared data source referencing Server1
The deployed report on Server2 produces the error
The stored procedure code is similar to the following:
SELECT x.FieldName as OracleField
,y.FieldName as SSfield
FROM OracleLinkedServer..DatabaseName.TableName x
LEFT JOIN Server1.dbo.TableName y
The deployed report runs fine when the stored procedure code is changed as follows. This indicates to me that the problem is truly an Oracle connection issue;
SELECT 'ABC' as OracleField
,y.FieldName as SSfield
FROM Server1.dbo.TableName y
The Oracle database is a linked database on both SQL Server1 and on SQL Server2 database engines. (I don't see where in Server2 Reporting Services I can specify additional server connections.)
I've tried to trick Mr. Reporting Services on Server2 by creating a @L_TempTable in my stored procedure, inserting the data into it, then selecting from a SQL Server1.dbo.TableName LEFT JOIN @l_TempTable, but Server2 still knows I'm trying to get out to Oracle and rewards me with the error.
I can effectively run the Server1 stored procedure script on Server2 through MSSMS -- it's just the deployed report that references the stored procedure that doesn't work
The data source properties of the deployed report are as follows:
Select -- A Custom Datasource
Connection Type: Microsoft SQL Server
Connectoin String: Data Source=Server1;Initial Catalog=DatabaseName
Select -- Credentials stored securly in the report server
Username: UserName
Password: Password
Check -- Use as Windows credentials when connecting the the data source
Check -- Impersonate the authenticated user ...
(Please do not get sidetracked on the 'A Customer Datasource' selection above. I'd rather be using a shared data source, but right now, this is just the way it is.)
Anyone's expertise would be greatly appreciated. We have a great data warehouse but sometimes you just have to go back to the Oracle ERP and slug it out. What do I need to do to get a deployed report to effectively read from a stored procedure that references an Oracle table?
To everyone, thanks for reading!
~ Delora
Hello,
In SQL 2005, from a stored procedure in a local database I am attempting to execute a remote stored procedure in another database on another server. I am getting the error referred to in the Subject when the local stored procedure tries to execute the remote stored procedure. A couple of comments:
The remote database is set up as a linked server in the local database. As part of the linked server definition I selected the 'be made using this security context', and provided a local user name and password.
The remote database is set to Trustworthy.
I have tried every combination of WITH Execute As on the remote stored procedure but nothing works.
I can query against the remote database successfully within Management Studio. I can even execute the remote stored procedure successfully from within M.S., but not from within my local stored procedure when it is run.
Thank you for your help on this - Amos.
I am unable to run a stored procedure that accesses a linked Oracle database as a dataset for a deployed report in Reporting Services. I receive the following error:
An error has occurred during report processing.
Query execution failed for data set 'spName'.
Access to the remote server is denied because the current security context is not trusted.
A few facts ...
The report previews fine in Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) report designer with VS being installed on my local machine and a shared data source referencing Server1
The deployed report on Server2 produces the error
The stored procedure code is similar to the following:
SELECT x.FieldName as OracleField
,y.FieldName as SSfield
FROM OracleLinkedServer..DatabaseName.TableName x
LEFT JOIN Server1.dbo.TableName y
The deployed report runs fine when the stored procedure code is changed as follows. This indicates to me that the problem is truly an Oracle connection issue;
SELECT 'ABC' as OracleField
,y.FieldName as SSfield
FROM Server1.dbo.TableName y
The Oracle database is a linked database on both SQL Server1 and on SQL Server2 database engines. (I don't see where in Server2 Reporting Services I can specify additional server connections.)
I've tried to trick Mr. Reporting Services on Server2 by creating a @L_TempTable in my stored procedure, inserting the data into it, then selecting from a SQL Server1.dbo.TableName LEFT JOIN @l_TempTable, but Server2 still knows I'm trying to get out to Oracle and rewards me with the error.
I can effectively run the Server1 stored procedure script on Server2 through MSSMS -- it's just the deployed report that references the stored procedure that doesn't work
The data source properties of the deployed report are as follows:
Select -- A Custom Datasource
Connection Type: Microsoft SQL Server
Connectoin String: Data Source=Server1;Initial Catalog=DatabaseName
Select -- Credentials stored securly in the report server
Username: UserName
Password: Password
Check -- Use as Windows credentials when connecting the the data source
Check -- Impersonate the authenticated user ...
(Please do not get sidetracked on the 'A Customer Datasource' selection above. I'd rather be using a shared data source, but right now, this is just the way it is.)
Anyone's expertise would be greatly appreciated. We have a great data warehouse but sometimes you just have to go back to the Oracle ERP and slug it out. What do I need to do to get a deployed report to effectively read from a stored procedure that references an Oracle table?
To everyone, thanks for reading!
~ Delora
We've got 3 SQL Servers all SQL Server 2012. We have a Master server and 2 production servers (let's call them A and B). The Master has linked servers defined for both A and B in an identical way.
A and B both have the same databases and each has a Stored Proc that gets called by the Master server.
An SQL Agent job executes the stored proc on both A and B.
It works fine against A but not B.
If we execute the stored proc in a query window under our windows account (domainowner) it works, if we use SetUser to pretend to be the SQL Server Agent account (let's call it domainagent) A works and B doesn't.
Executing against B returns the error "Access to the remote server is denied because the current security context is not trusted."
domainagent is a sysadmin on both Server A and B.
Trustworthy is set to ON in both the Master Server Database it's executing from and the remote databases on both A and B.
All 3 databases have the same owner (let's call it domainowner).
Remus (or anyone who can help) -
I am sorry for posting this question here. The only reason I am doing so is because Remus answered a question similar to this late last year, but I couldn't get access to the whole thread.
In SQL 2005, from a stored procedure in a local database I am attempting to execute a remote stored procedure in another database on another server. I am getting the error referred to in the Subject when the local stored procedure tries to execute the remote stored procedure. A couple of comments:
a.. The remote database is set up as a linked server in the local database. As part of the linked server definition I selected the 'be made using this security context', and provided a local user name and password.
b.. The remote database is set to Trustworthy.
c.. I have tried every combination of WITH Execute As on the remote stored procedure but nothing works.
d.. I can query against the remote database successfully within Management Studio. I can even execute the remote stored procedure successfully from within M.S., but not from within my local stored procedure when it is run.
Thank you for your help on this - Amos.
I am trying to use a linked server and it works as long as I do not specify the sp_addlinkedserver @provstr parameter. If I specify that parameter I always get a 7416 "Access to the remote server is denied because no login-mapping exists" error. I have tried adding the logins various ways but it's very specific to the @provstr parameter, and it doesn't even matter what I put in that parameter. As soon as I put something in there whether it is valid or invalid, I get the error.
Anyone else seen this? There is an amazing lack of any discussion about the error when I search for it.
I created a maintenance plan to do the backup on my machine and created a job using CmdExec command: copy e:\*.bak \remoteackup but the copy job fail each time.
I know that command works fine when i run it from a batch file but does not seem to work from the job in sql server. I try to map the remote machine to a drive and used the drive in the copy statementcopy e:ackup*.bak q:ackup but it still does not work. Is there something I need to do inside sql server?
We have 2 SQL2005 servers currently. 1 is a dev box, the other production. To grant remote access to SSIS, I added my developers to the local Distributed COM Users group and also gave them remote Access and remote Activation on the MsDtsServer component.
This worked just fine. Recently we applied SP1 and the follow-on hotfixes to all SQL components. I followed the install order prescribed in the Q article and applied all component fixes. My developers are now unable to access SSIS remotely unless I add them to the local administrator's group. I don't see anywhere that a log gets generated to help me track down what's going on. Nothing shows up in my Windows security log, despite enabling audit logging on: Accout Logon Events, Logon Event, Object Access, and Privilege Use.
Is this a know issue in SP1 or the hotfixes? I'm hesitant to apply the patches to my production box until I can resolve this issue.
Thanks
Steve
Hello everyone.
I am trying to install Project Server, and i'm having issues with sharepoint, and connecting to SQL:
dataserver is running sbs2003 sql2003 and analsys services.
server2 is running server2003 is to be the application server for project.
ProjectDb is the database that i have setup in sql.
username is the account that can control everything as administrer.
in Sharepoint is asks for the database server: <<dataserver>>
SQL Server database name: <<ProjectDb>>
I'm using windoes authentication and then i click ok, and get the error message.
I've also see the error message can not find the SQL Server, and access denied. Under ODBC i have installed the sql server information under System DSN.
Any help would be great.
Thanks
Everett Buel
What OS permissions do I need to give a domain user to effectively connect to a remote instance of Integration Services?
I keep getting the following message:
Cannot connect to SQLDEV01
Failed to retreive data for this request.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) (Microsoft.SqlServer.ManagedDTS)
I have already performed the Windows 2003 steps outlined in the "Eliminating the Access is Denied" error located at http://msdn2.microsoft.com/en-us/library/aa337083.aspx
I have no problem if the user is a local Administrator (go figure).
I am finishing a port of a project that was done with RS2000/AS2000/DTS2000. The cube process is triggered remotely by a Korn Shell script from Services for Unix that runs a DTS package:
dtsrun.exe /S "$ANALYSIS_SERVICES_HOST" /U "$ANALYSIS_SERVICES_USER" /P "$ANALYSIS_SERVICES_PASSWORD" /N "$PACKAGE_NAME"
I have finished porting the AS and RS parts to their 2005 equivalents and now I am trying to get the cube processing converted. I have built a SSIS package that processes the cube and I have deployed it to the SQL Server in MSDB. When I am logged on to the SQL Server box directly, I can execute the package via the Management Studio and from the command line via:
dtexec /Ser "$ANALYSIS_SERVICES_HOST" /DT "$PACKAGE_PATH_NAME"
When I try to register the SQL Server in Integration Services from my client PC Management Studio it fails with "Access Denied". When I try to run the dtexec from my client PC it fails with "Access Denied".
I have walked through Kirk Haselden's instructions at:
http://sqljunkies.com/WebLog/knight_reign/archive/2006/01/05/17769.aspx
(adding myself to Distributed COM Users, noting the correct DCom Config settings for MsDtsServer and restarting the Integration Services service) and the problem is still not resolved. I have posted to the DTS group on Technet and now I am posting here. This can not be run scheduled by SQL Agent as it needs to be triggered by other load/postload activities. Are there any other fixes for this problem that I can try?
Thanks,
Keehan
By the way, being able to have all the parts of this project in one dev environment is great. The previous application was developed in 3 separate locations which was pretty clunky.
I'm new to SSIS and I'm having problems getting a remote connection to the SSIS service using Management Studio on my workstation. If I terminal Service onto the Server I have no problems connecting to SSIS, but if I try to connect remotely I get the "Access is denied" error message. I have completed the following steps:
To configure rights for remote users on Windows Server 2003 or Windows XP
1. If the user is not a member of the local Administrators group, add the user to the Distributed COM Users group. You can do this in the Computer Management MMC snap-in accessed from the Administrative Tools menu.
2. Open Control Panel, double-click Administrative Tools, and then double-click Component Services to start the Component Services MMC snap-in.
3. Expand the Component Services node in the left pane of the console. Expand the Computers node, expand My Computer, and then click the DCOM Config node.
4. Select the DCOM Config node, and then select MsDtsServer in the list of applications that can be configured.
5. Right-click on MsDtsServer and select Properties.
6. In the MsDtsServer Properties dialog box, select the Security tab.
7. Under Launch and Activation Permissions, select Customize, then click Edit to open the Launch Permission dialog box.
8. In the Launch Permission dialog box, add or delete users, and assign the appropriate permissions to the appropriate users and groups. The available permissions are Local Launch, Remote Launch, Local Activation, and Remote Activation. The Launch rights grant or deny permission to start and stop the service; the Activation rights grant or deny permission to connect to the service.
9. Click OK to close the dialog box. Close the MMC snap-in.
10. Restart the Integration Services service.
But I still get the Access is denied error from my workstation??
I have Power User rights on the server and I'm a sysadmin in the database instance. The SSIS packages I am trying to access are stored in the database. If I add myself to the local administrators group on the server I CAN get remote access, but this is not an acceptable solution in our production environment.
Thanks for any help
Hi,
I'm trying to connect to my local database running on SqlServerExpress. I'm able to connect to it from SQL Server Studio. I'm also able to create a data connection to the database from VS.NET 2005 using server explorer. However, when I try to pull some data from my code, I get the "SQL Server does not exist or access denied." error.
Here's my code:
<asp:GridView ID="GridView1" runat="server" AllowPaging="true" DataSourceID="SqlDatasource1" /><asp:SqlDataSource ID="SqlDatasource1" runat="server" SelectCommand="select * from tStates" ProviderName="System.Data.OleDb" ConnectionString="Provider=SQLOLEDB;Server=.SQLSERVEREXPRESS;database=TestaDB;uid=sa;pwd=SAPassword" />
I'd appreciate some help on this.
Hi guys,
I just installed WebMatrix and MSDE (downloaded from www.asp.net), and I have set MSDE to use SQL authentication. I have granted user ASPNET read/write previlege and added it to the MSDE user's table. When I tried the following code, it gives me this error: "SQL Server does not exist or access denied."
<%@ Page Language="C#" Debug="true" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">
void Page_Load(object sender, EventArgs e) {
// TODO: Update the ConnectionString and CommandText values for your application
string ConnectionString = "server=(local)/BERKELEY;database=emonopoly;Trusted_Connection=yes";
string CommandText = "select * from test";
SqlConnection myConnection = new SqlConnection(ConnectionString);
SqlCommand myCommand = new SqlCommand(CommandText, myConnection);
myConnection.Open();
DataGrid1.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
DataGrid1.DataBind();
}
</script>
<html>
<head>
</head>
<body style="FONT-FAMILY: arial">
<h2>Simple Data Report
</h2>
<hr size="1" />
<form runat="server">
<asp:datagrid id="DataGrid1" runat="server" CellSpacing="1" GridLines="None" CellPadding="3" BackColor="White" ForeColor="Black" EnableViewState="False">
<HeaderStyle font-bold="True" forecolor="white" backcolor="#4A3C8C"></HeaderStyle>
<ItemStyle backcolor="#DEDFDE"></ItemStyle>
</asp:datagrid>
</form>
</body>
</html>
I turned on the debug option, and the exact output is this:
Server Error in '/' Application.
--------------------------------------------------------------------------------
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:
Line 13: SqlCommand myCommand = new SqlCommand(CommandText, myConnection);
Line 14:
Line 15: myConnection.Open();
Line 16:
Line 17: DataGrid1.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
Source File: D:PersonalProjectsMS.NeteMonopolysourcedatareport.aspx Line: 15
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) +311
System.Data.SqlClient.SqlConnection.Open() +383
ASP.datareport_aspx.Page_Load(Object sender, EventArgs e) in D:PersonalProjectsMS.NeteMonopolysourcedatareport.aspx:15
System.Web.UI.Control.OnLoad(EventArgs e) +55
System.Web.UI.Control.LoadRecursive() +27
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
The strange thing is I'm able to connect to the MSDE database from the DATA window on the right hand side of the WebMatrix design window. Will somebody give me a hand?
And yes, I did make sure the MSDE is running.
Thanks alot
Chris
I have re-installed Visual Studio and SQL Server and now i am getting this error for all applications i try to runError:"
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?
I'm trying to create to set up connection between my web application on the server and
the database on another box and getting "SQL Server does not exist or access denied" error.
Both the web server and the database machine are Windows 2003 Server, there's no firewall
enabled, there's mixed authentication enabled on the sql server. The machines are not on the
same domain so I'm using SQL Server authentication from web.config. Here's my connection string:
<add key="ConnectionString" value="Server=sqlboxip;User id=sqlaccountname;Pwd=sqlpass;Initial catalog=dbname">
I've also got <identity impersonate="true"> set in web.config.
Had it the connection working at some stage but then with more tweaking and app reinstall
back square one... Please help!</identity></add>
After installing SQL Server express to my WinXP machine, when I attempt to restore a database from a 2000 backup, I get the following error:
System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLTEST.MDF'. (Microsoft.SqlServer.Express.Smo)
Any ideas?
I have set up an MSDE SQL Server in my Win XP Pro PC and am able to connect to it on the host PC, and over my LAN. However, when I try to connect to it over the Internet my connection is refused with the following message:SQL server does not exist or access denied. ConnectionOpen (Connect())Some background:I have router/NAT firewall and have opened port 1433 (I have even tried a DMZ to the SQL Server machine). The Router is definitely going to the SQL Server PC! I am fairly certain that the connection string is correct.Any help would be most gratefully received.
View 7 Replies View RelatedHello!
When I start my .aspx with ASP.NET Web Matrix Server, it work, but when i try to start it with IIS I get error message.
TIA,
Misha
I have built a web application that runs on my local web server against my local SQL server and my development server, but now I'm trying to get it to work on the live server and I'm not getting a connection. Whenever I try to open the connection, I get a.
SQL Server does not exist or access denied.
error.
Here is my connection string...
Public connString as string
Dim SQLServer As String = "xxx.xx.xx.xxx"
connString = "server=" & SQLServer & ";" _
& "database=DBName;Trusted_Connection=No;user id=xxxID;password=xxxPassword;"
myConnection2 = New SqlClient.SqlConnection(connString)
------------------------------------------------------------
I'm starting my connection to run a datareader this way...
Dim strSQL As String
strSQL = "SELECT ClientID, ClientName " & _
"FROM Client; "
' Create a connection to the table in the SQL database located on
' the remote computer.
Dim myCommand2 As New SqlClient.SqlCommand(strSQL, myConnection2)
myCommand2.CommandTimeout = 1200
myConnection2.Open() 'HERE IS WHERE THE ERROR OCCURS
Dim myReader As SqlClient.SqlDataReader = myCommand2.ExecuteReader(CommandBehavior.CloseConnection)
While myReader.Read()
---------------------------------------------------------------
I can communicate with the server with no problem from my local computer. I can ping the server, and I also tested it by creating a system DSN using the login and password in my application, and it finds the database with no problem. I've tried to connect using the SQL Server's server name and the IP address and both return the same result. I've also saw something in another post to set the trusted connection parameter to "yes" and that didn't work either.
I'm developing on a Windows XP Professional and I'm trying to connect to a Windows 2003 Server with SQL Server 2000 installed on the machine.
I did add the database by restoring a backup from my local server onto the live server. I don't think that should matter, but maybe it does. If anyone has any ideas, I would greatly appreciate it.
hello , i'm very new to sql server.
i'm using sql server 200 & winXP. I have a local server called "JO" and a dsn named "LocalServer".
Authentication is sql server authentication & window with username of "cying" and password "admin"
i can ping my server "JO" but cannot telnet it's sql_server_tcp_port.
this is the error code i obtained when try to open the connection:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
my connection string is as below :
set objcon = server.CreateObject("ADODB.Connection")
strConnection = "Provider=MSDASQL;Driver={SQL Server};Server=local;Data Source=LocalServer;User ID=cying;Password=admin;Persist Security Info=False"
objcon.open, strConnection
is there anything wrong with my connection string or setting?
pls help, thanks in advance
Hi,
I have been for years using the following code locally in native ASP (except different UID and PWD and file path for the msado15.dll) with SQL Server 2000 on XP to do my development and then I upload to the web site later (uses different objConn etc when live). I've now tried to use the same for SQL Server Express and Vista and always get the "does not exist or access denied" error ( 2147467259).
I only want to use SQL Server locally from the machine I'm developing on as I upload the tested "ASP" code to the server which runs it. The SQL Server Browser is running and I have checked the Firewall exclusions for sqlservr.exe. Also I installed it with out Windows Logon (same as I had for SQL Server 2000).
Any ideas, I tried using the Data Source=localhost instead of explicitly defing the path except that had no affect either, I also changed the rshstest_data.mbf to rshstest.mbf as well also to no affect as there appears a difference with this in 2000 and Express?
Any suggestions would be appreciated, thanks..
<!-- METADATA TYPE="typelib"
FILE="e:Program FilesCommon FilesSystemadomsado15.dll" -->
<%
on Error resume next
objConn.Close
Set objConn = Nothing
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=SQLOLEDB;Persist Security Info=False;" & _
"User ID=xx;Password=xx;Initial Catalog=rshstest;" & _
"Initial File Name=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData
shstest_data.mdf"
' "Data Source=localhost;"
Dim strConnect
strConnect = "Provider=SQLOLEDB;Persist Security Info=False;" & _
"Provider=SQLOLEDB;Persist Security Info=False;" & _
"User ID=xx;Password=xx;Initial Catalog=rshstest;" & _
"Initial File Name=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData
shstest_data.mdf"
' "Data Source=localhost;"
My connection string is :
server=localhost;Database=INFOSEC;Integrated Security=true
It works for the login page, but it does not work for the registration page, and give the "SQL Server does not exist or access denied." error.
Any IDEA?
Hallo
i'm trying to connect a VFP DBC as a linked server on MSSQL2000sp3a, using following parameters:
Product name: VFP
Data source: \networkpath odbc
Provider: VFPOLEDB.1
No security context
I'm trying the same operation both from a W2000sp4 server (+ MDAC 2.8sp1 ?) and a WXPPsp2, against two identical copies of the DBC that resides on two different path (one on the final path and one on a test path).
From WXPPsp2 everything runs ok, from W2000 i'm always getting this error:
Error 7399: OLE/DB Provider 'VFPOLEDB' IUnknown::QueryINterface returned 0x80070005: Access Denied
(already reported in this thread, http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1832362&SiteID=1 but it didn't helped me)
The error happens independently from the user the query runs under (basicly AD account, both domain admin and normal user).
MSSQL runs under a domain account which have full permissions (for test purpose) on the directories where DBC reside.
I did no further modifications on the WXP machine in order to have the linked server running, simply it ran smoothly from the beginning.
Clearly the difference rely on the different OS... but what else?
i ran component checker to determine the MDAC version but some components version numbers slightly differs from the expected ones (eg. resulting version is 2.0.1064 versus 2.0.1022 expected in MDAC 2.8) so i suppose to have MDAC2.8 sp1 on the server.
thanks in advance
I am using .net 2005 as front end and Sql Server 2005 as backend, as i face the problem on client side when i installed my software it works properly but after some time i face this error "HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration.
Internet Information Services (IIS)" Also some time it shows me all records. Some time it disconnect the database connection so i can not understand why it happens like this, if somebody know then please help me out this bug.
Dear all,
I developed an asp.net application by using .net frame work 1.1 and sql server 2000.
i was using 2 tier arch (database server is different and web server is different).
my problem is , connection to sql server is not stable,some times it works and some times
it raises error that sql server does not exist or access denied.please help me to solve this problem
Hi Cindy,
After hours (days?) researching this, your name keeps popping up, you must be the GOTO person for VFP. So:
We have a server that runs a VFP application and stores .dbf free tables in a directory shared as F:apps ele.
I am working on an XPPro box running SQL Server Express 2005 using Management Studio Express.
I am logged on as a user with administrator rights for the domain
We would like to be able to query this data and move it to our SQL tables as needed.
Here is what I have:
EXEC sp_addlinkedserver @server = 'tele',
@srvproduct = 'VFP',
@provider = 'VFPOLEDB',
@datasrc = 'F:apps ele',
@provstr = 'VFPOLEDB.1'
GO
SELECT * FROM tele...PROSPECT_DIVU
Here is what I get:
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "VFPOLEDB" for linked server "tele" reported an error. Access denied.
Msg 7301, Level 16, State 2, Line 1
Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "VFPOLEDB" for linked server "tele".
I have tried:
exec sp_addlinkedsrvlogin
@rmtsrvname = 'tele',
@useself = false,
@locallogin = NULL,
@rmtuser = 'admin',
@rmtpassword = NULL
go
Same result.
I have also tried:
EXEC sp_addlinkedserver
'tele2',
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'F:apps ele',
NULL,
'dBase IV'
GO
When I run:
select * from tele2...prospect_divu
I get:
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "tele2" returned message "The Microsoft Jet database engine could not find the object 'prospect_divu'. Make sure the object exists and that you spell its name and the path name correctly.".
Msg 7311, Level 16, State 2, Line 1
Cannot obtain the schema rowset "DBSCHEMA_COLUMNS" for OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "tele2". The provider supports the interface, but returns a failure code when it is used.
What would you suggest?
Hi!
I understand that this topic is one of the most discussed topics ever. However i could not find the relevant information after going through (almost) all the posts so far. Hence this post. I am getting the 'SQL Server does not exist or access denied' error when I am trying to access SQL Server from a WINDOWS SERVICE. SQL Server and the Windows service are running on two different machines. (When they are on the same machine, it works). All the solutions I found so far are related to web apps. What should I do in the case of a windows service? My connection string uses SQL server authentication. (I tried with windows authentication. Its not working either.). Under what login does windows services run and how can I add it to valid SQL server logins?
hi,
I have an asp.net application which queries an sql server in some other domain and populates a grid with the results.
i am using sql server authentication and my connection string is as follows:-
Dim connectionString As String = "server=emr01; user id='private'; password='private'; database='NGEMRDev'"
i have also used the following tag in web.config:-
<identity impersonate="true" />
This works fine on my development pc i.e windows xp with sp2 .
but when i tried running the same application in windows 2003 the query gives the following exception:-
Server Error in '/TempDel' Application.
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:
Line 77: dataAdapter.SelectCommand = dbCommand
Line 78: Dim dataSet As System.Data.DataSet = New System.Data.DataSet
Line 79: dataAdapter.Fill(dataSet)
Line 80:
Line 81: Return dataSetSource File: c:inetpubwwwroot empdelemrtempdel.aspx Line: 79 Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
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
ASP.EmrTempDel_aspx.MyQueryMethod(String username) in c:inetpubwwwroot empdelemrtempdel.aspx:79
ASP.EmrTempDel_aspx.Button2_Click(Object sender, EventArgs e) in c:inetpubwwwroot empdelemrtempdel.aspx:89
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +58
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
Please help me as to how do i successfully implement my application in the windows 2003 server. i have given the aspnet user on the win2003 admin rights.