Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Friday, March 30, 2012

Locked out

I am using the desktop sqlexpress 2005 and I was experimenting with the account setting and I accidentally disabled my access. I am using windows authentication and there is no password, just the windows login name.

How can I reactivate the login for this connection. Any help is greatly appreciated.Log on as administrator, then try.sql

Wednesday, March 28, 2012

Lock row.

Hello everyone,
I have a web project where users access a aspx page to view information stored in an SQL database.
My client want that one user can access a row of information and see it, allother users shouldn't be able to view or update thesame row?
it means whenever a row of data is displayed by some user, this row should be locked even for beeing viewed by all other users, when this user close this page, this row will be available. ?I should do this in code behind or something in sql...
How can I do that?

It is not easy to do but the link below will take you in the right direction. Hope this helps.

http://www.sql-server-performance.com/lock_contention_tamed_article.asp

|||

Thanks for your reply,
All I want to do is: if a userA access a row, all other users can't access this row even for reading.
I read the article but I didn't understand how can I do this.
Any help...

|||

No, not really. You'd have to roll your own method of locking out views when someone is viewing the same record.

Really, it sounds like a bad design.

|||

Goodway:

Thanks for your reply,
All I want to do is: if a userA access a row, all other users can't access this row even for reading.
I read the article but I didn't understand how can I do this.
Any help...

(UPDATE Users WITH (ROWLOCK)
SET Username = 'fred' WHERE Username = 'foobar'

By specifically requesting row-level locks, these problems are avoided.)

I got this from that link but I have told you it is not easy to lock access because as relational algebra expert Chris Date puts it a SELECT returns a table so you could be locking a table instead of one row through lock escalation managed by SQL Server. Hope this helps.

|||

That Update doesn't do what he asked for.

A) The WITH ROWLOCK really doesn't help. Sure, it (might) help with reducing contention by holding less granular locks, but... It doesn't hold the lock for any longer than the update statement takes to complete. That is unless you wrap it in a highly isolated transaction.

B) Transactions complete when the execution of the transaction variable is destroyed or the connection object is closed. This normally happens when the execution of the page completes. In order to avoid that (If it's even possible), you would need to stuff the transaction into either a session or application object so it doesn't go out of scope with the page finishes executing.

The workaround for B causes problems C,D and E.

C) Because the transaction (and locks) are now being held for LONG periods of time, you'll start having all kinds of performance and timeout problems within the database.

D) Memory usage within the webserver will skyrocket because of all the transaction/connection objects being held across postbacks. This will lead to additional scaling issues. Possibly consuming enough memory to trigger the .NET framework to recycle the application. Make sure to add plenty of memory to the webserver, and set the recycling threshold very high to avoid the locks being lost randomly when the system recycles the process.

E) Abandoned sessions will cause the record to be locked indefinately. What if the user loses power, or closes the browser? The server will continue to lock that record forever (Or until the session dies after a very long period of activity if you've stored the information in session, or until you recycle the application if you stored them in application). Sure the user can then log back in to the website, and he'll have to wait for the record to unlock itself before even he can do anything with the record.

The idea is flawed. Don't lock the record. Remember the original values, and when you go to update the record make sure the record still looks exactly the same prior to actually doing the update. The sql wizard will do this for you if you tell it to compare all values.

|||

(My client want that one user can access a row of information and see it, all other users shouldn't be able to view or update the same row?)

I was replying his original post and I understand he is trying to lock the viewing of scalar value well that is not something you could do without problems with RDBMS(relational database management systems).

Friday, March 23, 2012

Lock and unlock the table

Hi,
How would I lock a table so that the access calls from other applications are put in "wait" by sql server till I unlock ?

How would I do this ?

Thanks,
Fahad

TABLOCK table hint

See SQL Server 2005 Books Online topic Table Hint (Transact-SQL)

http://msdn2.microsoft.com/en-US/library/ms187373.aspx

Possibly SERIALIZABLE

See SQL Server 2005 Books Online topic

SET TRANSACTION ISOLATION LEVEL (Transact-SQL)

http://msdn2.microsoft.com/en-US/library/ms173763.aspx

|||Could you please explain your problem? Locking entire table hurts concurrency and performance. Maybe there are other ways to do this.|||MS SQL, and most "server" based databases, don't do that unless they absoulutely need too, and it is done by the engine, not the user.

What is it you are trying to do and why?

If you just want to make sure someone doesn't read partially updated data, use a transaction.|||

Tom Phillips wrote:

MS SQL, and most "server" based databases, don't do that unless they absoulutely need too, and it is done by the engine, not the user.

What is it you are trying to do and why?

If you just want to make sure someone doesn't read partially updated data, use a transaction.

I need a synchronization between two processes which are accessing a table, both are initiated with a second of difference, one prepares data for other and other consumes it. I want 2nd one to wait till 1st one is done. I dont wanna spend hours to do mutexes and semaphores things, I wonder if I could utilize this cool and time-saving feature of MSSQL, Performance is not a problem. These processes will run at midnight.

Thankyou|||There is no "good" way to do what you are looking for. The best you could do would be to start a transaction on the first process and when it is done, COMMIT.

The 2nd process would have to be set to:

SET TRANSACTION ISOLATION LEVEL READ COMMITTED

Also, you would have to make sure the 2nd process doesn't start before the 1st opens the transaction. I would schedule them 5 mins apart.

Lock and unlock the table

Hi,
How would I lock a table so that the access calls from other applications are put in "wait" by sql server till I unlock ?

How would I do this ?

Thanks,
Fahad

TABLOCK table hint

See SQL Server 2005 Books Online topic Table Hint (Transact-SQL)

http://msdn2.microsoft.com/en-US/library/ms187373.aspx

Possibly SERIALIZABLE

See SQL Server 2005 Books Online topic

SET TRANSACTION ISOLATION LEVEL (Transact-SQL)

http://msdn2.microsoft.com/en-US/library/ms173763.aspx

|||Could you please explain your problem? Locking entire table hurts concurrency and performance. Maybe there are other ways to do this.|||MS SQL, and most "server" based databases, don't do that unless they absoulutely need too, and it is done by the engine, not the user.

What is it you are trying to do and why?

If you just want to make sure someone doesn't read partially updated data, use a transaction.

|||

Tom Phillips wrote:

MS SQL, and most "server" based databases, don't do that unless they absoulutely need too, and it is done by the engine, not the user.

What is it you are trying to do and why?

If you just want to make sure someone doesn't read partially updated data, use a transaction.

I need a synchronization between two processes which are accessing a table, both are initiated with a second of difference, one prepares data for other and other consumes it. I want 2nd one to wait till 1st one is done. I dont wanna spend hours to do mutexes and semaphores things, I wonder if I could utilize this cool and time-saving feature of MSSQL, Performance is not a problem. These processes will run at midnight.

Thankyou|||There is no "good" way to do what you are looking for. The best you could do would be to start a transaction on the first process and when it is done, COMMIT.

The 2nd process would have to be set to:

SET TRANSACTION ISOLATION LEVEL READ COMMITTED

Also, you would have to make sure the 2nd process doesn't start before the 1st opens the transaction. I would schedule them 5 mins apart.

Lock and unlock the table

Hi,
How would I lock a table so that the access calls from other applications are put in "wait" by sql server till I unlock ?

How would I do this ?

Thanks,
Fahad

TABLOCK table hint

See SQL Server 2005 Books Online topic Table Hint (Transact-SQL)

http://msdn2.microsoft.com/en-US/library/ms187373.aspx

Possibly SERIALIZABLE

See SQL Server 2005 Books Online topic

SET TRANSACTION ISOLATION LEVEL (Transact-SQL)

http://msdn2.microsoft.com/en-US/library/ms173763.aspx

|||Could you please explain your problem? Locking entire table hurts concurrency and performance. Maybe there are other ways to do this.|||MS SQL, and most "server" based databases, don't do that unless they absoulutely need too, and it is done by the engine, not the user.

What is it you are trying to do and why?

If you just want to make sure someone doesn't read partially updated data, use a transaction.

|||

Tom Phillips wrote:

MS SQL, and most "server" based databases, don't do that unless they absoulutely need too, and it is done by the engine, not the user.

What is it you are trying to do and why?

If you just want to make sure someone doesn't read partially updated data, use a transaction.

I need a synchronization between two processes which are accessing a table, both are initiated with a second of difference, one prepares data for other and other consumes it. I want 2nd one to wait till 1st one is done. I dont wanna spend hours to do mutexes and semaphores things, I wonder if I could utilize this cool and time-saving feature of MSSQL, Performance is not a problem. These processes will run at midnight.

Thankyou|||There is no "good" way to do what you are looking for. The best you could do would be to start a transaction on the first process and when it is done, COMMIT.

The 2nd process would have to be set to:

SET TRANSACTION ISOLATION LEVEL READ COMMITTED

Also, you would have to make sure the 2nd process doesn't start before the 1st opens the transaction. I would schedule them 5 mins apart.

Lock a table until Package execution finishes

Hello,
I need to lock a table in startup of my package so that access calls from other applications are put on "wait" by sql server until I unlock.

Any idea how would I do it ?
Or is it possible or not ?

Thanks,
FahadIf you use MS Access database I think it will be locked automatically.|||You may want to jump over to the Transact-SQL forum to get help on this. I would imagine you can issue a table lock command in an Execute SQL task, and then when done processing release that lock in another Execute SQL task.

Wednesday, March 21, 2012

Lock a row in the database

Hello,

I created a form that retrieve a number from a database. Can I lock that record so that other people cannot access it?

Similar to "lock" function in Visual Fox Pro database.

Best regards,
Tee Song Yann

Sounds like you are doing some form of incrementing.

A very good way to handle that would be to use the OUTPUT capability of SQL 2005 -it allows you to BOTH increment and retrieve the incremented value in the same query.

Perhaps something like this:

DECLARE @.MyNumberTable table
( NextNumber int )

UPDATE MyNumberTable
SET NextNumber = ( NextNumber + 1 )
OUTPUT inserted.NextNumber INTO @.MyNumberTable

SELECT NextNumber
FROM @.MyNumberTable

|||

Hello Arnie Rowland,

Thanks for the reply. Your solution solved the first part of my problem. The record locking part is still remain unsolved. A friend from another forum suggested:

SET TRANSACTION ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SNAPSHOT | SERIALIZABLE }[ ; ]

What do you think?

All your help is much appriciated.

Best regards,
Tee Song Yann

|||

Are you attempting to create an auto-incrementing column? If so use an identity column.

Updating a central value and then holding a lock on it will introduce a bottleneck into your application as all connections will eventually be blocked waiting to update the same value.

|||

Dear Jerome Halmans,

My idea is:

1) I have a table that store various last used number for various document.

2) I will use those number combine with a few more code to create a meaningful serial number. (For example: An invoice will consist of XX XXXXXX XXXX which is the company code, year/month/date and next number of last used number.)

3) If another person login from another company, it will have different company code and different last number.

4) The fun part is I do not want to have jump numbers.

5) If the first user cancel the record inserting, then the number should stay unchanged.

6) The only way that I can think of is by locking the record while the first user is inserting the record.

Is there a batter way for me to achieve that?

Best regards,

Tee Song Yann

|||

I HIGHLY recommend dropping the idea of trying to maintain consequtive 'numbers' if users can 'cancel' the insert action. That will prove to be a major headache. That will create a significant blocking issue and a major performance problem.

Unless, of course, you do not assign the 'number' until the data is saved. At that point, the number can be reported back to the user (post-hoc), and there is not a cancellation issue.

|||

Thanks Arnie,

I get what you mean. I think I will follow your second idea.

Then just out of curiosity, SQL server can perform record locking?

Best regards,

Tee Song Yann

|||

Yes. Look up [ Hints -Locking ] in Books Online.

There are several ways to accomplish locking -it depends upon what you want to accomplish. With the exception of TRANSACTIONS, and in the absence of a clear understanding of the implications and effects, it is best to leave record locking behavior to the server.

Location of Report Files on Server

Does anyone know which directory contains the report (.rdl) files on the SQL
Server Reporting Services server? I'd like to access these files on the
server.
Thank you.There are no rdl files on the server. The process of deploying causes the
rdl to be stored in the database. If you need to retrieve the rdl that was
deployed you can do to report manager, click on the report, properties, edit
and give it a file name to put the rdl into.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Brian P" <BrianP@.discussions.microsoft.com> wrote in message
news:606DD94C-C004-4E30-BD72-DDBB0056C908@.microsoft.com...
> Does anyone know which directory contains the report (.rdl) files on the
> SQL
> Server Reporting Services server? I'd like to access these files on the
> server.
> Thank you.|||Bruce,
Understood. Thanks for the reply.
Brian
"Bruce L-C [MVP]" wrote:
> There are no rdl files on the server. The process of deploying causes the
> rdl to be stored in the database. If you need to retrieve the rdl that was
> deployed you can do to report manager, click on the report, properties, edit
> and give it a file name to put the rdl into.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
> news:606DD94C-C004-4E30-BD72-DDBB0056C908@.microsoft.com...
> > Does anyone know which directory contains the report (.rdl) files on the
> > SQL
> > Server Reporting Services server? I'd like to access these files on the
> > server.
> >
> > Thank you.
>
>

Monday, March 19, 2012

Localsystem account access deny

Hi All,

I have a SQL server, as I use a domain account to log on to SQL server and Sql server agent, all maintanence plans work good, since I changed from a domain into Localsystem account to log on to SQL server, and Sql server agent, all maintanence plans didn't work any more, then I tried only keep Localsystem account at SQl server , using a domain log on to Sql server agent, but it's still failed to maintanence plans. The error in job history is"Executed as user: candyl. sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step failed.". And the message at Sql server log is :"BackupDiskFile::CreateMedia: Backup device 'D:\Database Backups\Noon Backup\ESMDEV_db_200406141548.BAK' failed to create. Operating system error = 5(Access is denied.)". It looks like permission problem, but for Localsystem account which should has full permission, right? I tried may ways and searched from knowledge base , still couldn't find the related solution.
Anyone can give me some advices?

Thanks.Help please!!!!!|||Does the user candyl have NT permission to create files in the destination directory?|||If users have been set up permission at server box, they can create the directiory.|||1. Does the user 'candyl' has the admin rights on the SQL Server?
2. Try this: 1) log on to your server under the 'candyl' login abd try to create any (dummy) file under the 'D:\Database Backups\Noon Backup\' directory. Was it successful?

Wednesday, March 7, 2012

local server

maybe this can sound like a really stupid and basic question, but I dont have access to a remote server and i want to know how can I conect to a local server in my own machine.

if you expect a seepdy and accurate response , you must explain the full scenario... What version/Edition of sql server, what all are the action you have taken, whats the errror you got... pse be more descriptive...

madhu

|||

I have the same problem too. I'm Win xp pro Sp2 + Vs2002 + Vs2005 Pro. Sqlexpress 2005 is running. I want to connect with the master.mdf or create a new DB or attach an old sqlserver 2000 db as I did it with msde. Need I to install something else ? I 'm a beginner in Vs2005, in Sql server 2005 ... and english language too ! Many thank's

|||

this has been discussed in this topic ... just refer this and tell whether it solves your problem or not

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1266332&SiteID=1

Madhu

|||

I'm still Lungomare. I had to get another account because the other doesn't work anymore: not a good day... Thank you Madhu, my problem is another, a step behind: in the past i worked with VS2002 and sqlserver 2000 Enterprise Manager to project and manage my DB out from code. Must i reinstall sqlserver 2000 or any other tool ? I'd thought sqlserver express was enough... This is what i'm trying to do : VS2005, explore server, create new DB, server name : local, use win authentication, new db name: lungomare, the response is "PROVIDER NAMED PIPES : ERROR 40 ".

local server

maybe this can sound like a really stupid and basic question, but I dont have access to a remote server and i want to know how can I conect to a local server in my own machine.

if you expect a seepdy and accurate response , you must explain the full scenario... What version/Edition of sql server, what all are the action you have taken, whats the errror you got... pse be more descriptive...

madhu

|||

I have the same problem too. I'm Win xp pro Sp2 + Vs2002 + Vs2005 Pro. Sqlexpress 2005 is running. I want to connect with the master.mdf or create a new DB or attach an old sqlserver 2000 db as I did it with msde. Need I to install something else ? I 'm a beginner in Vs2005, in Sql server 2005 ... and english language too ! Many thank's

|||

this has been discussed in this topic ... just refer this and tell whether it solves your problem or not

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1266332&SiteID=1

Madhu

|||

I'm still Lungomare. I had to get another account because the other doesn't work anymore: not a good day... Thank you Madhu, my problem is another, a step behind: in the past i worked with VS2002 and sqlserver 2000 Enterprise Manager to project and manage my DB out from code. Must i reinstall sqlserver 2000 or any other tool ? I'd thought sqlserver express was enough... This is what i'm trying to do : VS2005, explore server, create new DB, server name : local, use win authentication, new db name: lungomare, the response is "PROVIDER NAMED PIPES : ERROR 40 ".

local or sql tables?

I have Access XP and SQL 2000. I'm doing tests for my
upsizing to SQL. I've read that I should have tables in
my Access FE for data that don't change much. Like
tblCity, tblEmployee and such. However, I do have a
question on tables that don't get changed much, but are
linked to other tables.
For instance, tblEmployee only change if there is someone
new to the company (not often do I change that).
tblProvider is similar to tblEmployee where I only add if
we get a new Provider (which can happen once a yr or two).
These two tables do have one-many relationships to other
tables. tblProvider has a one-many relationship to two
tables. tblEmployee has a link (not a one-many) to the
tblIncident that house incidents for an employee.
Should these two tables be local because they dont get
changed much or be SQL linked tables because they have a
relationship?
Being a SQL Server guy and wanting to make sure that ALL the data is
properly maintained, primary/foreign keys are in place so that all the data
that we expect to be there exists, the appropriate security exists, and
proper database backups are taken....
I would put everything in SQL Server.
Keith
"ngan" <anonymous@.discussions.microsoft.com> wrote in message
news:494f01c4a180$6b0804f0$a501280a@.phx.gbl...
> I have Access XP and SQL 2000. I'm doing tests for my
> upsizing to SQL. I've read that I should have tables in
> my Access FE for data that don't change much. Like
> tblCity, tblEmployee and such. However, I do have a
> question on tables that don't get changed much, but are
> linked to other tables.
> For instance, tblEmployee only change if there is someone
> new to the company (not often do I change that).
> tblProvider is similar to tblEmployee where I only add if
> we get a new Provider (which can happen once a yr or two).
> These two tables do have one-many relationships to other
> tables. tblProvider has a one-many relationship to two
> tables. tblEmployee has a link (not a one-many) to the
> tblIncident that house incidents for an employee.
> Should these two tables be local because they dont get
> changed much or be SQL linked tables because they have a
> relationship?
|||is there any time you want to have local tables? like
temp tables?
Thanks for your input.
One more question:
When I did the upsizing, it made triggers for the
relationships, instead of DRI. Is it just best to
recreate the SQL tables and re-do the upsizing to use
DRI? Or is there a way to change the trigger to DRI on
the existing tables?
Ngan
>--Original Message--
>Being a SQL Server guy and wanting to make sure that ALL
the data is
>properly maintained, primary/foreign keys are in place so
that all the data
>that we expect to be there exists, the appropriate
security exists, and
>proper database backups are taken....
>I would put everything in SQL Server.
>--
>Keith
>
>"ngan" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:494f01c4a180$6b0804f0$a501280a@.phx.gbl...
someone[vbcol=seagreen]
if[vbcol=seagreen]
two).
>.
>
|||What do you mean by "temp" tables? Temp tables are a concept within SQL
Server...these tables go away when the command that created them goes away.
I suspect that you mean temp working table...but I am not sure
how/why/where they would be used so I do not feel that I should say one way
or the other.
Yes, I would go for the PK/FK approach using DRI instead of the trigger
approach.
Keith
"Ngan" <anonymous@.discussions.microsoft.com> wrote in message
news:278701c4a196$ffbded60$a601280a@.phx.gbl...[vbcol=seagreen]
> is there any time you want to have local tables? like
> temp tables?
> Thanks for your input.
> One more question:
> When I did the upsizing, it made triggers for the
> relationships, instead of DRI. Is it just best to
> recreate the SQL tables and re-do the upsizing to use
> DRI? Or is there a way to change the trigger to DRI on
> the existing tables?
> Ngan
> the data is
> that all the data
> security exists, and
> message
> someone
> if
> two).
|||I was just trying to figure out when you would store a
table within the FE file. In any case, i have moved all
the tables to SQL like you suggested because of the
security and integrity issue...also because if I create a
website for this, I will need those other tables. so in
the end SQL will have to have all the tables.
Thanks for your help.
Ngan

>--Original Message--
>What do you mean by "temp" tables? Temp tables are a
concept within SQL
>Server...these tables go away when the command that
created them goes away.
>I suspect that you mean temp working table...but I am
not sure
>how/why/where they would be used so I do not feel that I
should say one way
>or the other.
>Yes, I would go for the PK/FK approach using DRI instead
of the trigger
>approach.
>--
>Keith
>
>"Ngan" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:278701c4a196$ffbded60$a601280a@.phx.gbl...
ALL[vbcol=seagreen]
so[vbcol=seagreen]
my[vbcol=seagreen]
tables in[vbcol=seagreen]
are[vbcol=seagreen]
add[vbcol=seagreen]
other[vbcol=seagreen]
two[vbcol=seagreen]
the[vbcol=seagreen]
get[vbcol=seagreen]
have a
>.
>
|||Having done some Access/SQL Server development, I'll throw in my 2 cents.
If you have split your Access application, so all forms, reports and code
live on the client workstation. Then use either code and/or linked tables
pointing back to the data on SQL Server. It is perfectly acceptable to use
local tables in Access to store more static data. Typically you need to code
routines, that on application startup determine if the local table data
needs to be refreshed.
Steve
"Ngan" <anonymous@.discussions.microsoft.com> wrote in message
news:297001c4a1b1$8cc6d220$a601280a@.phx.gbl...[vbcol=seagreen]
> I was just trying to figure out when you would store a
> table within the FE file. In any case, i have moved all
> the tables to SQL like you suggested because of the
> security and integrity issue...also because if I create a
> website for this, I will need those other tables. so in
> the end SQL will have to have all the tables.
> Thanks for your help.
> Ngan
> concept within SQL
> created them goes away.
> not sure
> should say one way
> of the trigger
> message
> ALL
> so
> my
> tables in
> are
> add
> other
> two
> the
> get
> have a

Friday, February 24, 2012

local ip address

i've got a ms access mdb connected to a sql server on the internet.
whats the quickest way to get the ipaddress on the client machine from
the client machine? since there is a existing connection, shudn't there
be a simple method call that returns the ipaddress on the connection or
something?
the solutions i've seen r very ugly :(
riyazYou can get the MAC address of the client by doing this...
select net_address from master..sysprocesses where spid = @.@.spid
You then need to do processing outside of SQL Server in order to relate the
net_address to an IP address.
Tony.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
<rmanchu@.gmail.com> wrote in message
news:1137653314.617807.262180@.g43g2000cwa.googlegroups.com...
> i've got a ms access mdb connected to a sql server on the internet.
> whats the quickest way to get the ipaddress on the client machine from
> the client machine? since there is a existing connection, shudn't there
> be a simple method call that returns the ipaddress on the connection or
> something?
> the solutions i've seen r very ugly :(
> riyaz
>|||yup i'm already getting the mac address like that. but i can't find any
clean function that relates the mac to the ipaddr. the code on the
mvp.org site returns a collection which i don't think can be related to
the mac
how can this be done?
? possible bug?
!!! i noticed the following when using access2003 over the internet to
sqlserver2000 !!!
when using my laptop with wifi, the net_address returned by
sysprocesses is INCORRECT. it returns my LAN mac_address when it shud
return my wifi mac_address since i'm connected the internet thru wifi.
can anybody duplicate this?
riyaz|||>> yup i'm already getting the mac address like that. but i can't find any
All you have to do is to use the address resolution protocol mapping. On
your command prompt, simply type in ARP -a. It should give you a table of
mapping between all MAC & IP addresses.
It is not that hard to get this information from t-SQL ( script or within a
procedure )using master..xp_cmdshell & get the IP address.
Anith|||hi.

> You can get the MAC address of the client by doing this...
> select net_address from master..sysprocesses where spid = @.@.spid
am already doing this

> You then need to do processing outside of SQL Server in order to relate th
e
> net_address to an IP address.
am working in access2003. could u give me an idea as to how i might go
about doing this?
i have 2 ip-addresses both dynamically allocated. i wud prefer a
general solution
riyaz|||I wrote this here just for you:
CREATE PROCEDURE usp_getboundAddresses
AS
BEGIN
SET NOCOUNT ON
IF OBJECT_ID('tempdb..#SomeTable') IS NULL
CREATE TABLE #SomeTable
(
ShellOutput VARCHAR(500)
)
INSERT INTO #SomeTable
EXEC xp_cmdshell 'nbtstat -a .'
SELECT
SUBSTRING( ShellOutput,
CHARINDEX('[',ShellOutput)+1,
LEN(ShellOutput) - CHARINDEX(']',ShellOutput) -2
) AS BoundAddress
from #SomeTable
WHERE ShellOutput LIKE '%Node IpAddress%' --the important lines
AND ShellOutput NOT LIKE '%0.0.0.0%' --Unassigned addresses
DROP TABLE #SomeTable
END
Returning the network adresses of the server.
HTH, Jens Suessmeyer.

Local Groups and Access.

I'm trying to prototype some reports, and having difficulties granting access
to users, connecting to my LocalHost.
I work for a company that uses LDAP.
I have RS running on my LocalHost, and would like to grant access to users
to Report Manager so they can render reports.
In the Computer management > Local Users & Groups > Groups: I see Users,
Guests. Can I add these group(s) in the Report Manager using 'New Role
Assignment', and assign a Role, like Browser, then will a unknown user be
able to visit the site and render some reports.
Thanks,
rwiethornI'm getting closer, the user can see the reportmanger but cannot run a report.
Here is what I did:
I created a user on my local machine, call him Bob. I then created a group
on my local machine, called ReportViewers, and added Bob to the group. I then
added the group to ReportManager, gave it a Content Manager role, and for
'Configure site-wide security', System Role Assignments, assigned the group
as System Users.
However, they can not view the report. Ther error points to the Datasource.
The Datasource is supposed to pull a recordset from the AdventureWorks
catalog. It uses the SA account. When I look at the datasource in the
ReportManager, the credentials are saved (user name: sa and its password).
So why would that not return the results from the AdventureWorks database?
Do I neeed to add the local group also to the Database and catalog?
Do I need to add the IUSR_machine account to the database?
Do I need to add the ASPNET account to the group?
All help is appreciated,
thanks, confused,
rwiethorn
"rwiethorn" wrote:
> I'm trying to prototype some reports, and having difficulties granting access
> to users, connecting to my LocalHost.
> I work for a company that uses LDAP.
> I have RS running on my LocalHost, and would like to grant access to users
> to Report Manager so they can render reports.
> In the Computer management > Local Users & Groups > Groups: I see Users,
> Guests. Can I add these group(s) in the Report Manager using 'New Role
> Assignment', and assign a Role, like Browser, then will a unknown user be
> able to visit the site and render some reports.
> Thanks,
> rwiethorn

Local DB Affected By VPN

I work on a local copy of a database (Access 2000 MDB with ODBC linked
tables to a SQL 7 database). The SQL Server db I'm working with is on my C
drive (MSDE). Occasionally I'll connect to a VPN to do something on a remote
computer, using PC Anywhere to perform the task. Doesn't involve my front or
back end at all, except that the computer I'm VPNing to has a SQL database
running.
OK, so I'm using my db; I connect to the VPN, and do my thing. Everything's
fine. However, if I then disconnect from the VPN (or if the VPN connection
times out and disconnects itself), I then can no longer access my local SQL
Server database. My Access application still works fine, as long as it
doesn't have to look at any data. When it does have to look at data, I get
ODBC call failed. I have to close and reopen my Access database, and then
everything is fine.
So, it seems that, for some reason, when I connect to the VPN, my local SQL
Server or the ODBC driver or something in the mix is looking at that remote
database as part of what I'm using. Then, when the VPN connection is closed,
it won't access my local database for some reason.
Oh, and my local database and the remote database both have the same name.
So that may be part of the problem.
Any ideas as to what's going on?
Thanks!
Neil
On 26 Nov, 10:15, "Neil" <nos...@.nospam.net> wrote:
> I work on a local copy of a database (Access 2000 MDB with ODBC linked
> tables to a SQL 7 database). The SQL Server db I'm working with is on my C
> drive (MSDE). Occasionally I'll connect to a VPN to do something on a remote
> computer, using PC Anywhere to perform the task. Doesn't involve my front or
> back end at all, except that the computer I'm VPNing to has a SQL database
> running.
> OK, so I'm using my db; I connect to the VPN, and do my thing. Everything's
> fine. However, if I then disconnect from the VPN (or if the VPN connection
> times out and disconnects itself), I then can no longer access my local SQL
> Server database. My Access application still works fine, as long as it
> doesn't have to look at any data. When it does have to look at data, I get
> ODBC call failed. I have to close and reopen my Access database, and then
> everything is fine.
> So, it seems that, for some reason, when I connect to the VPN, my local SQL
> Server or the ODBC driver or something in the mix is looking at that remote
> database as part of what I'm using. Then, when the VPN connection is closed,
> it won't access my local database for some reason.
> Oh, and my local database and the remote database both have the same name.
> So that may be part of the problem.
> Any ideas as to what's going on?
> Thanks!
> Neil
It's only a guess but have you got the means of using Remote Desktop
Terminal Services Client or MSN Messenger Remote Assistance (As a
test) instead of PCAnywhere? I worked on the Laplink support line many
years ago and can imagine that this might be the issue and rings some
bells but things have changed since.
All the best,
Martin
|||On 27 Nov, 13:46, theintrepidfox <theintrepid...@.hotmail.com> wrote:
> On 26 Nov, 10:15, "Neil" <nos...@.nospam.net> wrote:
>
>
>
>
>
>
> It's only a guess but have you got the means of using Remote Desktop
> Terminal Services Client or MSN Messenger Remote Assistance (As a
> test) instead of PCAnywhere? I worked on the Laplink support line many
> years ago and can imagine that this might be the issue and rings some
> bells but things have changed since.
> All the best,
> Martin- Hide quoted text -
> - Show quoted text -
The reason why I'm suggestin it is because PCAnywhere is perhaps
trying to synchromize files between the client and host (including
your .mdb) which is maybe still and remains in use by the Sync Process
when the VPN times out or disconnects.
|||Actually, it usually happens after PCAnywhere has been closed. While
PCAnywhere is open, the VPN connection stays active. After I close
PCAnywhere, if I don't disconnect from the VPN, then eventually the VPN
connection times out.
So, a typical scenario is: open Access app connected to local SQL Server;
later, connect to VPN and do stuff via PCAnywhere; close PCAnywhere; later,
VPN connection disconnects, and then connection to local SQL Server fails.
Have to close and reopen MDB for it to work.
Strange...
"theintrepidfox" <theintrepidfox@.hotmail.com> wrote in message
news:3e278590-302d-4549-82d4-2e12c0b51b1a@.i29g2000prf.googlegroups.com...
> On 26 Nov, 10:15, "Neil" <nos...@.nospam.net> wrote:
> It's only a guess but have you got the means of using Remote Desktop
> Terminal Services Client or MSN Messenger Remote Assistance (As a
> test) instead of PCAnywhere? I worked on the Laplink support line many
> years ago and can imagine that this might be the issue and rings some
> bells but things have changed since.
> All the best,
> Martin
|||"theintrepidfox" <theintrepidfox@.hotmail.com> wrote in message
news:9cb60b5b-5160-4afe-8555-8ed2bed12b09@.s36g2000prg.googlegroups.com...
> On 27 Nov, 13:46, theintrepidfox <theintrepid...@.hotmail.com> wrote:
> The reason why I'm suggestin it is because PCAnywhere is perhaps
> trying to synchromize files between the client and host (including
> your .mdb) which is maybe still and remains in use by the Sync Process
> when the VPN times out or disconnects.
Yeah, I don't think that's it. I tried connecting to the VPN without doing
anything else, and the results were the same. Something in SQL Server itself
is looking at that other server for some reason. Maybe because they both
have same-named databases. I don't know.
Thanks,
Neil
|||Not really, but you may try adding an entry to your host file pointing to
your local box and using the loopback IP. My vague guess is that possibly
you're getting into a situation where you get an IP through VPN and it
doesn't resolve the new IP when you get disconnected. Mind you, that's just
a guess, but it's all I've got right now.
Anyway, try the host file thing and see if that does anything for you.
"Neil" wrote:

> I work on a local copy of a database (Access 2000 MDB with ODBC linked
> tables to a SQL 7 database). The SQL Server db I'm working with is on my C
> drive (MSDE). Occasionally I'll connect to a VPN to do something on a remote
> computer, using PC Anywhere to perform the task. Doesn't involve my front or
> back end at all, except that the computer I'm VPNing to has a SQL database
> running.
> OK, so I'm using my db; I connect to the VPN, and do my thing. Everything's
> fine. However, if I then disconnect from the VPN (or if the VPN connection
> times out and disconnects itself), I then can no longer access my local SQL
> Server database. My Access application still works fine, as long as it
> doesn't have to look at any data. When it does have to look at data, I get
> ODBC call failed. I have to close and reopen my Access database, and then
> everything is fine.
> So, it seems that, for some reason, when I connect to the VPN, my local SQL
> Server or the ODBC driver or something in the mix is looking at that remote
> database as part of what I'm using. Then, when the VPN connection is closed,
> it won't access my local database for some reason.
> Oh, and my local database and the remote database both have the same name.
> So that may be part of the problem.
> Any ideas as to what's going on?
> Thanks!
> Neil
>
>

Local DB Affected By VPN

I work on a local copy of a database (Access 2000 MDB with ODBC linked
tables to a SQL 7 database). The SQL Server db I'm working with is on my C
drive (MSDE). Occasionally I'll connect to a VPN to do something on a remote
computer, using PC Anywhere to perform the task. Doesn't involve my front or
back end at all, except that the computer I'm VPNing to has a SQL database
running.

OK, so I'm using my db; I connect to the VPN, and do my thing. Everything's
fine. However, if I then disconnect from the VPN (or if the VPN connection
times out and disconnects itself), I then can no longer access my local SQL
Server database. My Access application still works fine, as long as it
doesn't have to look at any data. When it does have to look at data, I get
ODBC call failed. I have to close and reopen my Access database, and then
everything is fine.

So, it seems that, for some reason, when I connect to the VPN, my local SQL
Server or the ODBC driver or something in the mix is looking at that remote
database as part of what I'm using. Then, when the VPN connection is closed,
it won't access my local database for some reason.

Oh, and my local database and the remote database both have the same name.
So that may be part of the problem.

Any ideas as to what's going on?

Thanks!

NeilOn 26 Nov, 10:15, "Neil" <nos...@.nospam.netwrote:

Quote:

Originally Posted by

I work on a local copy of a database (Access 2000 MDB with ODBC linked
tables to a SQL 7 database). The SQL Server db I'm working with is on my C
drive (MSDE). Occasionally I'll connect to a VPN to do something on a remote
computer, using PC Anywhere to perform the task. Doesn't involve my front or
back end at all, except that the computer I'm VPNing to has a SQL database
running.
>
OK, so I'm using my db; I connect to the VPN, and do my thing. Everything's
fine. However, if I then disconnect from the VPN (or if the VPN connection
times out and disconnects itself), I then can no longer access my local SQL
Server database. My Access application still works fine, as long as it
doesn't have to look at any data. When it does have to look at data, I get
ODBC call failed. I have to close and reopen my Access database, and then
everything is fine.
>
So, it seems that, for some reason, when I connect to the VPN, my local SQL
Server or the ODBC driver or something in the mix is looking at that remote
database as part of what I'm using. Then, when the VPN connection is closed,
it won't access my local database for some reason.
>
Oh, and my local database and the remote database both have the same name.
So that may be part of the problem.
>
Any ideas as to what's going on?
>
Thanks!
>
Neil


It's only a guess but have you got the means of using Remote Desktop
Terminal Services Client or MSN Messenger Remote Assistance (As a
test) instead of PCAnywhere? I worked on the Laplink support line many
years ago and can imagine that this might be the issue and rings some
bells but things have changed since.

All the best,

Martin|||On 27 Nov, 13:46, theintrepidfox <theintrepid...@.hotmail.comwrote:

Quote:

Originally Posted by

On 26 Nov, 10:15, "Neil" <nos...@.nospam.netwrote:
>
>
>
>
>

Quote:

Originally Posted by

I work on a local copy of a database (Access 2000 MDB with ODBC linked
tables to a SQL 7 database). The SQL Server db I'm working with is on my C
drive (MSDE). Occasionally I'll connect to a VPN to do something on a remote
computer, using PC Anywhere to perform the task. Doesn't involve my front or
back end at all, except that the computer I'm VPNing to has a SQL database
running.


>

Quote:

Originally Posted by

OK, so I'm using my db; I connect to the VPN, and do my thing. Everything's
fine. However, if I then disconnect from the VPN (or if the VPN connection
times out and disconnects itself), I then can no longer access my local SQL
Server database. My Access application still works fine, as long as it
doesn't have to look at any data. When it does have to look at data, I get
ODBC call failed. I have to close and reopen my Access database, and then
everything is fine.


>

Quote:

Originally Posted by

So, it seems that, for some reason, when I connect to the VPN, my local SQL
Server or the ODBC driver or something in the mix is looking at that remote
database as part of what I'm using. Then, when the VPN connection is closed,
it won't access my local database for some reason.


>

Quote:

Originally Posted by

Oh, and my local database and the remote database both have the same name.
So that may be part of the problem.


>

Quote:

Originally Posted by

Any ideas as to what's going on?


>

Quote:

Originally Posted by

Thanks!


>

Quote:

Originally Posted by

Neil


>
It's only a guess but have you got the means of using Remote Desktop
Terminal Services Client or MSN Messenger Remote Assistance (As a
test) instead of PCAnywhere? I worked on the Laplink support line many
years ago and can imagine that this might be the issue and rings some
bells but things have changed since.
>
All the best,
>
Martin- Hide quoted text -
>
- Show quoted text -


The reason why I'm suggestin it is because PCAnywhere is perhaps
trying to synchromize files between the client and host (including
your .mdb) which is maybe still and remains in use by the Sync Process
when the VPN times out or disconnects.|||Actually, it usually happens after PCAnywhere has been closed. While
PCAnywhere is open, the VPN connection stays active. After I close
PCAnywhere, if I don't disconnect from the VPN, then eventually the VPN
connection times out.

So, a typical scenario is: open Access app connected to local SQL Server;
later, connect to VPN and do stuff via PCAnywhere; close PCAnywhere; later,
VPN connection disconnects, and then connection to local SQL Server fails.
Have to close and reopen MDB for it to work.

Strange...

"theintrepidfox" <theintrepidfox@.hotmail.comwrote in message
news:3e278590-302d-4549-82d4-2e12c0b51b1a@.i29g2000prf.googlegroups.com...

Quote:

Originally Posted by

On 26 Nov, 10:15, "Neil" <nos...@.nospam.netwrote:

Quote:

Originally Posted by

>I work on a local copy of a database (Access 2000 MDB with ODBC linked
>tables to a SQL 7 database). The SQL Server db I'm working with is on my
>C
>drive (MSDE). Occasionally I'll connect to a VPN to do something on a
>remote
>computer, using PC Anywhere to perform the task. Doesn't involve my front
>or
>back end at all, except that the computer I'm VPNing to has a SQL
>database
>running.
>>
>OK, so I'm using my db; I connect to the VPN, and do my thing.
>Everything's
>fine. However, if I then disconnect from the VPN (or if the VPN
>connection
>times out and disconnects itself), I then can no longer access my local
>SQL
>Server database. My Access application still works fine, as long as it
>doesn't have to look at any data. When it does have to look at data, I
>get
>ODBC call failed. I have to close and reopen my Access database, and then
>everything is fine.
>>
>So, it seems that, for some reason, when I connect to the VPN, my local
>SQL
>Server or the ODBC driver or something in the mix is looking at that
>remote
>database as part of what I'm using. Then, when the VPN connection is
>closed,
>it won't access my local database for some reason.
>>
>Oh, and my local database and the remote database both have the same
>name.
>So that may be part of the problem.
>>
>Any ideas as to what's going on?
>>
>Thanks!
>>
>Neil


>
It's only a guess but have you got the means of using Remote Desktop
Terminal Services Client or MSN Messenger Remote Assistance (As a
test) instead of PCAnywhere? I worked on the Laplink support line many
years ago and can imagine that this might be the issue and rings some
bells but things have changed since.
>
All the best,
>
Martin

|||"theintrepidfox" <theintrepidfox@.hotmail.comwrote in message
news:9cb60b5b-5160-4afe-8555-8ed2bed12b09@.s36g2000prg.googlegroups.com...

Quote:

Originally Posted by

On 27 Nov, 13:46, theintrepidfox <theintrepid...@.hotmail.comwrote:

Quote:

Originally Posted by

>On 26 Nov, 10:15, "Neil" <nos...@.nospam.netwrote:
>>
>>
>>
>>
>>

Quote:

Originally Posted by

I work on a local copy of a database (Access 2000 MDB with ODBC linked
tables to a SQL 7 database). The SQL Server db I'm working with is on
my C
drive (MSDE). Occasionally I'll connect to a VPN to do something on a
remote
computer, using PC Anywhere to perform the task. Doesn't involve my
front or
back end at all, except that the computer I'm VPNing to has a SQL
database
running.


>>

Quote:

Originally Posted by

OK, so I'm using my db; I connect to the VPN, and do my thing.
Everything's
fine. However, if I then disconnect from the VPN (or if the VPN
connection
times out and disconnects itself), I then can no longer access my local
SQL
Server database. My Access application still works fine, as long as it
doesn't have to look at any data. When it does have to look at data, I
get
ODBC call failed. I have to close and reopen my Access database, and
then
everything is fine.


>>

Quote:

Originally Posted by

So, it seems that, for some reason, when I connect to the VPN, my local
SQL
Server or the ODBC driver or something in the mix is looking at that
remote
database as part of what I'm using. Then, when the VPN connection is
closed,
it won't access my local database for some reason.


>>

Quote:

Originally Posted by

Oh, and my local database and the remote database both have the same
name.
So that may be part of the problem.


>>

Quote:

Originally Posted by

Any ideas as to what's going on?


>>

Quote:

Originally Posted by

Thanks!


>>

Quote:

Originally Posted by

Neil


>>
>It's only a guess but have you got the means of using Remote Desktop
>Terminal Services Client or MSN Messenger Remote Assistance (As a
>test) instead of PCAnywhere? I worked on the Laplink support line many
>years ago and can imagine that this might be the issue and rings some
>bells but things have changed since.
>>
>All the best,
>>
>Martin- Hide quoted text -
>>
>- Show quoted text -


>
The reason why I'm suggestin it is because PCAnywhere is perhaps
trying to synchromize files between the client and host (including
your .mdb) which is maybe still and remains in use by the Sync Process
when the VPN times out or disconnects.


Yeah, I don't think that's it. I tried connecting to the VPN without doing
anything else, and the results were the same. Something in SQL Server itself
is looking at that other server for some reason. Maybe because they both
have same-named databases. I don't know.

Thanks,

Neil

Local DB Affected By VPN

I work on a local copy of a database (Access 2000 MDB with ODBC linked
tables to a SQL 7 database). The SQL Server db I'm working with is on my C
drive (MSDE). Occasionally I'll connect to a VPN to do something on a remote
computer, using PC Anywhere to perform the task. Doesn't involve my front or
back end at all, except that the computer I'm VPNing to has a SQL database
running.
OK, so I'm using my db; I connect to the VPN, and do my thing. Everything's
fine. However, if I then disconnect from the VPN (or if the VPN connection
times out and disconnects itself), I then can no longer access my local SQL
Server database. My Access application still works fine, as long as it
doesn't have to look at any data. When it does have to look at data, I get
ODBC call failed. I have to close and reopen my Access database, and then
everything is fine.
So, it seems that, for some reason, when I connect to the VPN, my local SQL
Server or the ODBC driver or something in the mix is looking at that remote
database as part of what I'm using. Then, when the VPN connection is closed,
it won't access my local database for some reason.
Oh, and my local database and the remote database both have the same name.
So that may be part of the problem.
Any ideas as to what's going on?
Thanks!
NeilOn 26 Nov, 10:15, "Neil" <nos...@.nospam.net> wrote:
> I work on a local copy of a database (Access 2000 MDB with ODBC linked
> tables to a SQL 7 database). The SQL Server db I'm working with is on my C
> drive (MSDE). Occasionally I'll connect to a VPN to do something on a remo
te
> computer, using PC Anywhere to perform the task. Doesn't involve my front
or
> back end at all, except that the computer I'm VPNing to has a SQL database
> running.
> OK, so I'm using my db; I connect to the VPN, and do my thing. Everything'
s
> fine. However, if I then disconnect from the VPN (or if the VPN connection
> times out and disconnects itself), I then can no longer access my local SQ
L
> Server database. My Access application still works fine, as long as it
> doesn't have to look at any data. When it does have to look at data, I ge
t
> ODBC call failed. I have to close and reopen my Access database, and then
> everything is fine.
> So, it seems that, for some reason, when I connect to the VPN, my local SQ
L
> Server or the ODBC driver or something in the mix is looking at that remot
e
> database as part of what I'm using. Then, when the VPN connection is close
d,
> it won't access my local database for some reason.
> Oh, and my local database and the remote database both have the same name.
> So that may be part of the problem.
> Any ideas as to what's going on?
> Thanks!
> Neil
It's only a guess but have you got the means of using Remote Desktop
Terminal Services Client or MSN Messenger Remote Assistance (As a
test) instead of PCAnywhere? I worked on the Laplink support line many
years ago and can imagine that this might be the issue and rings some
bells but things have changed since.
All the best,
Martin|||On 27 Nov, 13:46, theintrepidfox <theintrepid...@.hotmail.com> wrote:
> On 26 Nov, 10:15, "Neil" <nos...@.nospam.net> wrote:
>
>
>
>
>
>
>
>
>
> It's only a guess but have you got the means of using Remote Desktop
> Terminal Services Client or MSN Messenger Remote Assistance (As a
> test) instead of PCAnywhere? I worked on the Laplink support line many
> years ago and can imagine that this might be the issue and rings some
> bells but things have changed since.
> All the best,
> Martin- Hide quoted text -
> - Show quoted text -
The reason why I'm suggestin it is because PCAnywhere is perhaps
trying to synchromize files between the client and host (including
your .mdb) which is maybe still and remains in use by the Sync Process
when the VPN times out or disconnects.|||Actually, it usually happens after PCAnywhere has been closed. While
PCAnywhere is open, the VPN connection stays active. After I close
PCAnywhere, if I don't disconnect from the VPN, then eventually the VPN
connection times out.
So, a typical scenario is: open Access app connected to local SQL Server;
later, connect to VPN and do stuff via PCAnywhere; close PCAnywhere; later,
VPN connection disconnects, and then connection to local SQL Server fails.
Have to close and reopen MDB for it to work.
Strange...
"theintrepidfox" <theintrepidfox@.hotmail.com> wrote in message
news:3e278590-302d-4549-82d4-2e12c0b51b1a@.i29g2000prf.googlegroups.com...
> On 26 Nov, 10:15, "Neil" <nos...@.nospam.net> wrote:
> It's only a guess but have you got the means of using Remote Desktop
> Terminal Services Client or MSN Messenger Remote Assistance (As a
> test) instead of PCAnywhere? I worked on the Laplink support line many
> years ago and can imagine that this might be the issue and rings some
> bells but things have changed since.
> All the best,
> Martin|||"theintrepidfox" <theintrepidfox@.hotmail.com> wrote in message
news:9cb60b5b-5160-4afe-8555-8ed2bed12b09@.s36g2000prg.googlegroups.com...
> On 27 Nov, 13:46, theintrepidfox <theintrepid...@.hotmail.com> wrote:
> The reason why I'm suggestin it is because PCAnywhere is perhaps
> trying to synchromize files between the client and host (including
> your .mdb) which is maybe still and remains in use by the Sync Process
> when the VPN times out or disconnects.
Yeah, I don't think that's it. I tried connecting to the VPN without doing
anything else, and the results were the same. Something in SQL Server itself
is looking at that other server for some reason. Maybe because they both
have same-named databases. I don't know.
Thanks,
Neil|||Not really, but you may try adding an entry to your host file pointing to
your local box and using the loopback IP. My vague guess is that possibly
you're getting into a situation where you get an IP through VPN and it
doesn't resolve the new IP when you get disconnected. Mind you, that's just
a guess, but it's all I've got right now.
Anyway, try the host file thing and see if that does anything for you.
"Neil" wrote:

> I work on a local copy of a database (Access 2000 MDB with ODBC linked
> tables to a SQL 7 database). The SQL Server db I'm working with is on my C
> drive (MSDE). Occasionally I'll connect to a VPN to do something on a remo
te
> computer, using PC Anywhere to perform the task. Doesn't involve my front
or
> back end at all, except that the computer I'm VPNing to has a SQL database
> running.
> OK, so I'm using my db; I connect to the VPN, and do my thing. Everything'
s
> fine. However, if I then disconnect from the VPN (or if the VPN connection
> times out and disconnects itself), I then can no longer access my local SQ
L
> Server database. My Access application still works fine, as long as it
> doesn't have to look at any data. When it does have to look at data, I ge
t
> ODBC call failed. I have to close and reopen my Access database, and then
> everything is fine.
> So, it seems that, for some reason, when I connect to the VPN, my local SQ
L
> Server or the ODBC driver or something in the mix is looking at that remot
e
> database as part of what I'm using. Then, when the VPN connection is close
d,
> it won't access my local database for some reason.
> Oh, and my local database and the remote database both have the same name.
> So that may be part of the problem.
> Any ideas as to what's going on?
> Thanks!
> Neil
>
>

Local Database Access Issues

Hello,

I have a local SQL Server database installed with Visual Studio .NET. I'm trying to create a SQL Server login ID to access a database on this local database. I gave it access to all of the databases with public (the one I'm using it also has DBO and execute permissions on all procs). When I try to login to it through SQL Server Query Analyzer (and also using an ASP.NET application), I get the following error:

Login failed for 'dbuser'. Reason: Not associated with a trusted SQL Server connection.

How do I set up a SQL Server login to access the database?

Thanks,

Brianin Enterprise Manager if you xpand the databases tab and then YourDatabase theres a tab called Users. You can add the dbuser over there.

hth

local database "XXYYZZ" is not defined in configuration

I'm quite addicted to Patterns-&-Practices Enterprise.Library.Data module, but I can't get it to access a SQL Server Express Database. I've tried several different .CONFIG files and a unch of different settings and I keep getting:

The local database "XXYYZZ" is not defined in configuration.

I'm using Visual Studio 2005 C# in a WinForms application.

Can Microsoft.Practices.EnterpriseLibrary.Data access SQL Server Express Database?

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />

</configSections>

<dataConfiguration defaultDatabase="Connection String" />

<connectionStrings>

<add name="myDb" connectionString="Database=Database;Server=(local)\SQLEXPRESS;AttachDbFilename=C:\myDir\myDBname.mdf;Integrated Security=True;User Instance=True"

providerName="System.Data.SqlClient" />

</connectionStrings>

</configuration>

- and it's use

Database db = DatabaseFactory.CreateDatabase("myDb");
DbCommand dbC = db.GetStoredProcCommand("mySPname");
db.AddInParameter(dbC, "MyParameterName", DbType.Int32, MyIntVal);
DataSet ds = db.ExecuteDataSet(dbC);

Needs this stuff too ...

using System.Data;

using System.Data.SqlTypes;

using System.Data.SqlClient;

using Microsoft.Practices.EnterpriseLibrary.Data;

using Microsoft.Practices.EnterpriseLibrary.Data.Sql;

using System.Data.Common;

|||As the Elib cannot find the "mydb" entry, it seems that the ELIB is requesting the wrong (in terms of your thinking) .config file. See if you are pointing to the right config file.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

local data

I am implementing an MSDE database and I would like to keep some data (like
user preferences) in the Access project so that I can filter data for each
user based on their selected preferences. In Access I just kept user
preferences in the application database on each workstation and used queries
to get only the data I wanted from the linked tables.
How can I do this in MSDE/Access projects?
thanks!
Jerry
hi Jerry,
JerryWendell wrote:
> I am implementing an MSDE database and I would like to keep some data
> (like user preferences) in the Access project so that I can filter
> data for each user based on their selected preferences. In Access I
> just kept user preferences in the application database on each
> workstation and used queries to get only the data I wanted from the
> linked tables.
> How can I do this in MSDE/Access projects?
Access is an application and a kind of integrated development environment,
where MSDE is just (<g>) a database management system that only stores
"data" (as long as other database objects to manipulate it...)
if you need a feature like that, you can perhaps save that kind of
information in a general user table related with the user and filter
depending on SYSTEM_USER
(http://msdn.microsoft.com/library/de...-us/tsqlref/ts
_sysusr_3c8i.asp ) , or you can write the same stored procedure but with
different owners, where each user will execute his/her "private" procedure,
but this can lead to management nightmares..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply