Does anyone know how to set the ConnectionTimeout and/or CommandTimeout in NetTiers as I have a long running query that is timing out. I expect the query to be long running, its not a performance problem as such, I just need to know if anyone knows how to set this value.
You need to add it to the Web.config for the generated site. Its the defaultCommandTimeout provider in the Provider setting.
Related
I have a database where I need to deny a user from using the set command. I have done tons of research with no positive results. I am familiar with setting roles or even using grant, revoke, or deny to a user.
My goal here is restrict my user from being able to set items like connection based variables or things like context_info.
You cannot stop a user from using SET. I would COMPLETELY stay away from using anything such as context_info for the reasons you've already figured out, anything can happen to it.
I would also be wary of keeping session specific data or metadata anywhere in the database as it's going to be a security issue as well as a data accuracy issue.
I'm using NH Prevalence Cache provider with happiness from years, but recently, my team, started to fall in some data
incorrectness which I can't yet explain...
We setup the prevalence by setting up the cache provider and
setting the prevalenceBase folder to AppDomain.CurrentDomain.BaseDirectory
setting a default expiration of 120
each cache registration in mappings ha a region name
The cache seems to work, but if the application is recycled, the data which will be returned by NHibernate is incorrect
with a valid identifier, it provides data which seems owned by another entity.
If we delete the .snapshot file in the folder (AppDomain.CurrentDomain.BaseDirectory) then everything starts to work fine,
until the next recycle wher ethe issue will be represented.
Any one has got the same issue?
Any one can help with this issue?
Sure I forget or ignore something, but someone who can explain better how to setup prevalence will be appreciated
Thanks in advance
Just a little background: I am using Access 2010 to create forms and VBA code in an Access 2003 format database. For some reason, Access 2007 format databases always corrupt on me when I make changes and save them with a particular group of objects, but that's for another discussion.
When writing VBA code in this Access 2003 database, any time my code breaks (via breakpoint or an unhandled error) and I make a correction, Access tells me that it can't save back to the database because another user has it open. However, I am the only user working on the database; this is a local copy of the database and it's sitting on my desktop.
The LDB file can't be deleted because Access is using it. When I first load the database, I see my machine name and "Admin" when opening the LDB in a text or hex editor. After a break, I see that plus a duplicate entry, but this time around "admin" has a lower-case "A."
Closing the database and reopening it fixes the problem but makes it needlessly cumbersome to debug my code. Anyone else encounter this issue and/or have a fix for it?
It might be helpful to know what your code is doing when this happens. Certainly that's not normal behavior. For instance, are you opening another database with New Access.Application? Are you using ADO or DAO to access records in the database with a connection string?
There are no external connections to the database at all.
It may not matter if there are external connections to the database if you are using a connection string to connect to the open database; not sure but that may be seen as an external connection... you may want to use CurrentDB for DAO, or CurrentProject.Connection as your ActiveConnection for any ADO queries.
I am assuming that this problem persists through reboots; but for the sake of argument, try closing out Access and going to the task manager to make sure you have no other instances of MSAccess.exe running. You might even try closing all Office products and/or making sure that Access is the only Office product running. I have seen some weird conflicts between Microsoft Communicator and Outlook; so it's not entirely out of the question for Access to have issues with another MS product.
You may also want to check the size of the database to make sure it's not exceeded 2GB. That causes the infamous "Invalid parameter" error; perhaps it might be causing this as well.
With no other details about how your program works, we may only be able to offer generic advice like this.
I have discovered a way to cause the problem discussed above (and thereby to correct it). Turns out if you create a database object and set it to the current database, you get this problem.
That is,
dim cdb as database
set cdb = currentdb
From this point on, you're cooked.
Instead, figure a way around this by possibly using currentdb directly or not using it at all.
This worked for me.
In your VBA Try checking that all your open Connections to the database are closed. Until the connection is open the LDB fill will be there.
Same symptom of not being able to save form or code mods after application had started. I found a workaround today! In the startup of my first form of the app, I had issued a "DAO.DBEngine.SetOption dbMaxLocksPerFile, 20000". Commenting this statement removed the problem. I did no further testing, but FYI, the DBEngine call was before any reference or attempt to use CurrentDB(). Also the current default on my Access 16 install is 9,500.
I thought I might answer here, since I stumbled upon this question while having a similar issue. Essentially, it boiled down to this: I could either edit forms, VBA, etc. or edit information in the local database (which I'm using as a cache) with currentDB. I also have a backend database, but the locking was clearly on the frontend database.
The solution ended up being weird, but stupidly simple. When the frontend starts up, I have it immediately create a connection to the backend using OpenRecordset (and similarly to you, that backend was still on my own computer for testing purposes). I tried temporarily disabling that code, and suddenly it wasn't an issue anymore. And it turns out, once I call currentDB, I can then call OpenRecordset to open the connection to the backend, and suddenly it isn't a problem anymore.
Tl;Dr: if you're calling OpenRecordset somewhere in your code to connect to a backend, be sure to call something like set db = currentDB beforehand, then everything works. (That is, probably until I publish this answer and Access then decides it doesn't want to anymore).
Why this fixed it is beyond me, someone with more knowledge can maybe answer that.
The solution:
options > current database > click enable -track name auto correct info
I have almost exactly this problem. I say, almost exactly because the answer that worked for this gentleman did nothing whatsoever for me. I can open my own database and see all of the lovely RS data sitting there staring at me but the actual Reporting Services installation still can't. This all came about because of precisely what he said. We accidentally left the password policy on on the Reporting Services account and it expired. When I changed it the whole thing went kaputt. I'm still getting the "key cannot be used in current state" error message even after dropping all encrypted data from the RS installation. I have no access to the Report Manager to reset encrypted information. Has anyone got any suggestions?
EDIT: In continuing my research I found this suggestion. It's not that.
Well... here's the thing.
I eventually tried creating a whole new user to take charge of the SSRS operations. I also remembered to update those details on our live data server. (I did this first and it failed to work as it was still telling me the key could not be used then.)
I guess that there must be something that prevents the reassignment of the SSRS gofer account's password. The new user is set up identically and works perfectly. So that's what cleared it up for me but I'm a little irritated that I still don't know exactly why...
I have a nice little Linq2SQL project however when deployed the database is on another server. I keep getting a named pipe error that the remote server doesn't exist - yet it does, it has Named Pipes enabled (protocol + surface) SQL 2005. TCP connections work fine.
I've tried setting the library in the connection string to a TCP one, I tried forcing TCP in the server name however Linq is always and only using Named Pipes and just won't work.
Any idea how to force Linq2SQL to use TCP/IP only, if possible?
thanks
My guess is that you are not setting the connection string to None on the DBML designer file which is creating the typed data context for you. Set the connection string to None (make sure nothing on the designer is selected) and then pass in the connection string manually, to assure that you have complete control over it.
As noted in the comments, you can't set the connection string to none.
In this case, there is still an overload of the typed DataContext which takes a connection string as a parameter. I would recommend using a hard-coded one first to see if it works. If it does, then you know it is the resolution of the item from the config file. Otherwise, you know to look at the connection string itself.
Also, if it is a problem with resolution in the config file, I usually place this in my connection string section FIRST to clear entries from the machine.config file:
<clear />
How about changing the protocol order in the SQLConfiguration manager or using the command tool, cliconfig on the client and changing it there.
I've seen this happen when (any of these):
The SQL client version isn't the one you expect
Windows Authentication is being used, often unintentionally
The connection information you provide doesn't match with the server's own name. (That is, select ##server_name doesn't return the same as the NETBIOS name. Fix using sp_dropserver and sp_addserver)
Sometimes reinstalling MDAC on the client machine helps, apparently because the driver looked like it was there but wasn't fully working.
Hope this helps...