Access 2007 front end, SQL Server 2008 R2 back end, Windows 7 client computers
For some of the more complicated reports / queries, the front end will lock up and never return anything for some users, but will return in a few seconds for other users on the same computer. This happens regardless of which computer they go to. Permissions look the same for the different users on SQL Server. The only thing I can think of is some sort of misconfigured user specific setting that's replicated to the computers from the domain. But I have no idea what this setting could even be. Has anyone experienced this? Or have any other ideas about what might be causing it?
28 2869
Are you using Windows authentication or SQL users to sign into the SQL server?
Can the user run the query through SSMS?
NeoPa 32,556
Expert Mod 16PB
Have you compared execution plans on the server for the two different scenarios? This can make an awful lot of a difference.
If the SQL is passed using actual literal values instead of variable placeholders it can make a good estimate in some circumstances and a less-good (Drastically awful) one in others.
If it's coming via the driver from Access the chances are it's passing literal values so won't be able to use the cached EPs.
I've had some strange results, similar to what you are talking about, when using Windows Authentication and calling a Query that Joins to a View which pulls data from a different Database than the one the View is located in. The lesson I learned is, permissions can get hairy going across databases and easily lost.
Maybe, the users that are having trouble do not have permission to an object that the Query is referencing?
It's doubtful, but maybe check Access/Office's Trust settings and see if there is a difference between a working user and non-working user.
Here's the weirdest thing, and it slipped my mind earlier, for 2 of the reports, they used to be able to run it. They became unable to run it after I added additional criteria in the where clause. Yet the other users can run it just fine.
@Seth, they don't have SSMS installed, just the drivers.
@NeoPa, I've looked at the SQL that each user sends to the server and they look the same. But I haven't checked the execution plan.
@jforbes, if there were permission issues, shouldn't it error out right away? We are using a view, but it's in the same database.
I would expect a permissions problem should error our right away as long as execution is taking place all in the same database. What I ran into was going across databases.
I've got a few Views where I am lazy and use * to Select from some of the base tables. When those base tables change, like adding a column, I need to run this script to refresh the View's Metadata and then refresh the Links in Access. If I don't Access can act really odd, like not returning data when it should, without error; Or running away when it tries to perform a Query. Maybe it will help.
Thanks. I'll check out all the suggestions when I get a chance. Something more important came up and in the mean time, they will have to have another user run the report for them until I get a chance to look into this some more.
NeoPa 32,556
Expert Mod 16PB Rabbit:
@NeoPa, I've looked at the SQL that each user sends to the server and they look the same. But I haven't checked the execution plan.
If all the pre-determinable values are exactly the same then I would expect them to be identical, mostly. There are other variables that can make a difference.
Such values would have to include anything in the JOINs, the GROUPing, the WHERE & HAVING clauses obviously.
It's actually very difficult, in SQL of any but extremely basic complexity, to rule out the execution plan without looking at it. Generally it does a great job of choosing the best one, but there are various situations where it can flip from one to another and this can cause extraordinary levels of performance difference.
Without wishing to Spam, I can suggest that you look up a particular book that covers such stuff which I suspect you would find very useful (Not merely for this current issue of course, but I know how much you love SQL). I won't provide a link, but the title is "SQL Performance Explained".
I got some time to return to this issue. And here's what I've found after some more digging.
I was wrong, the SQL run by each user is different. The one that runs is standard T-SQL passed to the SQL Server. The one that hangs is sending a parameterized query that has a terrible execution plan.
And I can't figure out what is causing it to send one query for one user and a different query for another user.
I have checked the following: - The ODBC drivers are the same for both users
- Microsoft Access version is the same for both users
- The user with the query that runs can do so even when logged onto the same computer as the user that can't run the query
So it seems like some sort of setting or configuration that travels with the user regardless of which PC they are on. This makes me think that it is some sort of obscure group policy setting or active directory setting that is part of the users account that is being replicated from PC to PC. Which probably means it's in the registry somewhere. But I am having a difficult time tracking down what that registry key is.
NeoPa 32,556
Expert Mod 16PB Rabbit:
But I am having a difficult time tracking down what that registry key is.
I can't be any help there, I'm afraid.
Are both users using the same SQL login, different SQL Logins, or Windows Authentication? If they are using Windows Authentication or separate user Logins to SQL, you might want to compare the users in SQL (Security\Logins) to see if there is a difference. You've probably already done this, but I thought I would mention it.
Windows authentication, and yes, I've had the DBA check their permissions. I don't think it's on the server side because Access is the one generating the SQL.
NeoPa 32,556
Expert Mod 16PB
@Rabbit.
You say the one that runs is passed T-SQL but the other one uses a parameterised query. Is it based off a Pass-Thru? Otherwise, how can Access be sending T-SQL?
It's not a pass-through query. But the ODBC driver that is used to send a query to the SQL Server has to take the Microsoft Access SQL and convert it into SQL that SQL Server can understand. Therefore, if the query in Access is using something like iif(field = 1, 'x', 'y') , then the ODBC driver needs to convert it to case when field = 1 then 'x' else 'y' end .
Since the two users have the same version of the odbc driver and the same version of access, it should be generating the same SQL after passing it through the ODBC driver.
Since it's generating different SQL, my assumption is that there is some sort of user specific ODBC setting that is different between the two users that is being set by our company's group policy server or active directory server.
NeoPa 32,556
Expert Mod 16PB
My understanding is that, while the SQL that eventually gets through to SQL Server is T-SQL, that formulated by Access itself is some form of standard for ODBC. The driver then converts this to what's required by the far end, with different ODBC drivers doing different translations depending on the far end the driver is designed for. I may be wrong, but that's how I understand things.
As T-SQL is probably much closer to the defined standards than Access is, I would expect the intermediate SQL to look more similar to T-SQL than it might to Jet/ACE SQL.
At what point(s) are you able to capture the different versions? I imagine SSMS will allow you to see the eventual SQL being executed, but what about the other steps?
zmbd 5,501
Expert Mod 4TB
Curiosity, launch the ODBC manager, you'll see "System DSNs" and "User DSNs". Check the User DSNs for something different between the two.
I used to have a PDF on these settings on the PC that crashed, I'll have to see if the file is still in the drive backup.
zmbd 5,501
Expert Mod 4TB
Sorry, looks like I lost that file :(
I do however have a reference to the ODBC connector for MySQL which is what my work now uses for one of the lab information data servers (migrated away from SQL-Servers for some reason ( $ ? ) http://dev.mysql.com/doc/connector-o...config-options If you look at the table I believe the [no_ssps] option maybe something to take a look at... I can't imagine that the SQL-Server would be too much different; however, honestly, I am out of my depth here, at work I normally have our IT-DBA configure these (actually, I have to, the group policy settings have this completely locked out at work :( )
@Neopa, I turned on Trace SQL Mode on ODBC connections in Access which writes out all SQL commands passed to the server. It's there where I see the difference in queries being passed to the server. I was able to force my Access to send parameterized queries to the SQL Server by turning on fast requery in the registry. And it was still quick. So it looks like that's not necessarily the issue. The difference between my log with fast requery on and the slow user's log is that for some reason, their log shows a couple of extra queries being run that shouldn't be run. And also, it's sending a lot of fetch single row commands to the SQL Server.
@zmdb, the DSNs and driver versions are the same. Unfortunately, I can't find that ssps option in the SQL Server ODBC configuration. But in the registry, I believe the fast requery mentioned above is a similar option.
NeoPa 32,556
Expert Mod 16PB
It sounds like I'm coming to the end of the road of being any help at all. The latest makes me think about the decisions made in the optimising about when to get data from the far end and run with that locally, and when to send the local data to the far end to let it do all the work. I have no idea what data it uses to determine which approach to use. I only mention it in case something I say triggers something in you that leads you to something that helps. All very nebulous I'm afraid, but the best I can do unfortunately.
Best of luck with it anyway.
zmbd 5,501
Expert Mod 4TB
Rabbit,
Doing a shotgun search on this issue and grasping at any straws that get in the way... have you tried anything suggested in this MS article in the section dealing with performance issues https://technet.microsoft.com/en-us/...taccsql_topic2
scroll down a ways, there is a section on the connection settings....
Unfortunately I have already read that one
zmbd 5,501
Expert Mod 4TB
I know you've most likely done this already...
From the IT Guru I use in-house suggested that the scheme was corrupted for the bad user. Said he ran into something along the same lines a few times. His fix, and it is hit/miss kind of thing:
Delete the bad user's front end.
Cold-boot, (X2)
Fresh copy of front-end.
-- Bypass any startups/automacro
-- if using the MDE/ACCDE/ACCR - copy of non-compiled MDB/ACCDB first replace this afterwards with the correct format
Compact/Repair.
Cold-Boot.
I'll keep searching :)
Welp, the DBAs decided to resolve this by adding more memory. Rather than figuring out what was causing different SQL to be sent to the server.
That does sound very weird indeed.
Have you considered turning the entire query into a passthrough query, to ensure its always send in "SQL server" syntax?
I had thought of rewriting the entire query but it's a very involved query with complicated business criteria. Our group inherited this database so we support it for them but we didn't originally create it for them. I didn't want to get into the whole rewriting the report query because it would have required a few meetings with the business folk on the original purpose of the report.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Mike |
last post by:
I have to pass a date from a form to a report query. I have written a
query that works fine when I execute from SQL view, But I dont know
how to pass a value from the form to this query.
SELECT...
|
by: David Meier |
last post by:
Hi,
how can I (easily) list all local user accounts as user name/home directory?
Thanks.
|
by: z.ghulam |
last post by:
I am designing an order database at work and am having problems
creating a specific report I'm after.
Basically, each order has an 'order type' and what I would like is a
report which lists the...
|
by: mudman04 |
last post by:
Hi,
I searched online for some similar issues that I am facing but was not able come up with anything. I am fairly new with Access (2 months experience) and I am trying to remove a message...
|
by: cjbrx3115 |
last post by:
Help! For some reason when I try to access the User Accounts on my Windows XP Professional computer, I get an error message that says, ""null" is null or not an object". What does this mean? How can...
|
by: =?Utf-8?B?am1hZ2FyYW0=?= |
last post by:
I'm trying to get a list of user accounts on the local computer - the same
list you see when you are about to log in to Windows XP or Vista. This needs
to work on a home computer (not connected to...
|
by: ajayindelhi |
last post by:
Hi,
I have two user accounts in the format:
<domain>\<alias>
and
<fully qualified domain name>\<alias>
|
by: Gilberto |
last post by:
Hello,
I have a list of products with two properties (fields) which are: LEVEL and VARIANT. Each property has 7 possibilities:
LEVEL can be:
Level1
Level2
Level3...
Lavel7
|
by: =?Utf-8?B?RGF2ZUs=?= |
last post by:
I've got an application that requires displaying all user account information
on a specific workstation. It's relatively easy enough to do, however the
account list I'm building includes...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |