Home > database >  Urgent for PB 10.5 database deadlock solution
Urgent for PB 10.5 database deadlock solution

Time:10-01

Pb 10.5 MS SQL connection is not available, but with the OLE connection, but now the client a save database deadlock, urgent, which ace to give directions, urgent!!!

CodePudding user response:

A deadlock to find problems from several aspects:
1, have a commit or rollback
Article 2, a query data a lot, and the data in other client may commonly used
3, do not use more lines of data model, data line as far as possible to save

These easy to cause a deadlock,
Specific look at your code even if there are any problems

CodePudding user response:

Or pb 8 good oh, depressed dead, waiting to use today

CodePudding user response:

Either using PB9, it also has special SQL interface
Either use the ODBC

Actually a deadlock is not necessarily the problem of the interface, to see what tips and phenomenon, general deadlock but locks in the database!
It is possible that the dLL is not complete, it is possible that the interface parameters of the problem

CodePudding user response:

Save is used when the COMMIT USING SQLCA;

CodePudding user response:

DLL with the original concept Runtime Packager installed on the client after packaging, program is the pb10.5 version, can also dropped to 8.0 or 9.0??????

CodePudding user response:

It should not be connection problem, chances are your application problems
You use a simple table test and see, if only one line of data is a deadlock, consider changing version

CodePudding user response:

Retrieve () after all to commit;

CodePudding user response:

In my this machine won't be a deadlock, but the client will appear, don't pack the DLL will all???????

CodePudding user response:

The database interface played?

Also include a PB on either the client will know!

CodePudding user response:

I am on the retrieve and select SQL statements are added after the COMMIT USING SQLCA;
Give it a try, if the tell you! At home there any other good way to help me mentioning again

CodePudding user response:

Dizzy, what's the use of it!

CodePudding user response:

Try the SQLCA. The AutoCommit=true

CodePudding user response:

Everyone brothers are useless, I when the machine program connect to the server database operations, there is a deadlock, now that I'm not sure don't caused by client or else I caused the machine program, what method can solve!! Be urgent!!!!!!

CodePudding user response:

The OLEDB connection please add:
The sqlca. Lock='rc'

CodePudding user response:

Retrieve and select SQL statements, and COMMIT the USING the SQLCA. If not yet, is the problem of your program,

CodePudding user response:

Certainly not program problem, completely normal in PB8, before yesterday, I understand the wrong, thought is to retrieve () statement after add COMMIT USING the SQLCA. , the original is in the data window Retrieveend event script to add a COMMIT USING the SQLCA. Today, a large area of dead lock not, found one or two scripts directly select statement deadlock phenomenon, but I also added a COMMIT USING the SQLCA. , manual cancelled the process, don't know will also won't appear,

CodePudding user response:

I have been not too clear, PB after using the SQL script SQLCA. The AUTOCOMMIT=true this should be set to true or false???????
The SQLCA. The AUTOCOMMIT specific have what effect???????

CodePudding user response:

Automatically submit! If you use is SQL2000, you SQLCA. The AUTOCOMMIT=TRUE every write to the database data and modify the data to COMMIT need not write,

CodePudding user response:

In your database connection file to add the sqlca. Lock='rc'

CodePudding user response:

Deadlock issues we often encounter, to find out where the problem on the code, the only way is through SQL to remove
The SET QUOTED_IDENTIFIER ON
GO
The SET ANSI_NULLS ON
GO



The create proc p_lockinfo
@ kill_lock_spid bit=1, - whether to kill a deadlock process, 1, 0 to display only
@ show_spid_if_nolock bit=1 - if not the deadlock process, whether or not according to normal process information, 1, 0 don't show
As
Declare @ count int, @ s nvarchar (1000), @ I int
Select id=identity (int, 1, 1), signs,
The process ID=spid, thread ID=kpid, block the process ID=blocked, database ID=dbid,
The database name=db_name (dbid), user ID=uid, username=loginame, accumulative total CPU time=CPU,
Login time=login_time, opened the transaction number=open_tran, process status=status,
Work the name=the hostname, application name=program_name, workstation process ID=hostprocess,
Domain name=nt_domain, network card address=net_address
Into # t the from (
The select symbol='deadlock process,
Spid kpid, a. locked, dbid, uid, loginame, CPU, login_time, open_tran,
The status, the hostname, program_name hostprocess nt_domain, net_address,
S1=a.s pid, s2=0
From the master.. Sysprocesses a join (
The select blocked from master.. Sysprocesses group by blocked
B) on a.s pid=b.b locked the where a. locked=0
Union all
Select the 'victims | _ _ & gt; '
Spid kpid, blocked, dbid, uid, loginame, CPU, login_time, open_tran,
The status, the hostname, program_name hostprocess nt_domain, net_address,
S1=blocked, s2=1
From the master.. Sysprocesses where a blocked<> 0
) a order by s1, s2

Select @ count=@ @ rowcount, @ I=1

If @ count=0 and @ show_spid_if_nolock=1
The begin
Insert # t
The select symbol='normal process,
Spid kpid, blocked, dbid, db_name (dbid), uid, loginame, CPU, login_time,
Open_tran, status, the hostname, program_name hostprocess, nt_domain, net_address
From the master.. Sysprocesses
The set @ count=@ @ rowcount
End

If @ count> 0
The begin
# the create table t1 (id int identity (1, 1), a nvarchar (30), int, b EventInfo nvarchar (255))
If @ kill_lock_spid=1
The begin
Declare @ spid varchar (10), the @ symbol varchar (10)
While @ i<=@ count
The begin
Select @ spid=process ID, the @ symbol=the from where ID=@ # t I
Insert # t1 exec (' DBCC inputbuffer (' + @ spid + ') ')
If the @ symbol='deadlock process' exec (' kill '+ @ spid)
The set @ I=@ I + 1
End
End
The else
While @ i<=@ count
The begin
Select @ s='DBCC inputbuffer (' + cast (process ID as varchar) +') 'from the where ID=@ # t I
Insert # t1 exec (@ s)
The set @ I=@ I + 1
End
Select a. *, process of SQL statements=b.E ventInfo
The from # t join # t1 b on Anderson, d=b.i d
End



GO
The SET QUOTED_IDENTIFIER OFF
GO
The SET ANSI_NULLS ON
GO

CodePudding user response:

nullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related