How to ensure a read-only table will never be locked?
Rob Chung
Ranch Hand
Joined: Oct 15, 2002
Posts: 46
posted
0
Hi, I have a static table that should be read only. In order for this table never to be locked, I coded: myConnection.prepareStatement(thePreparedSQLStmt, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); Is this the correct way to prevent the table ever be locked? Thanks in advance.
Napa Sreedhar
Ranch Hand
Joined: Jan 29, 2002
Posts: 58
posted
0
Where do you want your table to read only? Database level or application level?
Rob Chung
Ranch Hand
Joined: Oct 15, 2002
Posts: 46
posted
0
It would be useful to know both - at database level and application level. I noticed that you can do setReadOnly with a connection. But I am using the same connection to write to other tables. I am using Microsoft SQL server. I can't find any property in the database in which I can make the table read-only. Thanks!
Praveen Balaji
Ranch Hand
Joined: Jun 17, 2001
Posts: 60
posted
0
Is it SQL Server 2000 or SQLServer 7.0? The database can be made read-only manually.
Daniel Dunleavy
Ranch Hand
Joined: Mar 13, 2001
Posts: 276
posted
0
do not give update/insert/delete access for that table to IDs used to access the datebase obviously it would be best to seperate the read only tables into a seperate tablespace from the tables which are being updated. Dan
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: How to ensure a read-only table will never be locked?