Saturday, July 14, 2012
Friday, March 9, 2012
Killing an Oracle session to remove a LOCK
Get List of LOCKS
SELECT l.inst_id,
SUBSTR(L.ORACLE_USERNAME,1,8) ORA_USER,
SUBSTR(L.SESSION_ID,1,3) SID,
S.serial#,
SUBSTR(O.OWNER||'.'||O.OBJECT_NAME,1,40) OBJECT, P.SPID OS_PID,
DECODE(L.LOCKED_MODE, 0,'NONE',
1,'NULL',
2,'ROW SHARE',
3,'ROW EXCLUSIVE',
4,'SHARE',
5,'SHARE ROW EXCLUSIVE',
6,'EXCLUSIVE',
NULL) LOCK_MODE
FROM sys.GV_$LOCKED_OBJECT L
, DBA_OBJECTS O
, sys.GV_$SESSION S
, sys.GV_$PROCESS P
WHERE L.OBJECT_ID = O.OBJECT_ID
and l.inst_id = s.inst_id
AND L.SESSION_ID = S.SID
and s.inst_id = p.inst_id
AND S.PADDR = P.ADDR(+)
order by l.inst_id
Just a matter of Killing
ALTER SYSTEM KILL SESSION 'sid#,serial#' IMMEDIATE;
Share Article : Killing an Oracle session to remove a LOCK
Killing an Oracle session to remove a LOCK
Monday, January 16, 2012
Remove Blank Lines in Java Code with NetBeans (regex)
Open the 'Find and Replace' window. Type \n\s*(\n) in the Find What field and $1 in the Replace With field. Check the Regular Expressions box and click Replace All.
Boom! All blank lines are removed now.
Share Article : Remove Blank Lines in Java Code with NetBeans (regex)
Boom! All blank lines are removed now.
Share Article : Remove Blank Lines in Java Code with NetBeans (regex)
Remove Blank Lines in Java Code with NetBeans (regex)
Labels:
Java
Sunday, July 17, 2011
VB.net direct http
' EasyHttp.vb class file
Public Class EasyHttp
Public Enum HTTPMethod As Short
HTTP_GET = 0
HTTP_POST = 1
End Enum
Public Shared Function Send(ByVal URL As String, _
Optional ByVal PostData As String = "", _
Optional ByVal Method As HTTPMethod = HTTPMethod.HTTP_GET, _
Optional ByVal ContentType As String = "")
Dim Request As HttpWebRequest = WebRequest.Create(URL)
Dim Response As HttpWebResponse
Dim SW As StreamWriter
Dim SR As StreamReader
Dim ResponseData As String
' Prepare Request Object
Request.Method = Method.ToString().Substring(5)
' Set form/post content-type if necessary
If (Method = HTTPMethod.HTTP_POST AndAlso PostData >< "" AndAlso ContentType = "") Then
ContentType = "application/x-www-form-urlencoded"
End If
' Set Content-Type
If (ContentType >< "") Then
Request.ContentType = ContentType
Request.ContentLength = PostData.Length
End If
' Send Request, If Request
If (Method = HTTPMethod.HTTP_POST) Then
Try
SW = New StreamWriter(Request.GetRequestStream())
SW.Write(PostData)
Catch Ex As Exception
Throw Ex
Finally
SW.Close()
End Try
End If
' Receive Response
Try
Response = Request.GetResponse()
SR = New StreamReader(Response.GetResponseStream())
ResponseData = SR.ReadToEnd()
Catch Wex As System.Net.WebException
SR = New StreamReader(Wex.Response.GetResponseStream())
ResponseData = SR.ReadToEnd()
Throw New Exception(ResponseData)
Finally
SR.Close()
End Try
Return ResponseData
End Function
End Class
Subscribe to:
Posts (Atom)

