473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Remote access to sql database...permissions

Hi all,

I need some help to access an SQL db on another machine. I am using VB.NET
and remoting to make a client/server connection...although I don't think
this is relevant to the question.

I have been asked to help with a small db project that will reside on our
office server and have approx. 5 users.

I have installed a copy of MSDE on my development machine and plan on doing
the same on my office 'server'....in fact it may well already be on there. I
also have another testbed to act as the client.

Because I don't really know what I'm doing...........I have copied the db
created on my client to the server. I have done this by 'cheating'. I use
the VB.NET IDE to create the correctly named db under the sql server. I then
go to this file in windows explorer and write over it (and the .LDF) with
the file from the client.

When I try to connect to this db remotely I get a fail to connect error
about not recognising 'localmachinename\guest'...sorry, not the exact error
wording. I can provide this if it will be helpful.

Can anyone point me in the right direct?

I don't have any sql/db tools other than anything that is included with MSDE
(which I don't think is much).

I will be posting other Q's for any experts out there!

Thanks in advance.

Phil
Jul 23 '05 #1
4 9881

"Phil" <Ph**@nospam.com> wrote in message
news:d4**********@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
Hi all,

I need some help to access an SQL db on another machine. I am using VB.NET
and remoting to make a client/server connection...although I don't think
this is relevant to the question.

I have been asked to help with a small db project that will reside on our
office server and have approx. 5 users.

I have installed a copy of MSDE on my development machine and plan on
doing the same on my office 'server'....in fact it may well already be on
there. I also have another testbed to act as the client.

Because I don't really know what I'm doing...........I have copied the db
created on my client to the server. I have done this by 'cheating'. I use
the VB.NET IDE to create the correctly named db under the sql server. I
then go to this file in windows explorer and write over it (and the .LDF)
with the file from the client.

When I try to connect to this db remotely I get a fail to connect error
about not recognising 'localmachinename\guest'...sorry, not the exact
error wording. I can provide this if it will be helpful.

Can anyone point me in the right direct?

I don't have any sql/db tools other than anything that is included with
MSDE (which I don't think is much).

I will be posting other Q's for any experts out there!

Thanks in advance.

Phil


I don't know exactly what caused the error (it's always a good idea to
provide the exact error message), however the way you've copied the database
probably isn't very reliable. See my reply to your previous post for more
details on how to copy a database to another server.

You should also consider that as of SP3, MSDE does not accept network
connections by default, so even if the database was copied correctly, you
might still not be able to access it remotely. More details here:

http://support.microsoft.com/default...b;en-us;319930

You can use SVRNETCN.EXE (the SQL Server Network Utility) to enable network
support.

Simon

Jul 23 '05 #2
Hi Simon or anyone else!

I have looked through the information provided by MS Support (from your
link...thanks) and have not been successful in connecting to the remote dB.
The error returned is:-

SQL - Cannot open database requested in login 'TsHelpDesk'. Login fails.

Login failed for user '[ClientMachineName]\ASPNET'. at
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString
options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable)
at SQLHelpDesk.HelpSC.FillDb() in
D:\Backup\Work\HelpDesk\SQLHelpDesk\HelpSC.vb:line 72
at SQLHelpDeskClient.HDeskClient.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\SQLHelpDeskClient\Default.aspx. vb:line 56

I use a standard SQL connection string:-

sqlcnn = New SqlConnection("data source=(local)\NetSDK;" & _
"initial catalog=TsHelpDesk;integrated security=SSPI")

I have tried changing the above to providing an authenticated user name, ie.
User ID=username;Password=;. I've also tried changing the db owner as well
as adding various user accounts to the dbowner using "sp_addrolemember
'dbowner'". None of this has changed the above response from the server, it
is always the same with the exception of the user details where I have
changed them!

Can you assist and further? I hope so!!!

Cheers for now.

Phil
"Simon Hayes" <sq*@hayes.ch> wrote in message
news:42**********@news.bluewin.ch...

"Phil" <Ph**@nospam.com> wrote in message
news:d4**********@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
Hi all,

I need some help to access an SQL db on another machine. I am using
VB.NET and remoting to make a client/server connection...although I don't
think this is relevant to the question.

I have been asked to help with a small db project that will reside on our
office server and have approx. 5 users.

I have installed a copy of MSDE on my development machine and plan on
doing the same on my office 'server'....in fact it may well already be on
there. I also have another testbed to act as the client.

Because I don't really know what I'm doing...........I have copied the db
created on my client to the server. I have done this by 'cheating'. I use
the VB.NET IDE to create the correctly named db under the sql server. I
then go to this file in windows explorer and write over it (and the .LDF)
with the file from the client.

When I try to connect to this db remotely I get a fail to connect error
about not recognising 'localmachinename\guest'...sorry, not the exact
error wording. I can provide this if it will be helpful.

Can anyone point me in the right direct?

I don't have any sql/db tools other than anything that is included with
MSDE (which I don't think is much).

I will be posting other Q's for any experts out there!

Thanks in advance.

Phil


I don't know exactly what caused the error (it's always a good idea to
provide the exact error message), however the way you've copied the
database probably isn't very reliable. See my reply to your previous post
for more details on how to copy a database to another server.

You should also consider that as of SP3, MSDE does not accept network
connections by default, so even if the database was copied correctly, you
might still not be able to access it remotely. More details here:

http://support.microsoft.com/default...b;en-us;319930

You can use SVRNETCN.EXE (the SQL Server Network Utility) to enable
network support.

Simon

Jul 23 '05 #3
"Cannot open database requested in login 'TsHelpDesk'" suggests that
either the database doesn't exist, or the login you're using has no
access to it. You say you're connecting to a "remote" database, but the
connection string seems to be local - could that be the issue?

If not, I would check that the login you're using has been granted
access to the database with sp_grantdbaccess.

Simon

Jul 23 '05 #4
"Cannot open database requested in login 'TsHelpDesk'" suggests that
either the database doesn't exist, or the login you're using has no
access to it. You say you're connecting to a "remote" database, but the
connection string seems to be local - could that be the issue?

If not, I would check that the login you're using has been granted
access to the database with sp_grantdbaccess.

Simon

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Rene' Nielsen | last post by:
Context: Running Windows 2003 Server on an intranet. A web is configured with an anonymous access account that is a domain account that has been granted the desired access to a file on another...
5
by: william | last post by:
Hi, I have an ASP page needs to access a remote MS Access2000 database, I got error "The Microsoft Jet database engine cannot open the file 'F:\Collect.mdb'. It is already opened exclusively by...
3
by: muralidharan | last post by:
Hi guys, I tried creating an application and it worked fine in the localhost. I uploaded the same into the web in a remote folder. The select or edit query in the application works fine. Whenever...
2
by: Jay | last post by:
Hello, Iam trying to access a mdb file from a shared drive \\mycomputer\files from ASP.NET and OLEDB. It works locally Computer A hosts IIS/ASP.Net. Files reside in ComputerB under a...
4
by: TC | last post by:
Hello All, I apology for posting to many groups but I wasn't sure which group would be best targeted with my question. I have inherited an ASP.Net application that requires some maintenance &...
3
by: Nick | last post by:
Hello all, I've spent a lot of my time on this issue, and I thought it best to share my solution with the community. A special thanks to Willy Denoyette for his help. Ive opened about two...
4
by: aspsql | last post by:
I have a website which runs off a Access database which I am currently converting to sql server database. I would like to still use my access front end for reporting and queries.. I created an...
7
by: Ike | last post by:
Let's say I have a MySQL 4.12 database, opened to the internet on 111.111.111.111 allowing all incoming and outgoing ports. I have a username and password setup, which CAN connect to this database,...
1
by: danishara | last post by:
Hi, I am going through some serious issues while connecting to ms access database on web. My database is on a shared hosted site. I am trying to access the db.mdb file.
0
by: boomertoo55 | last post by:
Trying to exec DTS task involving load of MS Access table to SQL Server 2000 table using Data Pump task via remote exec of xp_cmdshell command of dtsrun. That is, on client, connect to database...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.