Monday, March 19, 2012
Issues trying to connect to SQL Server
'Connection Open (PreLogIn handshake())
Any ideas what I did to create this issue and how I can fix it?
Thanks!Check the default NETLIB is TCP/IP and listening ports are configured as per the protocol. BTW any firewall is involved here.|||I got it figured out but...
What concerns do I need to allow for since I do have a hardware firewall in place?|||Any firewall on the environment, access should be enabled to allow users. In fact we had an issue earlier with such behaviour and figured out the culprit is FW.
Issues setting up users to authenticate via NT group into MSSQL
Does anyone have any ideas?
(Win XP, MSSQL 2000 SP3, Windows Group = "SQLUsers", member is "User2")
-- TSQL --
USE master
GO
sp_grantlogin 'pc\SQLUsers'
GO
sp_defaultdb 'pc\SQLUsers', 'theDB'
GO
USE theDB
GO
sp_grantdbaccess 'pc\SQLUsers', 'SQLUsers'
GO
GRANT EXECUTE ON [dbo].[uspThing] TO SQLUsers
GO
-- Trying to connect with OSQL.EXE:
> osql -d theDB -E
Login failed for user 'pc\User2'.
BUT....
runing it for the individual user:
--TSQL
USE master
GO
sp_grantlogin 'pc\User2'
GO
sp_defaultdb 'pc\User2', 'theDB'
GO
USE theDB
GO
sp_grantdbaccess 'pc\User2', 'SQLUsers'
GO
GRANT EXECUTE ON [dbo].[uspThing] TO SQLUsers
GO
-- now trying to connect with OSQL.EXE as User2:
>osql -d theDB -E
1> exec uspThing
2> go
3> data...
all is fine.....
I can't use the user method - to much admin... any ideas!?
PKOk, get this... because I was using "runas /user:User2 cmd.exe" sessions for testing the different users integrated security (osql -E -d dbName) etc the group changes I was making were not reflected until I logged out of the command session.
I have been officially driven mad by this one...
Monday, March 12, 2012
Issues
I've installed SQL Express as the default 'SQLExpress' install (windows
authentication) and while I can connect fine to my created databases from VS
Web Edition 2005 (using the test server) I cannot get access to the database
s
from IIS http://localhost/test.aspx for example. I've worked through variou
s
issues to get to this point and I now just want to use a connection string
i.e. string strConn = "Initial Catalog=Pandora; Integrated Security=True;
Database=Pandora; Server=WireslessBliss;"; to connect to my database and
while it doesn't initially throw an error as soon as I run the
objConn.Open(); line:
SqlConnection objConn = new SqlConnection(strConn);
SqlCommand objCommand = new SqlCommand("SELECT * FROM CatInfo2;", objConn);
objConn.Open();
(using the namespaces <%@. Import Namespace="System.Data"%>
<%@. Import Namespace="System.Data.SqlClient"%> )
it says this...Exception Details: System.Data.SqlClient.SqlException:
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding. And points to the objConn.Open()
;
line.
I am really frustrated by this as all I am trying to do is connect so I can
do a little hand coding without VS to get more of a feel for whats going on
with dotNet. I am just starting SQL Express as a move up from Access
Can someone PLEASE help!!
Thanks in advance.
AlexTry this one:
Dim cn As ADODB.Connection
Set cn = New Connection
cn.ConnectionString = "Provider=SQLNCLI.1;Integrated Security=SSPI;" & _
"Persist Security Info=False;" & _
"AttachDBFileName=" & App.Path & "\BDatos.mdf;Data
Source=servidor\sqlexpress"
73
"Alex" <Alex@.discussions.microsoft.com> escribi en el mensaje
news:40FA2342-7D46-44B4-A18A-3626B4C06541@.microsoft.com...
> Hi,
> I've installed SQL Express as the default 'SQLExpress' install (windows
> authentication) and while I can connect fine to my created databases from
> VS
> Web Edition 2005 (using the test server) I cannot get access to the
> databases
> from IIS http://localhost/test.aspx for example. I've worked through
> various
> issues to get to this point and I now just want to use a connection string
> i.e. string strConn = "Initial Catalog=Pandora; Integrated Security=True;
> Database=Pandora; Server=WireslessBliss;"; to connect to my database and
> while it doesn't initially throw an error as soon as I run the
> objConn.Open(); line:
> SqlConnection objConn = new SqlConnection(strConn);
> SqlCommand objCommand = new SqlCommand("SELECT * FROM CatInfo2;",
> objConn);
> objConn.Open();
> (using the namespaces <%@. Import Namespace="System.Data"%>
> <%@. Import Namespace="System.Data.SqlClient"%> )
> it says this...Exception Details: System.Data.SqlClient.SqlException:
> Timeout expired. The timeout period elapsed prior to completion of the
> operation or the server is not responding. And points to the
> objConn.Open();
> line.
> I am really frustrated by this as all I am trying to do is connect so I
> can
> do a little hand coding without VS to get more of a feel for whats going
> on
> with dotNet. I am just starting SQL Express as a move up from Access
> Can someone PLEASE help!!
> Thanks in advance.
> Alex
Issues
I've installed SQL Express as the default 'SQLExpress' install (windows
authentication) and while I can connect fine to my created databases from VS
Web Edition 2005 (using the test server) I cannot get access to the databases
from IIS http://localhost/test.aspx for example. I've worked through various
issues to get to this point and I now just want to use a connection string
i.e. string strConn = "Initial Catalog=Pandora; Integrated Security=True;
Database=Pandora; Server=WireslessBliss;"; to connect to my database and
while it doesn't initially throw an error as soon as I run the
objConn.Open(); line:
SqlConnection objConn = new SqlConnection(strConn);
SqlCommand objCommand = new SqlCommand("SELECT * FROM CatInfo2;", objConn);
objConn.Open();
(using the namespaces <%@. Import Namespace="System.Data"%>
<%@. Import Namespace="System.Data.SqlClient"%> )
it says this...Exception Details: System.Data.SqlClient.SqlException:
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding. And points to the objConn.Open();
line.
I am really frustrated by this as all I am trying to do is connect so I can
do a little hand coding without VS to get more of a feel for whats going on
with dotNet. I am just starting SQL Express as a move up from Access
Can someone PLEASE help!!
Thanks in advance.
Alex
Try this one:
Dim cn As ADODB.Connection
Set cn = New Connection
cn.ConnectionString = "Provider=SQLNCLI.1;Integrated Security=SSPI;" & _
"Persist Security Info=False;" & _
"AttachDBFileName=" & App.Path & "\BDatos.mdf;Data
Source=servidor\sqlexpress"
73
"Alex" <Alex@.discussions.microsoft.com> escribi en el mensaje
news:40FA2342-7D46-44B4-A18A-3626B4C06541@.microsoft.com...
> Hi,
> I've installed SQL Express as the default 'SQLExpress' install (windows
> authentication) and while I can connect fine to my created databases from
> VS
> Web Edition 2005 (using the test server) I cannot get access to the
> databases
> from IIS http://localhost/test.aspx for example. I've worked through
> various
> issues to get to this point and I now just want to use a connection string
> i.e. string strConn = "Initial Catalog=Pandora; Integrated Security=True;
> Database=Pandora; Server=WireslessBliss;"; to connect to my database and
> while it doesn't initially throw an error as soon as I run the
> objConn.Open(); line:
> SqlConnection objConn = new SqlConnection(strConn);
> SqlCommand objCommand = new SqlCommand("SELECT * FROM CatInfo2;",
> objConn);
> objConn.Open();
> (using the namespaces <%@. Import Namespace="System.Data"%>
> <%@. Import Namespace="System.Data.SqlClient"%> )
> it says this...Exception Details: System.Data.SqlClient.SqlException:
> Timeout expired. The timeout period elapsed prior to completion of the
> operation or the server is not responding. And points to the
> objConn.Open();
> line.
> I am really frustrated by this as all I am trying to do is connect so I
> can
> do a little hand coding without VS to get more of a feel for whats going
> on
> with dotNet. I am just starting SQL Express as a move up from Access
> Can someone PLEASE help!!
> Thanks in advance.
> Alex
Friday, March 9, 2012
issue with linked server connecting to Access
I have a linked server setup to connect to an access file from a filer
server. If I am on the server computer logged in using Windows NT
authencation, the connections works. However, if I use a native SQL login
(with sys admin rights) it gave the following error:
Server: Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 20
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: The Microsoft Jet database engine can
not
open the file '\\filer-la03p\Mbs\Credit Mortgage
Group\Programs\Databases\Credit MBS Data.mdb'. It is already opened
exclusively by another user, or you need permission to view its data.]
OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'
IDBInitialize::Initialize returned 0x80004005: ].
The linked server has security mapping as remote user:"admin" with password
null.
I also have noticed that if I connect to the server using EM from my desktop
using NT authencation, the error ocurrs as well. In this case I will say it
is a "double-hopping" issue. But why when using a native SQL account will
have a problem?
From my understanding when using linked server to connect to an access file,
it is using the service account that starts SQL Server. I had setup all
privilages required for the SQL Service account. And as I inicated earlier,
it connects ok if I am at the server using NT authencation to log in.
I rearch online and it seems like I am not the only one who has problems
with linked server for access from other computers. Unfortunately, nobody ha
s
given the resolutions that works for the requester.
Someone please help, we are a microsoft shop and everything is microsoft.
This problem has stopped our development for the business units a great deal
.
Our clients were just bought in to convert a lot of their stuff to SQL
Server. Now they are going to back off!
Thanks if someone can respond quickly.
ChristineA few suggestions:
--Make sure that the Access mdb (and mdw) reside on a file share that
the Windows account has read/write/delete ACLs on for the files and
folders.
--Make sure that the Access mdb is totally unsecured (check the owner
property -- it should NOT say 'unknown').
--Make sure that the login you are using is Admin with an empty string
(''), not null.
--Use filemon (www.sysinternals.com) to check to see if SQLS is
getting access to the files/folders.
FWIW, linked servers to Access are a real PITA. You'd have a much
easier time if you worked it the other way around, linking to SQL
Server from the Access .mdb.
--Mary
On Thu, 14 Oct 2004 11:35:04 -0700, "Christine C" <Christine
C@.discussions.microsoft.com> wrote:
>Hi,
>I have a linked server setup to connect to an access file from a filer
>server. If I am on the server computer logged in using Windows NT
>authencation, the connections works. However, if I use a native SQL login
>(with sys admin rights) it gave the following error:
>Server: Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 20
>OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
>[OLE/DB provider returned message: The Microsoft Jet database engine ca
nnot
>open the file '\\filer-la03p\Mbs\Credit Mortgage
>Group\Programs\Databases\Credit MBS Data.mdb'. It is already opened
>exclusively by another user, or you need permission to view its data.]
>OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'
>IDBInitialize::Initialize returned 0x80004005: ].
>The linked server has security mapping as remote user:"admin" with password
>null.
>I also have noticed that if I connect to the server using EM from my deskto
p
>using NT authencation, the error ocurrs as well. In this case I will say it
>is a "double-hopping" issue. But why when using a native SQL account will
>have a problem?
>From my understanding when using linked server to connect to an access file
,
>it is using the service account that starts SQL Server. I had setup all
>privilages required for the SQL Service account. And as I inicated earlier,
>it connects ok if I am at the server using NT authencation to log in.
>I rearch online and it seems like I am not the only one who has problems
>with linked server for access from other computers. Unfortunately, nobody h
as
>given the resolutions that works for the requester.
>Someone please help, we are a microsoft shop and everything is microsoft.
>This problem has stopped our development for the business units a great dea
l.
>Our clients were just bought in to convert a lot of their stuff to SQL
>Server. Now they are going to back off!
>Thanks if someone can respond quickly.
>Christine
>|||Mary,
Thanks for replying.
All the checklists you suggested are all there and correct, otherwise it
wouldn't have worked for some cases. It would just not work AT ALL.
I have found the fix for one issue now, but not another:
1. After I added the spn for the server to the AD account that started SQL
Server, I was able to connect from my desktop to the linked server through N
T
authencation.
Before this is only possible if I am at the server.
2. If I connect to SQL Server using SQL accounts, it still doesn't work on
either from the server or my desktop. So I was wondering if I login as 'sa',
what kind of security context that was verified against the file server on
the network? After it gets through the file system then the security check
will use "Admin" to open Access as specified in my linked server security
tab. But what happened before then?
I would assume either way (login as SQL or NT authencation to my SQL Server)
it should use the service account that starts SQL Server, but apparently it
is not the case.
I am really puzzled now...
"Mary Chipman" wrote:
> A few suggestions:
> --Make sure that the Access mdb (and mdw) reside on a file share that
> the Windows account has read/write/delete ACLs on for the files and
> folders.
> --Make sure that the Access mdb is totally unsecured (check the owner
> property -- it should NOT say 'unknown').
> --Make sure that the login you are using is Admin with an empty string
> (''), not null.
> --Use filemon (www.sysinternals.com) to check to see if SQLS is
> getting access to the files/folders.
> FWIW, linked servers to Access are a real PITA. You'd have a much
> easier time if you worked it the other way around, linking to SQL
> Server from the Access .mdb.
> --Mary
> On Thu, 14 Oct 2004 11:35:04 -0700, "Christine C" <Christine
> C@.discussions.microsoft.com> wrote:
>
>|||What did filemon show?
--Mary
On Thu, 14 Oct 2004 16:31:02 -0700, "Christine C"
<ChristineC@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Mary,
>Thanks for replying.
>All the checklists you suggested are all there and correct, otherwise it
>wouldn't have worked for some cases. It would just not work AT ALL.
>I have found the fix for one issue now, but not another:
>1. After I added the spn for the server to the AD account that started SQL
>Server, I was able to connect from my desktop to the linked server through
NT
>authencation.
>Before this is only possible if I am at the server.
>2. If I connect to SQL Server using SQL accounts, it still doesn't work on
>either from the server or my desktop. So I was wondering if I login as 'sa'
,
>what kind of security context that was verified against the file server on
>the network? After it gets through the file system then the security check
>will use "Admin" to open Access as specified in my linked server security
>tab. But what happened before then?
>I would assume either way (login as SQL or NT authencation to my SQL Server
)
>it should use the service account that starts SQL Server, but apparently it
>is not the case.
>I am really puzzled now...
>
>"Mary Chipman" wrote:
>
issue with linked server connecting to Access
I have a linked server setup to connect to an access file from a filer
server. If I am on the server computer logged in using Windows NT
authencation, the connections works. However, if I use a native SQL login
(with sys admin rights) it gave the following error:
Server: Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 20
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: The Microsoft Jet database engine cannot
open the file '\\filer-la03p\Mbs\Credit Mortgage
Group\Programs\Databases\Credit MBS Data.mdb'. It is already opened
exclusively by another user, or you need permission to view its data.]
OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'
IDBInitialize::Initialize returned 0x80004005: ].
The linked server has security mapping as remote user:"admin" with password
null.
I also have noticed that if I connect to the server using EM from my desktop
using NT authencation, the error ocurrs as well. In this case I will say it
is a "double-hopping" issue. But why when using a native SQL account will
have a problem?
From my understanding when using linked server to connect to an access file,
it is using the service account that starts SQL Server. I had setup all
privilages required for the SQL Service account. And as I inicated earlier,
it connects ok if I am at the server using NT authencation to log in.
I rearch online and it seems like I am not the only one who has problems
with linked server for access from other computers. Unfortunately, nobody has
given the resolutions that works for the requester.
Someone please help, we are a microsoft shop and everything is microsoft.
This problem has stopped our development for the business units a great deal.
Our clients were just bought in to convert a lot of their stuff to SQL
Server. Now they are going to back off!
Thanks if someone can respond quickly.
Christine
A few suggestions:
--Make sure that the Access mdb (and mdw) reside on a file share that
the Windows account has read/write/delete ACLs on for the files and
folders.
--Make sure that the Access mdb is totally unsecured (check the owner
property -- it should NOT say 'unknown').
--Make sure that the login you are using is Admin with an empty string
(''), not null.
--Use filemon (www.sysinternals.com) to check to see if SQLS is
getting access to the files/folders.
FWIW, linked servers to Access are a real PITA. You'd have a much
easier time if you worked it the other way around, linking to SQL
Server from the Access .mdb.
--Mary
On Thu, 14 Oct 2004 11:35:04 -0700, "Christine C" <Christine
C@.discussions.microsoft.com> wrote:
>Hi,
>I have a linked server setup to connect to an access file from a filer
>server. If I am on the server computer logged in using Windows NT
>authencation, the connections works. However, if I use a native SQL login
>(with sys admin rights) it gave the following error:
>Server: Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 20
>OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
>[OLE/DB provider returned message: The Microsoft Jet database engine cannot
>open the file '\\filer-la03p\Mbs\Credit Mortgage
>Group\Programs\Databases\Credit MBS Data.mdb'. It is already opened
>exclusively by another user, or you need permission to view its data.]
>OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'
>IDBInitialize::Initialize returned 0x80004005: ].
>The linked server has security mapping as remote user:"admin" with password
>null.
>I also have noticed that if I connect to the server using EM from my desktop
>using NT authencation, the error ocurrs as well. In this case I will say it
>is a "double-hopping" issue. But why when using a native SQL account will
>have a problem?
>From my understanding when using linked server to connect to an access file,
>it is using the service account that starts SQL Server. I had setup all
>privilages required for the SQL Service account. And as I inicated earlier,
>it connects ok if I am at the server using NT authencation to log in.
>I rearch online and it seems like I am not the only one who has problems
>with linked server for access from other computers. Unfortunately, nobody has
>given the resolutions that works for the requester.
>Someone please help, we are a microsoft shop and everything is microsoft.
>This problem has stopped our development for the business units a great deal.
>Our clients were just bought in to convert a lot of their stuff to SQL
>Server. Now they are going to back off!
>Thanks if someone can respond quickly.
>Christine
>
|||Mary,
Thanks for replying.
All the checklists you suggested are all there and correct, otherwise it
wouldn't have worked for some cases. It would just not work AT ALL.
I have found the fix for one issue now, but not another:
1. After I added the spn for the server to the AD account that started SQL
Server, I was able to connect from my desktop to the linked server through NT
authencation.
Before this is only possible if I am at the server.
2. If I connect to SQL Server using SQL accounts, it still doesn't work on
either from the server or my desktop. So I was wondering if I login as 'sa',
what kind of security context that was verified against the file server on
the network? After it gets through the file system then the security check
will use "Admin" to open Access as specified in my linked server security
tab. But what happened before then?
I would assume either way (login as SQL or NT authencation to my SQL Server)
it should use the service account that starts SQL Server, but apparently it
is not the case.
I am really puzzled now...
"Mary Chipman" wrote:
> A few suggestions:
> --Make sure that the Access mdb (and mdw) reside on a file share that
> the Windows account has read/write/delete ACLs on for the files and
> folders.
> --Make sure that the Access mdb is totally unsecured (check the owner
> property -- it should NOT say 'unknown').
> --Make sure that the login you are using is Admin with an empty string
> (''), not null.
> --Use filemon (www.sysinternals.com) to check to see if SQLS is
> getting access to the files/folders.
> FWIW, linked servers to Access are a real PITA. You'd have a much
> easier time if you worked it the other way around, linking to SQL
> Server from the Access .mdb.
> --Mary
> On Thu, 14 Oct 2004 11:35:04 -0700, "Christine C" <Christine
> C@.discussions.microsoft.com> wrote:
>
>
|||What did filemon show?
--Mary
On Thu, 14 Oct 2004 16:31:02 -0700, "Christine C"
<ChristineC@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Mary,
>Thanks for replying.
>All the checklists you suggested are all there and correct, otherwise it
>wouldn't have worked for some cases. It would just not work AT ALL.
>I have found the fix for one issue now, but not another:
>1. After I added the spn for the server to the AD account that started SQL
>Server, I was able to connect from my desktop to the linked server through NT
>authencation.
>Before this is only possible if I am at the server.
>2. If I connect to SQL Server using SQL accounts, it still doesn't work on
>either from the server or my desktop. So I was wondering if I login as 'sa',
>what kind of security context that was verified against the file server on
>the network? After it gets through the file system then the security check
>will use "Admin" to open Access as specified in my linked server security
>tab. But what happened before then?
>I would assume either way (login as SQL or NT authencation to my SQL Server)
>it should use the service account that starts SQL Server, but apparently it
>is not the case.
>I am really puzzled now...
>
>"Mary Chipman" wrote:
issue with linked server connecting to Access
I have a linked server setup to connect to an access file from a filer
server. If I am on the server computer logged in using Windows NT
authencation, the connections works. However, if I use a native SQL login
(with sys admin rights) it gave the following error:
Server: Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 20
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: The Microsoft Jet database engine cannot
open the file '\\filer-la03p\Mbs\Credit Mortgage
Group\Programs\Databases\Credit MBS Data.mdb'. It is already opened
exclusively by another user, or you need permission to view its data.]
OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'
IDBInitialize::Initialize returned 0x80004005: ].
The linked server has security mapping as remote user:"admin" with password
null.
I also have noticed that if I connect to the server using EM from my desktop
using NT authencation, the error ocurrs as well. In this case I will say it
is a "double-hopping" issue. But why when using a native SQL account will
have a problem?
From my understanding when using linked server to connect to an access file,
it is using the service account that starts SQL Server. I had setup all
privilages required for the SQL Service account. And as I inicated earlier,
it connects ok if I am at the server using NT authencation to log in.
I rearch online and it seems like I am not the only one who has problems
with linked server for access from other computers. Unfortunately, nobody has
given the resolutions that works for the requester.
Someone please help, we are a microsoft shop and everything is microsoft.
This problem has stopped our development for the business units a great deal.
Our clients were just bought in to convert a lot of their stuff to SQL
Server. Now they are going to back off!
Thanks if someone can respond quickly.
ChristineA few suggestions:
--Make sure that the Access mdb (and mdw) reside on a file share that
the Windows account has read/write/delete ACLs on for the files and
folders.
--Make sure that the Access mdb is totally unsecured (check the owner
property -- it should NOT say 'unknown').
--Make sure that the login you are using is Admin with an empty string
(''), not null.
--Use filemon (www.sysinternals.com) to check to see if SQLS is
getting access to the files/folders.
FWIW, linked servers to Access are a real PITA. You'd have a much
easier time if you worked it the other way around, linking to SQL
Server from the Access .mdb.
--Mary
On Thu, 14 Oct 2004 11:35:04 -0700, "Christine C" <Christine
C@.discussions.microsoft.com> wrote:
>Hi,
>I have a linked server setup to connect to an access file from a filer
>server. If I am on the server computer logged in using Windows NT
>authencation, the connections works. However, if I use a native SQL login
>(with sys admin rights) it gave the following error:
>Server: Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 20
>OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
>[OLE/DB provider returned message: The Microsoft Jet database engine cannot
>open the file '\\filer-la03p\Mbs\Credit Mortgage
>Group\Programs\Databases\Credit MBS Data.mdb'. It is already opened
>exclusively by another user, or you need permission to view its data.]
>OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'
>IDBInitialize::Initialize returned 0x80004005: ].
>The linked server has security mapping as remote user:"admin" with password
>null.
>I also have noticed that if I connect to the server using EM from my desktop
>using NT authencation, the error ocurrs as well. In this case I will say it
>is a "double-hopping" issue. But why when using a native SQL account will
>have a problem?
>From my understanding when using linked server to connect to an access file,
>it is using the service account that starts SQL Server. I had setup all
>privilages required for the SQL Service account. And as I inicated earlier,
>it connects ok if I am at the server using NT authencation to log in.
>I rearch online and it seems like I am not the only one who has problems
>with linked server for access from other computers. Unfortunately, nobody has
>given the resolutions that works for the requester.
>Someone please help, we are a microsoft shop and everything is microsoft.
>This problem has stopped our development for the business units a great deal.
>Our clients were just bought in to convert a lot of their stuff to SQL
>Server. Now they are going to back off!
>Thanks if someone can respond quickly.
>Christine
>|||Mary,
Thanks for replying.
All the checklists you suggested are all there and correct, otherwise it
wouldn't have worked for some cases. It would just not work AT ALL.
I have found the fix for one issue now, but not another:
1. After I added the spn for the server to the AD account that started SQL
Server, I was able to connect from my desktop to the linked server through NT
authencation.
Before this is only possible if I am at the server.
2. If I connect to SQL Server using SQL accounts, it still doesn't work on
either from the server or my desktop. So I was wondering if I login as 'sa',
what kind of security context that was verified against the file server on
the network? After it gets through the file system then the security check
will use "Admin" to open Access as specified in my linked server security
tab. But what happened before then?
I would assume either way (login as SQL or NT authencation to my SQL Server)
it should use the service account that starts SQL Server, but apparently it
is not the case.
I am really puzzled now...
"Mary Chipman" wrote:
> A few suggestions:
> --Make sure that the Access mdb (and mdw) reside on a file share that
> the Windows account has read/write/delete ACLs on for the files and
> folders.
> --Make sure that the Access mdb is totally unsecured (check the owner
> property -- it should NOT say 'unknown').
> --Make sure that the login you are using is Admin with an empty string
> (''), not null.
> --Use filemon (www.sysinternals.com) to check to see if SQLS is
> getting access to the files/folders.
> FWIW, linked servers to Access are a real PITA. You'd have a much
> easier time if you worked it the other way around, linking to SQL
> Server from the Access .mdb.
> --Mary
> On Thu, 14 Oct 2004 11:35:04 -0700, "Christine C" <Christine
> C@.discussions.microsoft.com> wrote:
> >Hi,
> >
> >I have a linked server setup to connect to an access file from a filer
> >server. If I am on the server computer logged in using Windows NT
> >authencation, the connections works. However, if I use a native SQL login
> >(with sys admin rights) it gave the following error:
> >
> >Server: Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 20
> >
> >OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
> >
> >[OLE/DB provider returned message: The Microsoft Jet database engine cannot
> >open the file '\\filer-la03p\Mbs\Credit Mortgage
> >Group\Programs\Databases\Credit MBS Data.mdb'. It is already opened
> >exclusively by another user, or you need permission to view its data.]
> >
> >OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'
> >IDBInitialize::Initialize returned 0x80004005: ].
> >
> >The linked server has security mapping as remote user:"admin" with password
> >null.
> >I also have noticed that if I connect to the server using EM from my desktop
> >using NT authencation, the error ocurrs as well. In this case I will say it
> >is a "double-hopping" issue. But why when using a native SQL account will
> >have a problem?
> >
> >From my understanding when using linked server to connect to an access file,
> >it is using the service account that starts SQL Server. I had setup all
> >privilages required for the SQL Service account. And as I inicated earlier,
> >it connects ok if I am at the server using NT authencation to log in.
> >
> >I rearch online and it seems like I am not the only one who has problems
> >with linked server for access from other computers. Unfortunately, nobody has
> >given the resolutions that works for the requester.
> >
> >Someone please help, we are a microsoft shop and everything is microsoft.
> >This problem has stopped our development for the business units a great deal.
> >Our clients were just bought in to convert a lot of their stuff to SQL
> >Server. Now they are going to back off!
> >
> >Thanks if someone can respond quickly.
> >
> >Christine
> >
>|||What did filemon show?
--Mary
On Thu, 14 Oct 2004 16:31:02 -0700, "Christine C"
<ChristineC@.discussions.microsoft.com> wrote:
>Mary,
>Thanks for replying.
>All the checklists you suggested are all there and correct, otherwise it
>wouldn't have worked for some cases. It would just not work AT ALL.
>I have found the fix for one issue now, but not another:
>1. After I added the spn for the server to the AD account that started SQL
>Server, I was able to connect from my desktop to the linked server through NT
>authencation.
>Before this is only possible if I am at the server.
>2. If I connect to SQL Server using SQL accounts, it still doesn't work on
>either from the server or my desktop. So I was wondering if I login as 'sa',
>what kind of security context that was verified against the file server on
>the network? After it gets through the file system then the security check
>will use "Admin" to open Access as specified in my linked server security
>tab. But what happened before then?
>I would assume either way (login as SQL or NT authencation to my SQL Server)
>it should use the service account that starts SQL Server, but apparently it
>is not the case.
>I am really puzzled now...
>
>"Mary Chipman" wrote:
>> A few suggestions:
>> --Make sure that the Access mdb (and mdw) reside on a file share that
>> the Windows account has read/write/delete ACLs on for the files and
>> folders.
>> --Make sure that the Access mdb is totally unsecured (check the owner
>> property -- it should NOT say 'unknown').
>> --Make sure that the login you are using is Admin with an empty string
>> (''), not null.
>> --Use filemon (www.sysinternals.com) to check to see if SQLS is
>> getting access to the files/folders.
>> FWIW, linked servers to Access are a real PITA. You'd have a much
>> easier time if you worked it the other way around, linking to SQL
>> Server from the Access .mdb.
>> --Mary
>> On Thu, 14 Oct 2004 11:35:04 -0700, "Christine C" <Christine
>> C@.discussions.microsoft.com> wrote:
>> >Hi,
>> >
>> >I have a linked server setup to connect to an access file from a filer
>> >server. If I am on the server computer logged in using Windows NT
>> >authencation, the connections works. However, if I use a native SQL login
>> >(with sys admin rights) it gave the following error:
>> >
>> >Server: Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 20
>> >
>> >OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
>> >
>> >[OLE/DB provider returned message: The Microsoft Jet database engine cannot
>> >open the file '\\filer-la03p\Mbs\Credit Mortgage
>> >Group\Programs\Databases\Credit MBS Data.mdb'. It is already opened
>> >exclusively by another user, or you need permission to view its data.]
>> >
>> >OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'
>> >IDBInitialize::Initialize returned 0x80004005: ].
>> >
>> >The linked server has security mapping as remote user:"admin" with password
>> >null.
>> >I also have noticed that if I connect to the server using EM from my desktop
>> >using NT authencation, the error ocurrs as well. In this case I will say it
>> >is a "double-hopping" issue. But why when using a native SQL account will
>> >have a problem?
>> >
>> >From my understanding when using linked server to connect to an access file,
>> >it is using the service account that starts SQL Server. I had setup all
>> >privilages required for the SQL Service account. And as I inicated earlier,
>> >it connects ok if I am at the server using NT authencation to log in.
>> >
>> >I rearch online and it seems like I am not the only one who has problems
>> >with linked server for access from other computers. Unfortunately, nobody has
>> >given the resolutions that works for the requester.
>> >
>> >Someone please help, we are a microsoft shop and everything is microsoft.
>> >This problem has stopped our development for the business units a great deal.
>> >Our clients were just bought in to convert a lot of their stuff to SQL
>> >Server. Now they are going to back off!
>> >
>> >Thanks if someone can respond quickly.
>> >
>> >Christine
>> >
>>
Wednesday, March 7, 2012
ISSUE WHILE CONNECTING TO ORACLE SOURCE WITH 64 BIT processor SQL SERVER SSIS
Hello All,
I have a unique problem while connecting to oracle source with a 64 bit processor. I can connect to the oracle from the command prompt in the 64 bit processor but not from SSIS.
The acutal problem is, when check the properties of the connection manager and provide a provider for oracle, and then provide username and password and click on test connection. I get the following error:
"Test Connection failed because of an error in initializing provider.ORA-06413: Connection not open"
Regards,
Raju
Hello All,
The above package is running fine with sql server 32 bit development but not running in 64 bit production server.
The oracle client that has been installed on the production server is a 32 bit, because our source database is an oracle 32 bit not 64 bit which is residing in another server.
Hope this additional information will help you people get it resolved.
Regards,
Raju
|||Hi Raju,
If you want to connect to Oracle using a 32bit driver, then you should execute the SSIS package using the 32bit version of DTEXEC.
Regards,
Christian
Friday, February 24, 2012
Issue using the JDBC driver to connect to a remote server
We have a customer in Japan who's using our tool to connect to their SQL Server. Our application runs on a Linux machine and uses the MSSQL JDBC driver for connectivity.
We're getting errors back that are not-decipherable because, I presume, they're in Japanese, and then our logs don't log them in Unicode, so they get flattened out as question marks. The errors come out looking something like this:
Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]? 'MSSQL'
?
SQL State: HY000
SQL Code: 4060
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]? 'sa' ?
SQL State: 28000
SQL Code: 18456
[Microsoft][SQLServer 2000 Driver for JDBC]An error occured while attempting to
log onto the database.
SQL State: 08001
SQL Code: 0
I think we could troubleshoot the problem if we could only read the errors coming back. I know in the ODBC world there are options like "Change the language of SQL Server system messages" and "Perform transaltion for character data" in the ODBC control panel. I couldn't find any similar options available in the JDBC driver however. Do they exist?
Even if they don't, just scanning the messages makes it pretty clear that there's an authentication/permissions issue at work here. We have another app using the same credentials that works fine though - so if there are any known issues about using JDBC to authenticate in a multi-lingual environment, that would be helpful too. Our tcpdumps seem to suggest that the JDBC driver is using multi-byte strings when communicating with the server, however the "working" application is using single-byte encoding. Could that be why we're not authenticating? How is that controlled? Note that at this point I'm just talking about authentication, not the codepages/encodings of the data in the database - right now I'm just worried about logging in.
Thanks!
Tom
I do not think app using single byte encoding should make any difference when logging in. You really should get the error string in English to understand what is going on.
|||Error 4060 is "Cannot open database "..." requested by the login. The login failed.", 18456 is "Login failed for user ...".
I am moving to the "SQL Server Security" forum for further follow-up.
Monday, February 20, 2012
Issue connecting to a remote SQL Server 2000
I get the following error message in quotes. I have a web application written in ASP.NET 2.0 through which I am trying to connect to a remote SQL Server 2000. My operating system is Windows Vista .
I looked at many different sites to find a solution for this but without any luck. I am sure someone would have seen this issue here and I expect them to shed some light.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server).
The connection string is located in my web.config file which looks like
<add name="AMSConn" connectionString="Data Source=xxxx;
Initial Catalog=testdb;User ID=sa;Password=xxxx" providerName="System.Data.SqlClient" />
I want to get this issue resolved and I need you guys help.
Please let me know if you need any more information.
Thanks
Bharat
Hello my friend,
First try to access the database from the actual database server using the username and password within your connection string. If this fails, you are using the wrong username and password.
If this works, then it is a remote issue. Try and ping the database server from the computer running your application and see if you get a response or request timed out.
Kind regards
Scotty
|||
Hi Scotty,
First, thanks for the reply. I already tried your first suggestion. It's working fine in the database server with the same credentials. So, not a problem with username and password.
But, when I tried Pinging the server as you indicated I am getting the request timed out error. I don't know what is the reason. I don't have any problems logging into the machine using remote desktop.
Any more suggestions.
Thanks
Bharat
|||
hi Scotty,I have also same problem.
I can ping to remote sql server and can connect with sql query analyser with same credentials.
But can't connect from my aspx application.
Issue connecting from C#, even though SSPI, it does ANONYMOUS LOGON
We are using Integrated Security=SSPI, and I can connect to SSAS 2005 just fine. I can also connect to the cube through OWC...
but when I try to connect in C# (.net 1.1), I get the message: the peer prematurely closed the connection. I did plenty of searches on this message, and I should have all the required files to connect - it just doesn't connect.
So I did a trace, and when I connect through OWC, it shows an Audit Log with my username. When I try to connect w/ .net, it shows ANONYMOUS LOGON
Here is my connection string that is being used: (xxx's are filled w/ the right values)
Provider=MSOLAP.3;Cache Authentication=True;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=xxx;Data Source=xxxx;
Any ideas?
I realized that this might be happening because the virtual directory was set to use anonymous access. So, I took that off of the directory and made sure 'integrated windows authentication' was checked. I did an iisreset and tried out the changes, but it still was using ANONYMOUS LOGON.
I then tried to make a normal windows app because before, I was using a web app. This connected with my name just fine!
So it seems like the problem is with the iis virtual directory setup still wanting to use the anonymous account. I even set deny permission to the web project directory for iusr, iwam, network service.
I'd be glad to receive some feedback.
|||Its the double hop scenario. The user comes in with credentials and they get used to access the web site/service. But when the web site/service goes to the db, the ASP.Net (local) user is used for authentication.That is why it works when one runs it outside the web site/service but not within. If it is IIS 6 you can try the application pooling in InetMgr by specifying a user that has access and the have the site use that pool...your mileage may vary.
Otherwise you will need to connect not using the impersonation route but by passing in a DB user name and password.
Another option is Active Directory and having the machine accepted while using Kerberos Authentication...but again, your mileage may vary.|||
There is a need to implement the specific user's crudentials when accessing SSAS. It sounds like one option you gave would still be using a single logon account.
If we go the route of active directory, is there a way to pass the current user's logon info but not have it be visible to developers? the connection open method takes a (plain text?) un/pw if SSPI isn't used.
|||You may want to look into Protected Configuration as provided by ASP.Net 2. That would encrypt the information into the web.config. See this Security Practices: ASP.NET 2.0 Security Practices at a Glance to see if that answers your question, search for (encryption). Otherwise one of the other notes may be beneficial.|||Were you able to get a resolution to this issue? I have a .NET application that I am trying to pass role-based security into SSAS 2005. This is a double-hop scenario and we have implemented Active Directory to try to restrict access to dimension data. However, it is not passing through the appropriate security restriction to the dimension data.Issue connecting from C#, even though SSPI, it does ANONYMOUS LOGON
We are using Integrated Security=SSPI, and I can connect to SSAS 2005 just fine. I can also connect to the cube through OWC...
but when I try to connect in C# (.net 1.1), I get the message: the peer prematurely closed the connection. I did plenty of searches on this message, and I should have all the required files to connect - it just doesn't connect.
So I did a trace, and when I connect through OWC, it shows an Audit Log with my username. When I try to connect w/ .net, it shows ANONYMOUS LOGON
Here is my connection string that is being used: (xxx's are filled w/ the right values)
Provider=MSOLAP.3;Cache Authentication=True;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=xxx;Data Source=xxxx;
Any ideas?
I realized that this might be happening because the virtual directory was set to use anonymous access. So, I took that off of the directory and made sure 'integrated windows authentication' was checked. I did an iisreset and tried out the changes, but it still was using ANONYMOUS LOGON.
I then tried to make a normal windows app because before, I was using a web app. This connected with my name just fine!
So it seems like the problem is with the iis virtual directory setup still wanting to use the anonymous account. I even set deny permission to the web project directory for iusr, iwam, network service.
I'd be glad to receive some feedback.
|||Its the double hop scenario. The user comes in with credentials and they get used to access the web site/service. But when the web site/service goes to the db, the ASP.Net (local) user is used for authentication.That is why it works when one runs it outside the web site/service but not within. If it is IIS 6 you can try the application pooling in InetMgr by specifying a user that has access and the have the site use that pool...your mileage may vary.
Otherwise you will need to connect not using the impersonation route but by passing in a DB user name and password.
Another option is Active Directory and having the machine accepted while using Kerberos Authentication...but again, your mileage may vary.|||
There is a need to implement the specific user's crudentials when accessing SSAS. It sounds like one option you gave would still be using a single logon account.
If we go the route of active directory, is there a way to pass the current user's logon info but not have it be visible to developers? the connection open method takes a (plain text?) un/pw if SSPI isn't used.
|||You may want to look into Protected Configuration as provided by ASP.Net 2. That would encrypt the information into the web.config. See this Security Practices: ASP.NET 2.0 Security Practices at a Glance to see if that answers your question, search for (encryption). Otherwise one of the other notes may be beneficial.|||Were you able to get a resolution to this issue? I have a .NET application that I am trying to pass role-based security into SSAS 2005. This is a double-hop scenario and we have implemented Active Directory to try to restrict access to dimension data. However, it is not passing through the appropriate security restriction to the dimension data.isqlw connection problems
the servers in EM. But, when I click on "Tools|SQL Query Analyzer", it times
out trying to connect with the error messages:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
exist or
access denied.
Followed by:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Conn
ect())
Why can't I connect with Query Analyzer, but I can with Enterprise Manager?
How do I resolve this?
I have no problems using Query Analyzer and connecting to my local sql
servers.
I have no problems using Query Analyzer to connect to local and remote sql
servers on my other computer, just with this one computer.
Thanks,
Wayne SheffieldFYI: I did check out http://support.microsoft.com/?kbid=328306, but nothing
there helped out.
Thanks,
Wayne
"Wayne Sheffield" <wayne_sheffield@.hotmail.com> wrote in message
news:OB2MF3caEHA.2812@.TK2MSFTNGP11.phx.gbl...
> I'm trying to connect to remote sql servers. I can connect to and work
with
> the servers in EM. But, when I click on "Tools|SQL Query Analyzer", it
times
> out trying to connect with the error messages:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does n
ot exist or
> access denied.
> Followed by:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Co
nnect())
> Why can't I connect with Query Analyzer, but I can with Enterprise
Manager?
> How do I resolve this?
> I have no problems using Query Analyzer and connecting to my local sql
> servers.
> I have no problems using Query Analyzer to connect to local and remote sql
> servers on my other computer, just with this one computer.
> Thanks,
> Wayne Sheffield
>|||Are you using the same account as EM uses?
Andrew J. Kelly SQL MVP
"Wayne Sheffield" <wayne_sheffield@.hotmail.com> wrote in message
news:OB2MF3caEHA.2812@.TK2MSFTNGP11.phx.gbl...
> I'm trying to connect to remote sql servers. I can connect to and work
with
> the servers in EM. But, when I click on "Tools|SQL Query Analyzer", it
times
> out trying to connect with the error messages:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does n
ot exist or
> access denied.
> Followed by:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Co
nnect())
> Why can't I connect with Query Analyzer, but I can with Enterprise
Manager?
> How do I resolve this?
> I have no problems using Query Analyzer and connecting to my local sql
> servers.
> I have no problems using Query Analyzer to connect to local and remote sql
> servers on my other computer, just with this one computer.
> Thanks,
> Wayne Sheffield
>|||Yes. When you open QA this way, it uses the EM account settings.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:uiF7z8daEHA.2840@.TK2MSFTNGP11.phx.gbl...
> Are you using the same account as EM uses?
> --
> Andrew J. Kelly SQL MVP
>
> "Wayne Sheffield" <wayne_sheffield@.hotmail.com> wrote in message
> news:OB2MF3caEHA.2812@.TK2MSFTNGP11.phx.gbl...
> with
> times
or[vbcol=seagreen]
> Manager?
sql[vbcol=seagreen]
>
isqlw connection problems
the servers in EM. But, when I click on "Tools|SQL Query Analyzer", it times
out trying to connect with the error messages:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.
Followed by:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect())
Why can't I connect with Query Analyzer, but I can with Enterprise Manager?
How do I resolve this?
I have no problems using Query Analyzer and connecting to my local sql
servers.
I have no problems using Query Analyzer to connect to local and remote sql
servers on my other computer, just with this one computer.
Thanks,
Wayne Sheffield
FYI: I did check out http://support.microsoft.com/?kbid=328306, but nothing
there helped out.
Thanks,
Wayne
"Wayne Sheffield" <wayne_sheffield@.hotmail.com> wrote in message
news:OB2MF3caEHA.2812@.TK2MSFTNGP11.phx.gbl...
> I'm trying to connect to remote sql servers. I can connect to and work
with
> the servers in EM. But, when I click on "Tools|SQL Query Analyzer", it
times
> out trying to connect with the error messages:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
> access denied.
> Followed by:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect())
> Why can't I connect with Query Analyzer, but I can with Enterprise
Manager?
> How do I resolve this?
> I have no problems using Query Analyzer and connecting to my local sql
> servers.
> I have no problems using Query Analyzer to connect to local and remote sql
> servers on my other computer, just with this one computer.
> Thanks,
> Wayne Sheffield
>
|||Are you using the same account as EM uses?
Andrew J. Kelly SQL MVP
"Wayne Sheffield" <wayne_sheffield@.hotmail.com> wrote in message
news:OB2MF3caEHA.2812@.TK2MSFTNGP11.phx.gbl...
> I'm trying to connect to remote sql servers. I can connect to and work
with
> the servers in EM. But, when I click on "Tools|SQL Query Analyzer", it
times
> out trying to connect with the error messages:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
> access denied.
> Followed by:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect())
> Why can't I connect with Query Analyzer, but I can with Enterprise
Manager?
> How do I resolve this?
> I have no problems using Query Analyzer and connecting to my local sql
> servers.
> I have no problems using Query Analyzer to connect to local and remote sql
> servers on my other computer, just with this one computer.
> Thanks,
> Wayne Sheffield
>
|||Yes. When you open QA this way, it uses the EM account settings.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:uiF7z8daEHA.2840@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> Are you using the same account as EM uses?
> --
> Andrew J. Kelly SQL MVP
>
> "Wayne Sheffield" <wayne_sheffield@.hotmail.com> wrote in message
> news:OB2MF3caEHA.2812@.TK2MSFTNGP11.phx.gbl...
> with
> times
or[vbcol=seagreen]
> Manager?
sql
>