Groups | Blog | Home
all groups > sql server msde > november 2006 >

sql server msde : Can not conenct to MSDE with VB.NET 2003


Thorgal
11/22/2006 8:02:43 AM
Hellow

First i appoligize for my english but I'm from Belgium

Second, this is my problem:

I installed a Server on my Server PC (Windows XP Professional)

setup SAPWD="mypwd" INSTANCENAME="MSDESERVER" DISABLENETWORKPROTOCOLS=0

SECURITYMODE="SQL" TARGETDIR="C:\MSDEINSTALL" /L*v C:\MSDELOG.TXT +
Enter

Works perfect, then I attached a database to it

osql -E -S peter-developer\VA3+ ENTER
EXEC sp_attach_db @dbname='VA2005',@filename1='C:\test\VA2005.mdf',
@filename2='C:\test\VA2005_LOG.ldf' + ENTER

This works, and in vb.net i can connect to it with

"Data Source=PETER-DEVELOPER\va3;Initial Catalog=VA2005;Integrated
Security=SSPI;"

But when i try this from i remote PC (Windows XP) I get an error that
says: SQL server does not exist or access is denied

I searched almost everywhere and i can't find the answer.

EXTRA information

With svrnetcn.exe a set Named pipes, TCP/IP and NWLINK IPX/SPX to
enabled
I put the firewall of, and the firewal of the router is off

Please help me
Arnie Rowland
11/22/2006 1:08:19 PM
I'm confused.

In the setup, you indicate that the instance name is: "MSDESERVER", yet in
the connection string you are connecting to: "PETER-DEVELOPER\va3".

Do you have a second instance named [va3]?

Shouldn't you use the instancename [MSDESERVER] in the connection string if
you want to connect to that instance?

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


[quoted text, click to view]

Norman Yuan
11/22/2006 1:23:06 PM
How do you connect the MSDE from the remote computer? Via an application
with the same ConnectionString as you showed? If yes, that means you are
using Windows security to connect to the MSDE. Is the remote computer on the
same domain network or peer-to-peer network? If it is domain network, you
need to have a SQL Server login created in MSDE that maps to the domain user
account used on that remote computer, or the user logged on to that remote
computer is a domain admin.

Since your MSDE's SQL Server security is enabled, you could specify user
name and password in the ConnectionString (i.e. using SQL Server security,
instead of Windows security). More important thing is to do a bit more study
on SQL Server/MSDE security.


[quoted text, click to view]

Andrea Montanari
11/23/2006 12:00:00 AM
hi,
[quoted text, click to view]

if you are on a workgroup, you can not directly use windows authentication
as it only works with "certified" credentials... this means that local
credentials like PETER-DEVELOPER\Administrators or PETER-DEVELOPER\Users or
PETER-DEVELOPER\Peter (if this Windows account exists) can (potentially)
work as a direct certification is available on the local machine being the
used count member of the local machine as well... the very same works if a
Domain Controller is present in the lan (obviously you are no longer in a
workgroup scenario) as the DC is the appropriate "tool" to certificate
credentials in lan scenarios...
in both secenarios, the account's sid is passed to SQL Server instance which
validates the presence of a corresponding enabled login, both of WinNT group
or WinNT individual account..

[quoted text, click to view]

when you try a remote WindowsNT authenticated connection without the
presence of a Domain Controller, the remote sid corresponding to the remote
account is passed, so credentials for OtherPC\AccountName is remoted...
obviously SQL Server can not validate these credentials and the connection
will be refused...

a dirty workaround is to create, on the SQL Server box, the very same
account (with the very same pwd) of the "remote" user... so you can create
the PETER-DEVELOPER\AccountName ... when connecting from the remote pc, a
sort of netbios inpersonation is performed as a local same account exists on
the SQL Server box... this is not granted to works in the future, as future
OS or even service packs for present OSs can (hopefully) modify this
behaviour...
in workgroup scenarios, the best method is to use standard SQL Server
authentication..
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
--------- remove DMO to reply

Thorgal
11/23/2006 12:09:06 AM

Arnie Rowland schreef:

[quoted text, click to view]


Sorry i copy pasted somethings from the installation board but this is
how it is

setup SAPWD="mypwd" INSTANCENAME="VA3" DISABLENETWORKPROTOCOLS=0


SECURITYMODE="SQL" TARGETDIR="C:\VA3" /L*v C:\MSDELOG.TXT +
Enter

Then attaching the database:

osql -E -S peter-developer\VA3+ ENTER
EXEC sp_attach_db @dbname='VA2005',@filename1='C:\test\VA2005.mdf',
@filename2='C:\test\VA2005_LOG.ldf' + ENTER


Sorry for that mistake.

The 2 computers are in the same worgroup, and when i typ
\\peter-developer I see the server PC and I can get files from it or
drop files on the PC.

I want to connect to the VA3 server with a VB.NET 2003 application and
i do it with following connection string

"Data Source=PETER-DEVELOPER\va3;Initial Catalog=VA2005;Integrated
Security=SSPI;"


Doesn't work

"Data Source=PETER-DEVELOPER\va3;Initial Catalog=VA2005;Integrated
Security=SSPI;User ID=sa; Password=pass"

Doesn't work

"Data Source=PETER-DEVELOPER\va3,1433;Initial Catalog=VA2005;Integrated

Security=SSPI;User ID=sa; Password=pass"

Doesn't work

"Data Source=Peter-developer\VA3,1433;Network
Library=DBMSSOCN;Integrated Security=SSPI;Initial Catalog=VA2005;User
ID=peter;Password=peter"

Doesn't work ether

You say something about making a new user, I don't understand that,
could you explain it again please
Arnie Rowland
11/23/2006 12:25:24 AM
You do not need to combine both "Integrated Security=SSPI" AND "User ID=sa;
Password=pass".

It is EITHER "Integrated Security=SSPI" OR "User ID=sa; Password=pass".

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


[quoted text, click to view]

AddThis Social Bookmark Button