on 08-07-2015 10:38 PM
Good day everyone.
I'm working on this database and I get this error when adding a new column to a table.
User 'another user' has the row '<tablename>' locked.
To this database is also used by SAP BO server as datasource for reporting.
Can anyone help me how to find and remove the lock ?
Thanks in advance.
In IQ, even SELECT statements send an internal BEGIN TRAN to the server to be able to protect the data set version accessed in that session. Therefore you need to make sure that there is no READER in the system if you will do schema changes. For the same reason, If you want to avoid the space requirements of extra versions for example, it's better you disconnect readers before large ETL operations.
There is also one setting we use for BI users to make sure that they always get the latest version of data and release the previous version: Add the following parameters to the "advance options" of ODBC profile: AUTOPRECOMMIT=YES.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
YOu can look at sp_iqlocks and see who is holding lock on the table, you can either let that process finish and then try to alter table again, Alter table does need exclusive lock on the table
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for fast reply Saroj, after running sp_iqlocks it shows that the table has many rows all for user_id=dba, lock_duration=Transaction and lock_type=Shared.
It calls my attention cuz there is nobody else working with this table just me, I wonder why are all those locks on this table.
Now I got the conn_id for all those rows how can I remove the locks?
Thanks.
Next time before dropping such connection, you can run
Select Userid , IQconnID , NodeAddr , ConnCreateTime from sp_iqconnection() where ConnHandle = NNN
NNN is connetion handle number which you are dropping.
This will give you some idea about who ( Userid ) opened which IQ connection ID ( IQConnID ) from which client box ( NodeAddr ) since what time ( ConnCreateTime )
Since the connection is already dropped, this information can also be found using IQ diagnostic files ( .iqmsg , .srvlog ) where you can look it up what exectly got disconnected.
Based on what was disconnected you will be able to figure out whether there is another user OR some other application opened the connection which you dropped.
Regards
Thanks for reply Milind,
The locks are from the BO server IP address and they are since 2 days ago, userid is dba. I wonder why BO server is locking rows if there is no insert or updates from this server. The SAP BO only does querys to use on the reports.
When killed one connection these got saved on the .srvlog
I. 08/08 08:30:30. User "dba" dropped connection 10313 ("dba")
I. 08/08 08:30:30. Connection terminated abnormally
I. 08/08 08:30:30. Disconnected TCPIP client's AppInfo: IP=192.168.0.180;HOST=sapbo;OSUSER=biservice;OS='Windows 2008R2 Build 7601 Service Pack 1';EXE='E:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win64_x64\WIReportServer.exe';PID=0x1154;THREAD=0x2ed4;VERSION=16.0.0.428;API=ODBC;TIMEZONEADJUSTMENT=-360
Thanks.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.