Sunday, March 25, 2012
Can not connect to SQL Server database with http://Localhost
Pages 3.0 (Wrox 1999)" to connect to my Access and SQL Server databases
with the following Coonection Strings.
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=G:\databases\Movie2000.mdb;" & _
"Persist Security Info=False"
objConn.Open "Provider=SQLOLEDB" & _
"User ID=sa;Initial Catalog=Movie;" & _
"Data Source=G:\Program Files\Microsoft SQL
Server\MSSQL\Data\Movie2000.mdf"
I copied the Movie2000.mdb to my HD, G:\databases. It worked very well
with the http://Localhost, where my Connect.asp file is located. I can
open and display a Recordset object from the ASccess Movies table. But
the connection to SQL Server database failed.
Do I need to modify the ADO connection string properties, i.e.
Provider and/or Dara Source?
TIA,
Jeffrey
Hi
With SQL Server, the client does not know where the DB is on disk, you just
refer to it by name.
objConn.Open "Provider=SQLOLEDB" & _
"User ID=sa;Initial Catalog=Movie;" & _
"Data Source=Movie2000"
This can be accessed after the database is restored or attached into SQL
Server.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
<cjeffwang@.gmail.com> wrote in message
news:1118821257.151086.23940@.g43g2000cwa.googlegro ups.com...
> I followed an example from the Chap 12 of "Beginning Active Server
> Pages 3.0 (Wrox 1999)" to connect to my Access and SQL Server databases
> with the following Coonection Strings.
> objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> "Data Source=G:\databases\Movie2000.mdb;" & _
> "Persist Security Info=False"
> objConn.Open "Provider=SQLOLEDB" & _
> "User ID=sa;Initial Catalog=Movie;" & _
> "Data Source=G:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Movie2000.mdf"
> I copied the Movie2000.mdb to my HD, G:\databases. It worked very well
> with the http://Localhost, where my Connect.asp file is located. I can
> open and display a Recordset object from the ASccess Movies table. But
> the connection to SQL Server database failed.
> Do I need to modify the ADO connection string properties, i.e.
> Provider and/or Dara Source?
> TIA,
> Jeffrey
>
|||Hi Mike,
I tried using your connection string, but still got an error message:
Error Type:
Microsoft VBScript compilation (0x800A0408)
Invalid character
/Bch12/ConnectSQL.asp, line 30
"User ID=sa;Initial Catalog=Movie;" & _
Any suggestions? Thanks.
Jeffrey
sql
Can not connect to SQL Server database with http://Localhost
Pages 3.0 (Wrox 1999)" to connect to my Access and SQL Server databases
with the following Coonection Strings.
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=G:\databases\Movie2000.mdb;" & _
"Persist Security Info=False"
objConn.Open "Provider=SQLOLEDB" & _
"User ID=sa;Initial Catalog=Movie;" & _
"Data Source=G:\Program Files\Microsoft SQL
Server\MSSQL\Data\Movie2000.mdf"
I copied the Movie2000.mdb to my HD, G:\databases. It worked very well
with the http://Localhost, where my Connect.asp file is located. I can
open and display a Recordset object from the ASccess Movies table. But
the connection to SQL Server database failed.
Do I need to modify the ADO connection string properties, i.e.
Provider and/or Dara Source?
TIA,
JeffreyHi
With SQL Server, the client does not know where the DB is on disk, you just
refer to it by name.
objConn.Open "Provider=SQLOLEDB" & _
"User ID=sa;Initial Catalog=Movie;" & _
"Data Source=Movie2000"
This can be accessed after the database is restored or attached into SQL
Server.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
<cjeffwang@.gmail.com> wrote in message
news:1118821257.151086.23940@.g43g2000cwa.googlegroups.com...
> I followed an example from the Chap 12 of "Beginning Active Server
> Pages 3.0 (Wrox 1999)" to connect to my Access and SQL Server databases
> with the following Coonection Strings.
> objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> "Data Source=G:\databases\Movie2000.mdb;" & _
> "Persist Security Info=False"
> objConn.Open "Provider=SQLOLEDB" & _
> "User ID=sa;Initial Catalog=Movie;" & _
> "Data Source=G:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Movie2000.mdf"
> I copied the Movie2000.mdb to my HD, G:\databases. It worked very well
> with the http://Localhost, where my Connect.asp file is located. I can
> open and display a Recordset object from the ASccess Movies table. But
> the connection to SQL Server database failed.
> Do I need to modify the ADO connection string properties, i.e.
> Provider and/or Dara Source?
> TIA,
> Jeffrey
>|||Hi Mike,
I tried using your connection string, but still got an error message:
Error Type:
Microsoft VBScript compilation (0x800A0408)
Invalid character
/Bch12/ConnectSQL.asp, line 30
"User ID=sa;Initial Catalog=Movie;" & _
Any suggestions? Thanks.
Jeffrey
Thursday, March 22, 2012
Can not connect to SQL server 2000 on windows authentication mode
Hello everyone,
We have SQL server 2000 on windows 2000. From our desktop MS Access was connected to database through ODBC. Since yesterday (after our consultant had updated another asp application in the same server) we are getting “SQL Server Error: 18452. ….. Login failed for user ‘(null)’. Reason: not associated with a trusted SQL Server connection. “
The consultant saying he did not touch any settings on server (?). And the problem is even server’s security property shows it has mixed mode authentication. But I cannot connect to server even through my SQL server enterprise manager in windows authentication mode. I can connect if I use SQL server authentication. Through ODBC I can connect also and test fine, if I use SQL authentication. But the Access application wouldn’t connect using SQL authentication in ODBC.
So, can any one help me to find out what else could be done to make sure that the server is going to accept windows authentication. I’m thinking any other settings or registry change … etc. Please help.
Thanks
You are getting the error during the communication with the Web Servcie, right ? Then you probably changed the Security of the ASP application to not allow Integrated authentication. Are you using an asp or an ASP.nET application ?HTH, jens K. Suessmeyer.
http://www.sqlserver2005.de|||
Hi Jens,
No our web service is fine. We are trying to connect through ODBC and SQL enterprise manager.
|||Hi Taposh,
Did any of the security settings on the SQL Server itself changed? (ie. was some Windows user account access removed from SQL security settings?) You can verify this by using Enterprise manager and login using "sa" and expand the server; expand Security, and then click Logins.
Unfortunately, there are a few scenarios in which you will receive an 18452 error back from the server. Some of the typical scenarios include; missing login rights for Windows users; client and server on different domains (Kerberos trust issue).
Please have a look at http://blogs.msdn.com/sql_protocols/archive/2006/12/02/understanding-kerberos-and-ntlm-authentication-in-sql-server-connections.aspx
I would also recommend searching on the web using the error message as the key phrase.
HTH,
Jimmy
Tuesday, March 20, 2012
Can not access the Deleted System Table
a trigger, but the problem occurs when I insert/update data from
Enterprise Manager ONLY. The trigger operates fine if I modify data in
Query Analyzer or through VBCode.
I finally found a workaround, modifying the select statement to "Select
* Into #deleted from Deleted", but am worried that will impact
performance on larger databases. I'm 99% certain it is just an access
issue somewhere, I just can't figure out where.
Any help y'all can suggest is appreciated.
Here is a snippet of the trigger:
CREATE trigger InsertUpdate_Table1
On Table1
For Update, Insert As
Declare @.Temp Int
Select * from Deleted
Select @.Temp = @.@.Rowcount
If @.Temp > 0
{rest of the code has been confirmed to work just fine}> Select * from Deleted
> Select @.Temp = @.@.Rowcount
So your trigger returns 2 resultsets? I can see how this would confuse EM
because special application code is needed to handle this situation.
This technique to get the number of updated rows is a bad practice for a
number of reasons. The proper way to get the number of updated rows is with
@.@.ROWCOUNT after the UPDATE statement rather in the trigger itself:
UPDATE dbo.Table1
SET MyColumn = 1
SELECT @.@.ROWCOUNT
Hope this helps.
Dan Guzman
SQL Server MVP
"Fayven" <FayvenWren@.gmail.com> wrote in message
news:1154833842.671883.224220@.b28g2000cwb.googlegroups.com...
>I have a problem where I can not perform "Select * from Deleted" within
> a trigger, but the problem occurs when I insert/update data from
> Enterprise Manager ONLY. The trigger operates fine if I modify data in
> Query Analyzer or through VBCode.
> I finally found a workaround, modifying the select statement to "Select
> * Into #deleted from Deleted", but am worried that will impact
> performance on larger databases. I'm 99% certain it is just an access
> issue somewhere, I just can't figure out where.
> Any help y'all can suggest is appreciated.
> Here is a snippet of the trigger:
> CREATE trigger InsertUpdate_Table1
> On Table1
> For Update, Insert As
> Declare @.Temp Int
> Select * from Deleted
> Select @.Temp = @.@.Rowcount
> If @.Temp > 0
> {rest of the code has been confirmed to work just fine}
>|||FYI - SQL EM is using RPC to run the SQL Statements
--
THANKS & PLEASE RATE THE POSTING.
--RAVI--
"Fayven" wrote:
> I have a problem where I can not perform "Select * from Deleted" within
> a trigger, but the problem occurs when I insert/update data from
> Enterprise Manager ONLY. The trigger operates fine if I modify data in
> Query Analyzer or through VBCode.
> I finally found a workaround, modifying the select statement to "Select
> * Into #deleted from Deleted", but am worried that will impact
> performance on larger databases. I'm 99% certain it is just an access
> issue somewhere, I just can't figure out where.
> Any help y'all can suggest is appreciated.
> Here is a snippet of the trigger:
> CREATE trigger InsertUpdate_Table1
> On Table1
> For Update, Insert As
> Declare @.Temp Int
> Select * from Deleted
> Select @.Temp = @.@.Rowcount
> If @.Temp > 0
> {rest of the code has been confirmed to work just fine}
>sql
can not access sql server after changing the access right for sa to "denied"
standart user but I get a message that connection failed.
the problem started when I "played" with "sa", I changed
the security for sa to "Denied" What can I do?There are a couple of possible solutions.
1. Restore master from a backup prior to making this change.
2. Rebuild master. Recreates the master database & sets back the defaults
3. Attempt to register the server as NT Administrator using Windows
Authentication.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
Can not access SQL Server
In this case, the environment is:
Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address: 10.35.3.43)
Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a WinForms
application. (In the same subnet)
In the WinForms application, I can connect to the SQL server sucessfully,
but in the ASP.Net application, I can not, the error message say that "SQL
Server does not exist, or access deny".
The code is the same in ASP.Net application and WinForms application:
==>>
string cnstring = "user id=sa;data source='10.35.3.43';persist security
info=True;initial catalog=MyDB;password='MyPassword'";
string cmdstring = "SELECT Count(*) FROM FunctionCode";
System.Data.SqlClient.SqlConnection cn = new
System.Data.SqlClient.SqlConnection(cnstring);
System.Data.SqlClient.SqlCommand cmd = new
System.Data.SqlClient.SqlCommand(cmdstring, cn);
cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
int count = (int)cmd.ExecuteScalar();
cn.Close();
Response.Write(count.ToString());
<<==
How to fix this problem?
Thanks in advance
KevinRun a profiler trace on the SQL server to see if the login attempt is making
it the the SQL server. This will give you insight in to where to look next
for the problem, network or program.
--
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
> Hi,
> In this case, the environment is:
> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
> 10.35.3.43)
> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
> WinForms application. (In the same subnet)
> In the WinForms application, I can connect to the SQL server sucessfully,
> but in the ASP.Net application, I can not, the error message say that "SQL
> Server does not exist, or access deny".
> The code is the same in ASP.Net application and WinForms application:
> ==>>
> string cnstring = "user id=sa;data source='10.35.3.43';persist security
> info=True;initial catalog=MyDB;password='MyPassword'";
> string cmdstring = "SELECT Count(*) FROM FunctionCode";
> System.Data.SqlClient.SqlConnection cn = new
> System.Data.SqlClient.SqlConnection(cnstring);
> System.Data.SqlClient.SqlCommand cmd = new
> System.Data.SqlClient.SqlCommand(cmdstring, cn);
> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
> int count = (int)cmd.ExecuteScalar();
> cn.Close();
> Response.Write(count.ToString());
> <<==> How to fix this problem?
> Thanks in advance
> Kevin
>|||It's not network problem, I can connect through a WinForm application. I
found something in the following article, I try but still doesn't work.
http://support.microsoft.com/default.aspx?scid=kb;en-us;888228
By the way, the two machines are in different domain.
Regars
Kevin
"Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
> Run a profiler trace on the SQL server to see if the login attempt is
> making it the the SQL server. This will give you insight in to where to
> look next for the problem, network or program.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>> Hi,
>> In this case, the environment is:
>> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
>> 10.35.3.43)
>> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
>> WinForms application. (In the same subnet)
>> In the WinForms application, I can connect to the SQL server sucessfully,
>> but in the ASP.Net application, I can not, the error message say that
>> "SQL Server does not exist, or access deny".
>> The code is the same in ASP.Net application and WinForms application:
>> ==>>
>> string cnstring = "user id=sa;data source='10.35.3.43';persist security
>> info=True;initial catalog=MyDB;password='MyPassword'";
>> string cmdstring = "SELECT Count(*) FROM FunctionCode";
>> System.Data.SqlClient.SqlConnection cn = new
>> System.Data.SqlClient.SqlConnection(cnstring);
>> System.Data.SqlClient.SqlCommand cmd = new
>> System.Data.SqlClient.SqlCommand(cmdstring, cn);
>> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
>> int count = (int)cmd.ExecuteScalar();
>> cn.Close();
>> Response.Write(count.ToString());
>> <<==>> How to fix this problem?
>> Thanks in advance
>> Kevin
>>
>|||I would expect that to apply to both connections from Winform and ASP.NET.
Can you perform a profile trace on to see what credentials are being used
for the failing connection.
--
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
> It's not network problem, I can connect through a WinForm application. I
> found something in the following article, I try but still doesn't work.
> http://support.microsoft.com/default.aspx?scid=kb;en-us;888228
> By the way, the two machines are in different domain.
> Regars
> Kevin
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> дÈëÏûÏ¢ÐÂÎÅ:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
>> Run a profiler trace on the SQL server to see if the login attempt is
>> making it the the SQL server. This will give you insight in to where to
>> look next for the problem, network or program.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>> Hi,
>> In this case, the environment is:
>> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
>> 10.35.3.43)
>> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
>> WinForms application. (In the same subnet)
>> In the WinForms application, I can connect to the SQL server
>> sucessfully, but in the ASP.Net application, I can not, the error
>> message say that "SQL Server does not exist, or access deny".
>> The code is the same in ASP.Net application and WinForms application:
>> ==>>
>> string cnstring = "user id=sa;data source='10.35.3.43';persist
>> security info=True;initial catalog=MyDB;password='MyPassword'";
>> string cmdstring = "SELECT Count(*) FROM FunctionCode";
>> System.Data.SqlClient.SqlConnection cn = new
>> System.Data.SqlClient.SqlConnection(cnstring);
>> System.Data.SqlClient.SqlCommand cmd = new
>> System.Data.SqlClient.SqlCommand(cmdstring, cn);
>> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
>> int count = (int)cmd.ExecuteScalar();
>> cn.Close();
>> Response.Write(count.ToString());
>> <<==>> How to fix this problem?
>> Thanks in advance
>> Kevin
>>
>>
>|||Hi, Nik,
I use profile trace, but there is no login or login fail events when using
ASP.Net. There is login even when using WinForm.
The source code and connection string are the same in WinForm and ASP.Net.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:XrTTe.308487$kM5.134787@.fe01.news.easynews.com...
>I would expect that to apply to both connections from Winform and ASP.NET.
>Can you perform a profile trace on to see what credentials are being used
>for the failing connection.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
>> It's not network problem, I can connect through a WinForm application. I
>> found something in the following article, I try but still doesn't work.
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;888228
>> By the way, the two machines are in different domain.
>> Regars
>> Kevin
>>
>>
>> "Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
>> Run a profiler trace on the SQL server to see if the login attempt is
>> making it the the SQL server. This will give you insight in to where to
>> look next for the problem, network or program.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>> Hi,
>> In this case, the environment is:
>> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
>> 10.35.3.43)
>> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
>> WinForms application. (In the same subnet)
>> In the WinForms application, I can connect to the SQL server
>> sucessfully, but in the ASP.Net application, I can not, the error
>> message say that "SQL Server does not exist, or access deny".
>> The code is the same in ASP.Net application and WinForms application:
>> ==>>
>> string cnstring = "user id=sa;data source='10.35.3.43';persist
>> security info=True;initial catalog=MyDB;password='MyPassword'";
>> string cmdstring = "SELECT Count(*) FROM FunctionCode";
>> System.Data.SqlClient.SqlConnection cn = new
>> System.Data.SqlClient.SqlConnection(cnstring);
>> System.Data.SqlClient.SqlCommand cmd = new
>> System.Data.SqlClient.SqlCommand(cmdstring, cn);
>> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
>> int count = (int)cmd.ExecuteScalar();
>> cn.Close();
>> Response.Write(count.ToString());
>> <<==>> How to fix this problem?
>> Thanks in advance
>> Kevin
>>
>>
>>
>|||Ok now we're getting somewhere, not sure where yet but we now going to look
at the ASP.Net server more closely.
But first just try adding the account under which ASP.Net runs as a login on
the SQL Server and see if it connects.
--
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
> Hi, Nik,
> I use profile trace, but there is no login or login fail events when using
> ASP.Net. There is login even when using WinForm.
> The source code and connection string are the same in WinForm and ASP.Net.
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> дÈëÏûÏ¢ÐÂÎÅ:XrTTe.308487$kM5.134787@.fe01.news.easynews.com...
>>I would expect that to apply to both connections from Winform and ASP.NET.
>>Can you perform a profile trace on to see what credentials are being used
>>for the failing connection.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
>> It's not network problem, I can connect through a WinForm application. I
>> found something in the following article, I try but still doesn't work.
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;888228
>> By the way, the two machines are in different domain.
>> Regars
>> Kevin
>>
>>
>> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
>> дÈëÏûÏ¢ÐÂÎÅ:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
>> Run a profiler trace on the SQL server to see if the login attempt is
>> making it the the SQL server. This will give you insight in to where to
>> look next for the problem, network or program.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>> Hi,
>> In this case, the environment is:
>> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
>> 10.35.3.43)
>> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
>> WinForms application. (In the same subnet)
>> In the WinForms application, I can connect to the SQL server
>> sucessfully, but in the ASP.Net application, I can not, the error
>> message say that "SQL Server does not exist, or access deny".
>> The code is the same in ASP.Net application and WinForms application:
>> ==>>
>> string cnstring = "user id=sa;data source='10.35.3.43';persist
>> security info=True;initial catalog=MyDB;password='MyPassword'";
>> string cmdstring = "SELECT Count(*) FROM FunctionCode";
>> System.Data.SqlClient.SqlConnection cn = new
>> System.Data.SqlClient.SqlConnection(cnstring);
>> System.Data.SqlClient.SqlCommand cmd = new
>> System.Data.SqlClient.SqlCommand(cmdstring, cn);
>> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
>> int count = (int)cmd.ExecuteScalar();
>> cn.Close();
>> Response.Write(count.ToString());
>> <<==>> How to fix this problem?
>> Thanks in advance
>> Kevin
>>
>>
>>
>>
>|||I now found the root cause. It's because the Machine A and Machine B are in
different domain, two domains are not trusted. If both machines in the same
domain, it works.
The reason why WinForm app succeeds is because Machine B have stored a use
account and password on Domain A, I could see the NT user name from sql
profiler, it's Domain A's user account.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:DEUTe.127980$Lg2.47868@.fe12.news.easynews.com...
> Ok now we're getting somewhere, not sure where yet but we now going to
> look at the ASP.Net server more closely.
> But first just try adding the account under which ASP.Net runs as a login
> on the SQL Server and see if it connects.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
>> Hi, Nik,
>> I use profile trace, but there is no login or login fail events when
>> using ASP.Net. There is login even when using WinForm.
>> The source code and connection string are the same in WinForm and
>> ASP.Net.
>>
>>
>> "Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:XrTTe.308487$kM5.134787@.fe01.news.easynews.com...
>>I would expect that to apply to both connections from Winform and
>>ASP.NET. Can you perform a profile trace on to see what credentials are
>>being used for the failing connection.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
>> It's not network problem, I can connect through a WinForm application.
>> I found something in the following article, I try but still doesn't
>> work.
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;888228
>> By the way, the two machines are in different domain.
>> Regars
>> Kevin
>>
>>
>> "Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
>> Run a profiler trace on the SQL server to see if the login attempt is
>> making it the the SQL server. This will give you insight in to where
>> to look next for the problem, network or program.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>> Hi,
>> In this case, the environment is:
>> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
>> 10.35.3.43)
>> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
>> WinForms application. (In the same subnet)
>> In the WinForms application, I can connect to the SQL server
>> sucessfully, but in the ASP.Net application, I can not, the error
>> message say that "SQL Server does not exist, or access deny".
>> The code is the same in ASP.Net application and WinForms application:
>> ==>>
>> string cnstring = "user id=sa;data source='10.35.3.43';persist
>> security info=True;initial catalog=MyDB;password='MyPassword'";
>> string cmdstring = "SELECT Count(*) FROM FunctionCode";
>> System.Data.SqlClient.SqlConnection cn = new
>> System.Data.SqlClient.SqlConnection(cnstring);
>> System.Data.SqlClient.SqlCommand cmd = new
>> System.Data.SqlClient.SqlCommand(cmdstring, cn);
>> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
>> int count = (int)cmd.ExecuteScalar();
>> cn.Close();
>> Response.Write(count.ToString());
>> <<==>> How to fix this problem?
>> Thanks in advance
>> Kevin
>>
>>
>>
>>
>>
>
Can not access SQL Server
In this case, the environment is:
Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address: 10.35.3.43)
Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a WinForms
application. (In the same subnet)
In the WinForms application, I can connect to the SQL server sucessfully,
but in the ASP.Net application, I can not, the error message say that "SQL
Server does not exist, or access deny".
The code is the same in ASP.Net application and WinForms application:
==>>
string cnstring = "user id=sa;data source='10.35.3.43';persist security
info=True;initial catalog=MyDB;password='MyPassword'";
string cmdstring = "SELECT Count(*) FROM FunctionCode";
System.Data.SqlClient.SqlConnection cn = new
System.Data.SqlClient.SqlConnection(cnstring);
System.Data.SqlClient.SqlCommand cmd = new
System.Data.SqlClient.SqlCommand(cmdstring, cn);
cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
int count = (int)cmd.ExecuteScalar();
cn.Close();
Response.Write(count.ToString());
<<==
How to fix this problem?
Thanks in advance
KevinRun a profiler trace on the SQL server to see if the login attempt is making
it the the SQL server. This will give you insight in to where to look next
for the problem, network or program.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
> Hi,
> In this case, the environment is:
> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
> 10.35.3.43)
> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
> WinForms application. (In the same subnet)
> In the WinForms application, I can connect to the SQL server sucessfully,
> but in the ASP.Net application, I can not, the error message say that "SQL
> Server does not exist, or access deny".
> The code is the same in ASP.Net application and WinForms application:
> ==>>
> string cnstring = "user id=sa;data source='10.35.3.43';persist security
> info=True;initial catalog=MyDB;password='MyPassword'";
> string cmdstring = "SELECT Count(*) FROM FunctionCode";
> System.Data.SqlClient.SqlConnection cn = new
> System.Data.SqlClient.SqlConnection(cnstring);
> System.Data.SqlClient.SqlCommand cmd = new
> System.Data.SqlClient.SqlCommand(cmdstring, cn);
> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
> int count = (int)cmd.ExecuteScalar();
> cn.Close();
> Response.Write(count.ToString());
> <<==
> How to fix this problem?
> Thanks in advance
> Kevin
>|||It's not network problem, I can connect through a WinForm application. I
found something in the following article, I try but still doesn't work.
http://support.microsoft.com/defaul...kb;en-us;888228
By the way, the two machines are in different domain.
Regars
Kevin
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:4iSTe.305886$WN5.7191@.fe02.news.eas
ynews.com...
> Run a profiler trace on the SQL server to see if the login attempt is
> making it the the SQL server. This will give you insight in to where to
> look next for the problem, network or program.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>|||I would expect that to apply to both connections from Winform and ASP.NET.
Can you perform a profile trace on to see what credentials are being used
for the failing connection.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
> It's not network problem, I can connect through a WinForm application. I
> found something in the following article, I try but still doesn't work.
> http://support.microsoft.com/defaul...kb;en-us;888228
> By the way, the two machines are in different domain.
> Regars
> Kevin
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> д?:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
>|||Hi, Nik,
I use profile trace, but there is no login or login fail events when using
ASP.Net. There is login even when using WinForm.
The source code and connection string are the same in WinForm and ASP.Net.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:XrTTe.308487$kM5.134787@.fe01.news.e
asynews.com...
>I would expect that to apply to both connections from Winform and ASP.NET.
>Can you perform a profile trace on to see what credentials are being used
>for the failing connection.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
>|||Ok now we're getting somewhere, not sure where yet but we now going to look
at the ASP.Net server more closely.
But first just try adding the account under which ASP.Net runs as a login on
the SQL Server and see if it connects.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
> Hi, Nik,
> I use profile trace, but there is no login or login fail events when using
> ASP.Net. There is login even when using WinForm.
> The source code and connection string are the same in WinForm and ASP.Net.
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> д?:XrTTe.308487$kM5.134787@.fe01.news.easynews.com...
>|||I now found the root cause. It's because the Machine A and Machine B are in
different domain, two domains are not trusted. If both machines in the same
domain, it works.
The reason why WinForm app succeeds is because Machine B have stored a use
account and password on Domain A, I could see the NT user name from sql
profiler, it's Domain A's user account.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:DEUTe.127980$Lg2.47868@.fe12.news.ea
synews.com...
> Ok now we're getting somewhere, not sure where yet but we now going to
> look at the ASP.Net server more closely.
> But first just try adding the account under which ASP.Net runs as a login
> on the SQL Server and see if it connects.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
>
Can not access SQL Server
In this case, the environment is:
Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address: 10.35.3.43)
Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a WinForms
application. (In the same subnet)
In the WinForms application, I can connect to the SQL server sucessfully,
but in the ASP.Net application, I can not, the error message say that "SQL
Server does not exist, or access deny".
The code is the same in ASP.Net application and WinForms application:
==>>
string cnstring = "user id=sa;data source='10.35.3.43';persist security
info=True;initial catalog=MyDB;password='MyPassword'";
string cmdstring = "SELECT Count(*) FROM FunctionCode";
System.Data.SqlClient.SqlConnection cn = new
System.Data.SqlClient.SqlConnection(cnstring);
System.Data.SqlClient.SqlCommand cmd = new
System.Data.SqlClient.SqlCommand(cmdstring, cn);
cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
int count = (int)cmd.ExecuteScalar();
cn.Close();
Response.Write(count.ToString());
<<==
How to fix this problem?
Thanks in advance
Kevin
Run a profiler trace on the SQL server to see if the login attempt is making
it the the SQL server. This will give you insight in to where to look next
for the problem, network or program.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
> Hi,
> In this case, the environment is:
> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
> 10.35.3.43)
> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
> WinForms application. (In the same subnet)
> In the WinForms application, I can connect to the SQL server sucessfully,
> but in the ASP.Net application, I can not, the error message say that "SQL
> Server does not exist, or access deny".
> The code is the same in ASP.Net application and WinForms application:
> ==>>
> string cnstring = "user id=sa;data source='10.35.3.43';persist security
> info=True;initial catalog=MyDB;password='MyPassword'";
> string cmdstring = "SELECT Count(*) FROM FunctionCode";
> System.Data.SqlClient.SqlConnection cn = new
> System.Data.SqlClient.SqlConnection(cnstring);
> System.Data.SqlClient.SqlCommand cmd = new
> System.Data.SqlClient.SqlCommand(cmdstring, cn);
> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
> int count = (int)cmd.ExecuteScalar();
> cn.Close();
> Response.Write(count.ToString());
> <<==
> How to fix this problem?
> Thanks in advance
> Kevin
>
|||It's not network problem, I can connect through a WinForm application. I
found something in the following article, I try but still doesn't work.
http://support.microsoft.com/default...b;en-us;888228
By the way, the two machines are in different domain.
Regars
Kevin
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:4iSTe.305886$WN5.7191@.fe02.news.easyn ews.com...
> Run a profiler trace on the SQL server to see if the login attempt is
> making it the the SQL server. This will give you insight in to where to
> look next for the problem, network or program.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>
|||I would expect that to apply to both connections from Winform and ASP.NET.
Can you perform a profile trace on to see what credentials are being used
for the failing connection.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
> It's not network problem, I can connect through a WinForm application. I
> found something in the following article, I try but still doesn't work.
> http://support.microsoft.com/default...b;en-us;888228
> By the way, the two machines are in different domain.
> Regars
> Kevin
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> д?:4iSTe.305886$WN5.7191@.fe02.news.easyn ews.com...
>
|||Hi, Nik,
I use profile trace, but there is no login or login fail events when using
ASP.Net. There is login even when using WinForm.
The source code and connection string are the same in WinForm and ASP.Net.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:XrTTe.308487$kM5.134787@.fe01.news.eas ynews.com...
>I would expect that to apply to both connections from Winform and ASP.NET.
>Can you perform a profile trace on to see what credentials are being used
>for the failing connection.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
>
|||Ok now we're getting somewhere, not sure where yet but we now going to look
at the ASP.Net server more closely.
But first just try adding the account under which ASP.Net runs as a login on
the SQL Server and see if it connects.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
> Hi, Nik,
> I use profile trace, but there is no login or login fail events when using
> ASP.Net. There is login even when using WinForm.
> The source code and connection string are the same in WinForm and ASP.Net.
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> д?:XrTTe.308487$kM5.134787@.fe01.news.eas ynews.com...
>
|||I now found the root cause. It's because the Machine A and Machine B are in
different domain, two domains are not trusted. If both machines in the same
domain, it works.
The reason why WinForm app succeeds is because Machine B have stored a use
account and password on Domain A, I could see the NT user name from sql
profiler, it's Domain A's user account.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:DEUTe.127980$Lg2.47868@.fe12.news.easy news.com...
> Ok now we're getting somewhere, not sure where yet but we now going to
> look at the ASP.Net server more closely.
> But first just try adding the account under which ASP.Net runs as a login
> on the SQL Server and see if it connects.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
>
Can not access SQL database for Website security settings
I'm using Visual Studio 2005 (8.0.50727.42) and going into the menu option Website > ASP.Net Configuration, access the security tab and all I get is an error message stating that there is a problem with the selected data store "Unable to Connect to the SQL Server Database"
I have SQL Server 2005 (Express Edition). I have created a database "NetDev" with the right connection, etc.
I can use the SQL server fine for my Windows applications, but somehow this ASp.Net Configuration tool is not making any sense.
I also used the aspnet_regsql command from framework 2.0 to create a DataBase to no avail.
Does anyone out there knows if there is a bug with this tool?
Responding to my own question.
I finally reinstalled everything from scratch, IIS first, and then Visual Studio and my problem went away. It obviously had some corruption as I havce deleted and recreated many apps I may have induced some problems. Also the NET Service had to be added to the APP-Data dir with write permissions (this may have been the real cause).
sqlcan not access reports
http://myserver/reports/
I get the following error:
Access to the path "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportManager\global.asax" is denied.
Please help..Looks like permissions or users have changed. The Web service user needs
access to this file. Make sure the Web service identity user has
permissions to that file.
| Thread-Topic: can not access reports
| thread-index: AcXEcWiSSksr+4EXS/e+bsnVf1Lr4w==| X-WBNR-Posting-Host: 216.89.4.2
| From: "=?Utf-8?B?c3Fsc3Rlcg==?=" <nospam@.nospam.com>
| Subject: can not access reports
| Date: Wed, 28 Sep 2005 14:13:01 -0700
| Lines: 12
| Message-ID: <CED59F58-B2D0-4768-B03B-64B9590467A1@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:53316
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| This was working before but all of a sudden when I try to access reports
server
|
| http://myserver/reports/
|
| I get the following error:
|
| Access to the path "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
| Services\ReportManager\global.asax" is denied.
|
| Please help..
|
|
|
Can not access Report Manager administration options
The installation was performed using Remote Desktop Connection to the server, with a domain account in the Administrators group. Initially, the Reporing Services service failed to start, but I could solve this with references to your forum:
http://www.developmentnow.com/g/115_2004_10_0_0_452194/Report-Services-did-not-install-properly-on-w2k-and-w2k3-Can-anyone-help.htm
After the service could start and completed the Reporting Services Configuration,
I can access the Report Manager Home page, but only with HOME and HELP links,
no options for the administration of the application. Please help !!
From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comI forgot to mention that after fixing the service startup problem, I got a 401 error when accessing Resport Manager. I could not fix this, but could get access by allowing anonymous access to the website in IIS properties. This might be important to the analysis of the problem..
From http://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=115&threadid=103510
Posted via DevelopmentNow.com Group
http://www.developmentnow.com|||Very good that you added this. This is the reason that you didn't get
administration options. By default anyone in the local administrators group
is in the proper RS role to administer RS. BUT, when you are anonymous RS
doesn't know who you are (because you are anonymous). And so, no admin
options.
So, the real issue is your 401 Error. Back up and concentrate on that. I
suggest getting back to where you are getting this error
I googled 401 error Reporting Services
This one looks like it could be your issue:
http://msdn2.microsoft.com/en-us/library/ms155921.aspx
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Elly Aldo" <nospam@.developmentnow.com> wrote in message
news:aa3a00e5-0466-4356-b877-7958970832c0@.developmentnow.com...
>I forgot to mention that after fixing the service startup problem, I got a
>401 error when accessing Resport Manager. I could not fix this, but could
>get access by allowing anonymous access to the website in IIS properties.
>This might be important to the analysis of the problem...
> From
> http://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=115&threadid=1035106
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
Can not access localhost/ReportServer or Reports
I installed ReportServer with success I think, and I'm able to deploy my Report Model in BIDS (it says "success")..
But now, when I try to go to http://localhost/ReportServer, I get the error below:
The permissions granted to user 'EVO610\IUSR_EVO610' are insufficient for performing this operation. (rsAccessDenied) Get Online Help
I really tried everything; I granted full permissions to the folder below for IUSR_EV0610, but it still says the same error.
C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer
Is this not the correct solution?
Any other things that I don't know?
Thanks
Hey try opening the Reporting Services Configuration Tool and make sure everything looks as it should. This looks like a permissions issue.|||when i disable the anonymous access in IIS of Reports and ReportServer, i have the story below.
the strange thing is: in IIS console, when I right click "Report" and choose "browse", I can browse in it via the right pane of the IIS console. but when i try to access it via IE http://localhost/Reports, it prompts a popup for user and password, and i don't know what to type there
-
When i try to browse "ReportServer" via the IIS console, it says no errors, but the thing below (
localhost/ReportServer - /
Microsoft SQL Server Reporting Services Version 9.00.1399.00 .
When I try to access it via IE, it prompts also a popup for user and pwd, and then i have the same question and problem as described above.
|||
jsykes wrote:
Hey try opening the Reporting Services Configuration Tool and make sure everything looks as it should. This looks like a permissions issue.
yeah, sure...
but "how should it be"?
any recommendations?
|||
LOL
Are you throwing attitude at me?
I can't tell you how you should configure it unless I know your architecture
|||solution in other treath:http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1582384&SiteID=1
and about the security settings in IIS of Reports and ReportServer; the Anonymous access is disabled and the integrated windows verification is enabled. i think that were the default settings after installation of RS.
|||@.jsykes: not at all throwing attitude at you. it just made me nervous (it was day 4 of struggling with only the installation of RS environment), and i was astonished that nobody could help me here.
problems were not in architecture. just simple installation of the environment and testing out basic stuff.
Can not access Excel file using OpenRowset
I am using SQLServer 2005 SP2. I enabled the Ad Hoc Distributed Queries and DisallowAdhocAccess registry option is explicitly set to 0. Query is working fine when I remote desk to the server and execute when I run same query from my workstation I am getting following error
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
Any help is appreciated.
Thanks
--
Farhan
Can you post the text of your query?|||
Here you go ...
Select * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\inventory.xls;Extended Properties=Excel 8.0')...[Laptop$]
|||Can we clarify your original statement?You wrote that when you execute the statement from the server itself it works.
In that case how do you exactly execute the query? And how do you do it from your workstation?|||
Hello Anton,
I ran the query using SQLServer Management Studio both on Server and Workstation.
Thanks.
|||Connecting to the same server with the same credentials?|||I think this is a point of view issue. Remember that when you perform OpenRowset, it is looking for that location from the server's point of view. If you create a file on the client at C:\file and try to link to it from the server, it will naturally not find C:\file. You have to specify where the server would find that file, not where it is on the client. This is the same kind of issue that would come up if you try to load a CLR assembly on the server that is built on the client. The file is not within the scope of the server's view and definitely not in the same place so it fails to find it and fails to load, but if you perform the exact same operation on the server, it succeeds. This is because, when performing this operation on the server, the client and server are the same machine and have the same filesystem view. You can work around this issue in a few ways if you need to dynamically link the server to a client file. I suggest either: 1.) upload the file through TCP or an extended stored procedure and link to it from the directory path in the server's view, 2.) create a share and place files on the share that you want to push over to the server, specifying the share should give you a uniform location across client and server and effectively abstract out this detail.
Hope that helps,
John
sqlCan not access Excel file using OpenRowset
I am using SQLServer 2005 SP2. I enabled the Ad Hoc Distributed Queries and DisallowAdhocAccess registry option is explicitly set to 0. Query is working fine when I remote desk to the server and execute when I run same query from my workstation I am getting following error
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
Any help is appreciated.
Thanks
--
Farhan
Can you post the text of your query?|||
Here you go ...
Select * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\inventory.xls;Extended Properties=Excel 8.0')...[Laptop$]
|||Can we clarify your original statement?You wrote that when you execute the statement from the server itself it works.
In that case how do you exactly execute the query? And how do you do it from your workstation?|||
Hello Anton,
I ran the query using SQLServer Management Studio both on Server and Workstation.
Thanks.
|||Connecting to the same server with the same credentials?|||I think this is a point of view issue. Remember that when you perform OpenRowset, it is looking for that location from the server's point of view. If you create a file on the client at C:\file and try to link to it from the server, it will naturally not find C:\file. You have to specify where the server would find that file, not where it is on the client. This is the same kind of issue that would come up if you try to load a CLR assembly on the server that is built on the client. The file is not within the scope of the server's view and definitely not in the same place so it fails to find it and fails to load, but if you perform the exact same operation on the server, it succeeds. This is because, when performing this operation on the server, the client and server are the same machine and have the same filesystem view. You can work around this issue in a few ways if you need to dynamically link the server to a client file. I suggest either: 1.) upload the file through TCP or an extended stored procedure and link to it from the directory path in the server's view, 2.) create a share and place files on the share that you want to push over to the server, specifying the share should give you a uniform location across client and server and effectively abstract out this detail.
Hope that helps,
John
Can not access Excel file using OpenRowset
I am using SQLServer 2005 SP2. I enabled the Ad Hoc Distributed Queries and DisallowAdhocAccess registry option is explicitly set to 0. Query is working fine when I remote desk to the server and execute when I run same query from my workstation I am getting following error
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
Any help is appreciated.
Thanks
--
Farhan
Can you post the text of your query?|||
Here you go ...
Select * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\inventory.xls;Extended Properties=Excel 8.0')...[Laptop$]
|||Can we clarify your original statement?You wrote that when you execute the statement from the server itself it works.
In that case how do you exactly execute the query? And how do you do it from your workstation?|||
Hello Anton,
I ran the query using SQLServer Management Studio both on Server and Workstation.
Thanks.
|||Connecting to the same server with the same credentials?|||I think this is a point of view issue. Remember that when you perform OpenRowset, it is looking for that location from the server's point of view. If you create a file on the client at C:\file and try to link to it from the server, it will naturally not find C:\file. You have to specify where the server would find that file, not where it is on the client. This is the same kind of issue that would come up if you try to load a CLR assembly on the server that is built on the client. The file is not within the scope of the server's view and definitely not in the same place so it fails to find it and fails to load, but if you perform the exact same operation on the server, it succeeds. This is because, when performing this operation on the server, the client and server are the same machine and have the same filesystem view. You can work around this issue in a few ways if you need to dynamically link the server to a client file. I suggest either: 1.) upload the file through TCP or an extended stored procedure and link to it from the directory path in the server's view, 2.) create a share and place files on the share that you want to push over to the server, specifying the share should give you a uniform location across client and server and effectively abstract out this detail.
Hope that helps,
John
can not access clustering SQL Server after relocation
I have a clustering SQL Server on Node1 and Node2, the Node1 has named
Instance1 and Node2 has named Instance2, no default instance. We
tested it that everthing is OK, then we decide to move to DR location.
The relocation kept the same virtual and phusical server name, and we
did not change SQL Server server network utility. But server IP
addresses were changed(vitual and physical). We can start the
clustering SQL Server as before, and everything looks like well.
However the users can not access it remotely, and they did not change
the client network utility. But if I login the server,I can access it
from Query Analyzer even though ther is not client network utility
setup on the server. I can ping the vitual server name, how can I make
sure the ports are working well? (We did not use the default port for
named instance).
I remember I did input the virtual server IP address when I installed
the clustering SQL Server. Of course, it was change after relocation.
Is it the reason for failed remote login? If it is, how to fix it?
Does anyboday know there is document for clustering SQL Server
relocation?
Thanks
Williew2jin@.hotmail.com (willie) wrote in message news:<6610106b.0408251200.14624760@.posting.google.com>...
> Hi all:
> I have a clustering SQL Server on Node1 and Node2, the Node1 has named
> Instance1 and Node2 has named Instance2, no default instance. We
> tested it that everthing is OK, then we decide to move to DR location.
> The relocation kept the same virtual and phusical server name, and we
> did not change SQL Server server network utility. But server IP
> addresses were changed(vitual and physical). We can start the
> clustering SQL Server as before, and everything looks like well.
> However the users can not access it remotely, and they did not change
> the client network utility. But if I login the server,I can access it
> from Query Analyzer even though ther is not client network utility
> setup on the server. I can ping the vitual server name, how can I make
> sure the ports are working well? (We did not use the default port for
> named instance).
> I remember I did input the virtual server IP address when I installed
> the clustering SQL Server. Of course, it was change after relocation.
> Is it the reason for failed remote login? If it is, how to fix it?
> Does anyboday know there is document for clustering SQL Server
> relocation?
> Thanks
> Willie
This article might help:
http://support.microsoft.com/defaul...8&Product=sql2k
Simon
can not access clustering SQL Server after relocation
I have a clustering SQL Server on Node1 and Node2, the Node1 has named
Instance1 and Node2 has named Instance2, no default instance. We
tested it that everthing is OK, then we decide to move to DR location.
The relocation kept the same virtual and phusical server name, and we
did not change SQL Server server network utility. But server IP
addresses were changed(vitual and physical). We can start the
clustering SQL Server as before, and everything looks like well.
However the users can not access it remotely, and they did not change
the client network utility. But if I login the server,I can access it
from Query Analyzer even though ther is not client network utility
setup on the server. I can ping the vitual server name, how can I make
sure the ports are working well? (We did not use the default port for
named instance).
I remember I did input the virtual server IP address when I installed
the clustering SQL Server. Of course, it was change after relocation.
Is it the reason for failed remote login? If it is, how to fix it?
Does anyboday know there is document for clustering SQL Server
relocation?
Thanks
Williew2jin@.hotmail.com (willie) wrote in message news:<6610106b.0408251200.14624760@.posting.googl
e.com>...
> Hi all:
> I have a clustering SQL Server on Node1 and Node2, the Node1 has named
> Instance1 and Node2 has named Instance2, no default instance. We
> tested it that everthing is OK, then we decide to move to DR location.
> The relocation kept the same virtual and phusical server name, and we
> did not change SQL Server server network utility. But server IP
> addresses were changed(vitual and physical). We can start the
> clustering SQL Server as before, and everything looks like well.
> However the users can not access it remotely, and they did not change
> the client network utility. But if I login the server,I can access it
> from Query Analyzer even though ther is not client network utility
> setup on the server. I can ping the vitual server name, how can I make
> sure the ports are working well? (We did not use the default port for
> named instance).
> I remember I did input the virtual server IP address when I installed
> the clustering SQL Server. Of course, it was change after relocation.
> Is it the reason for failed remote login? If it is, how to fix it?
> Does anyboday know there is document for clustering SQL Server
> relocation?
> Thanks
> Willie
This article might help:
http://support.microsoft.com/defaul...8&Product=sql2k
Simon
can not access clustering SQL Server after relocation
I have a clustering SQL Server on Node1 and Node2, the Node1 has named
Instance1 and Node2 has named Instance2, no default instance. We
tested it that everthing is OK, then we decide to move to DR location.
The relocation kept the same virtual and phusical server name, and we
did not change SQL Server server network utility. But server IP
addresses were changed(vitual and physical). We can start the
clustering SQL Server as before, and everything looks like well.
However the users can not access it remotely, and they did not change
the client network utility. But if I login the server,I can access it
from Query Analyzer even though ther is not client network utility
setup on the server. I can ping the vitual server name, how can I make
sure the ports are working well? (We did not use the default port for
named instance).
I remember I did input the virtual server IP address when I installed
the clustering SQL Server. Of course, it was change after relocation.
Is it the reason for failed remote login? If it is, how to fix it?
Does anyboday know there is document for clustering SQL Server
relocation?
Thanks
Williew2jin@.hotmail.com (willie) wrote in message news:<6610106b.0408251200.14624760@.posting.google.com>...
> Hi all:
> I have a clustering SQL Server on Node1 and Node2, the Node1 has named
> Instance1 and Node2 has named Instance2, no default instance. We
> tested it that everthing is OK, then we decide to move to DR location.
> The relocation kept the same virtual and phusical server name, and we
> did not change SQL Server server network utility. But server IP
> addresses were changed(vitual and physical). We can start the
> clustering SQL Server as before, and everything looks like well.
> However the users can not access it remotely, and they did not change
> the client network utility. But if I login the server,I can access it
> from Query Analyzer even though ther is not client network utility
> setup on the server. I can ping the vitual server name, how can I make
> sure the ports are working well? (We did not use the default port for
> named instance).
> I remember I did input the virtual server IP address when I installed
> the clustering SQL Server. Of course, it was change after relocation.
> Is it the reason for failed remote login? If it is, how to fix it?
> Does anyboday know there is document for clustering SQL Server
> relocation?
> Thanks
> Willie
This article might help:
http://support.microsoft.com/default.aspx?scid=kb;en-us;319578&Product=sql2k
Simonsql
can not access clustering SQL Server after relocation
I have a clustering SQL Server on Node1 and Node2, the Node1 has named
Instance1 and Node2 has named Instance2, no default instance. We
tested it that everthing is OK, then we decide to move to DR location.
The relocation kept the same virtual and phusical server name, and we
did not change SQL Server server network utility. But server IP
addresses were changed(vitual and physical). We can start the
clustering SQL Server as before, and everything looks like well.
However the users can not access it remotely, and they did not change
the client network utility. But if I login the server,I can access it
from Query Analyzer even though ther is not client network utility
setup on the server. I can ping the vitual server name, how can I make
sure the ports are working well? (We did not use the default port for
named instance).
I remember I did input the virtual server IP address when I installed
the clustering SQL Server. Of course, it was change after relocation.
Is it the reason for failed remote login? If it is, how to fix it?
Does anyboday know there is document for clustering SQL Server
relocation?
Thanks
Willie
w2jin@.hotmail.com (willie) wrote in message news:<6610106b.0408251200.14624760@.posting.google. com>...
> Hi all:
> I have a clustering SQL Server on Node1 and Node2, the Node1 has named
> Instance1 and Node2 has named Instance2, no default instance. We
> tested it that everthing is OK, then we decide to move to DR location.
> The relocation kept the same virtual and phusical server name, and we
> did not change SQL Server server network utility. But server IP
> addresses were changed(vitual and physical). We can start the
> clustering SQL Server as before, and everything looks like well.
> However the users can not access it remotely, and they did not change
> the client network utility. But if I login the server,I can access it
> from Query Analyzer even though ther is not client network utility
> setup on the server. I can ping the vitual server name, how can I make
> sure the ports are working well? (We did not use the default port for
> named instance).
> I remember I did input the virtual server IP address when I installed
> the clustering SQL Server. Of course, it was change after relocation.
> Is it the reason for failed remote login? If it is, how to fix it?
> Does anyboday know there is document for clustering SQL Server
> relocation?
> Thanks
> Willie
This article might help:
http://support.microsoft.com/default...&Product=sql2k
Simon
Monday, March 19, 2012
can not access clustering SQL Server after relocation
I have a clustering SQL Server on Node1 and Node2, the Node1 has named
Instance1 and Node2 has named Instance2, no default instance. We
tested it that everthing is OK, then we decide to move to DR location.
The relocation kept the same virtual and phusical server name, and we
did not change SQL Server server network utility. But server IP
addresses were changed(vitual and physical). We can start the
clustering SQL Server as before, and everything looks like well.
However the users can not access it remotely, and they did not change
the client network utility. But if I login the server,I can access it
from Query Analyzer even though ther is not client network utility
setup on the server. I can ping the vitual server name, how can I make
sure the ports are working well? (We did not use the default port for
named instance).
I remember I did input the virtual server IP address when I installed
the clustering SQL Server. Of course, it was change after relocation.
Is it the reason for failed remote login? If it is, how to fix it?
Does anyboday know there is document for clustering SQL Server
relocation?
Thanks
Willie
w2jin@.hotmail.com (willie) wrote in message news:<6610106b.0408251200.14624760@.posting.google. com>...
> Hi all:
> I have a clustering SQL Server on Node1 and Node2, the Node1 has named
> Instance1 and Node2 has named Instance2, no default instance. We
> tested it that everthing is OK, then we decide to move to DR location.
> The relocation kept the same virtual and phusical server name, and we
> did not change SQL Server server network utility. But server IP
> addresses were changed(vitual and physical). We can start the
> clustering SQL Server as before, and everything looks like well.
> However the users can not access it remotely, and they did not change
> the client network utility. But if I login the server,I can access it
> from Query Analyzer even though ther is not client network utility
> setup on the server. I can ping the vitual server name, how can I make
> sure the ports are working well? (We did not use the default port for
> named instance).
> I remember I did input the virtual server IP address when I installed
> the clustering SQL Server. Of course, it was change after relocation.
> Is it the reason for failed remote login? If it is, how to fix it?
> Does anyboday know there is document for clustering SQL Server
> relocation?
> Thanks
> Willie
This article might help:
http://support.microsoft.com/default...&Product=sql2k
Simon