René's URL Explorer Experiment


Title: VS Code disconnects (DBTS-05102) after ALTER SYSTEM KILL SESSION returns ORA-00031; spool/log file left locked (open handle) until window reload · Issue #34 · oracle/sql-developer-vscode · GitHub

Open Graph Title: VS Code disconnects (DBTS-05102) after ALTER SYSTEM KILL SESSION returns ORA-00031; spool/log file left locked (open handle) until window reload · Issue #34 · oracle/sql-developer-vscode

X Title: VS Code disconnects (DBTS-05102) after ALTER SYSTEM KILL SESSION returns ORA-00031; spool/log file left locked (open handle) until window reload · Issue #34 · oracle/sql-developer-vscode

Description: Summary Running a .sql script from a SQL Worksheet that spools output to a local .log file and issues ALTER SYSTEM KILL SESSION ... IMMEDIATE against a session that cannot be killed synchronously (Oracle returns ORA-00031: session marked...

Open Graph Description: Summary Running a .sql script from a SQL Worksheet that spools output to a local .log file and issues ALTER SYSTEM KILL SESSION ... IMMEDIATE against a session that cannot be killed synchronously (...

X Description: Summary Running a .sql script from a SQL Worksheet that spools output to a local .log file and issues ALTER SYSTEM KILL SESSION ... IMMEDIATE against a session that cannot be killed synchronously (...

Opengraph URL: https://github.com/oracle/sql-developer-vscode/issues/34

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"VS Code disconnects (DBTS-05102) after ALTER SYSTEM KILL SESSION returns ORA-00031; spool/log file left locked (open handle) until window reload","articleBody":"Summary\n\nRunning a .sql script from a SQL Worksheet that spools output to a local .log file and issues ALTER SYSTEM KILL SESSION ... IMMEDIATE against a session that cannot be killed synchronously (Oracle returns ORA-00031: session marked for kill) causes the worksheet's own connection to drop immediately afterwards with DBTS-05102: The connection session was terminated — even though the killed session is a different database session. Because the script never reaches its spool off statement, the local .log file is left with an open OS-level file handle and cannot be opened, renamed, or deleted afterwards (\"used by another process\") until the VS Code window is reloaded.\n\nEnvironment\n\n- Extension: Oracle SQL Developer for VS Code 26.2.1\n- VS Code: 1.135.0 (commit 08d4889f9ec4a1685d257b9b95de036c8e1ce1e5), x64\n- OS: Windows 11 Enterprise 10.0.26200\n- Oracle Database: 19.21.0.0.0 (19c), CDB/PDB architecture\n- Connection type: saved connection profile (Basic/TNS)\n- Instance state at the time: under sustained latch: shared pool contention caused by an unrelated application defect (hundreds of millions of hard-parse/execute cycles of the same shared cursor)\n\nWhat happens\n\n1. A .sql script is run in a SQL Worksheet. It does, in order:\n  - spool \"\u003cpath>.log\"\n  - a diagnostic SELECT ... FROM gv$session\n  - ALTER SYSTEM KILL SESSION '\u003csid>,\u003cserial#>,@\u003cinst>' IMMEDIATE targeting a session that is 100% CPU-bound in a tight server-side PL/SQL loop (no round-trips to its client, so the kill cannot complete synchronously)\n  - a follow-up verification SELECT\n  - spool off\n2. Oracle correctly returns ORA-00031: session marked for kill for the ALTER SYSTEM KILL SESSION statement — expected, since the target session isn't at an interruptible point yet.\n3. Immediately after that, the worksheet's own connection drops: DBTS-05102: The connection session was terminated. Script execution stops right there.\n4. The remaining statements (verification SELECT and spool off) never run, because the connection is gone.\n\nConsequence: locked spool/log file\n\nBecause spool off never executes, the .log file is left with an open handle. Any subsequent attempt to open/rename/delete it fails with a Windows sharing-violation error. None of the externally-visible processes (sql.exe, java.exe helper processes) appear to hold the handle, which suggests it's held internally by an extension host process rather than an external SQLcl/Java child process.\n\nThis looks like the same underlying class of bug already reported in #29 (extension backend not releasing a Windows file handle around an abrupt state transition) — there it was credentials.sso during a connection-save rename; here it's the spool .log during an abrupt disconnect.\n\nHow to reproduce\n\n1. Have an Oracle session on the target instance that is 100% CPU-bound in a tight, non-interruptible server-side loop (any PL/SQL block that loops without returning control to its client) — the precondition for ALTER SYSTEM KILL SESSION to be unable to complete synchronously.\n2. In a VS Code SQL Worksheet (via this extension), run a script that spools to a file, then issues ALTER SYSTEM KILL SESSION '\u003csid>,\u003cserial#>,@\u003cinst>' IMMEDIATE against that session, followed by more statements and spool off.\n3. Observe ORA-00031, then DBTS-05102 and the worksheet disconnecting before the rest of the script (including spool off) runs.\n4. Try to open/rename/delete the .log file — it's locked.\n\nWorkaround found\n\n- Developer: Reload Window (Ctrl+Shift+P) restarts the extension host and releases the file handle, without needing to fully close and relaunch VS Code.\n- Verifying independently (fresh connection) that the target session's SID/SERIAL# no longer exists in gv$session confirms the KILL SESSION did succeed on the database side despite the client-side disconnect — the disconnect and the locked file appear to be purely client-side artifacts, unrelated to the actual outcome in the database.\n- As a practical mitigation, spooling each script run to a uniquely-named/timestamped log file avoids being blocked by a previously locked file on retry.\n\nSuspected contributing factor\n\nThe instance was under heavy latch: shared pool contention at the time (unrelated application defect). That's an instance-wide shared resource, so it's plausible the worksheet's own session experienced elevated latency at the same moment, compounding with the connection-drop behavior already reported in #25 to trigger the disconnect right after the KILL command.\n\nRelated issues\n\n- #25 — Connection lost after idle period\n- #29 — Windows file handle not released before rename (same class of bug, different file)\n\n---","author":{"url":"https://github.com/flaviogcmelo","@type":"Person","name":"flaviogcmelo"},"datePublished":"2026-08-27T18:04:47Z","url":"https://github.com/oracle/sql-developer-vscode/issues/34"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:44a257f5-bb8c-61a7-5d11-99a6fe427080
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBA02:346CFE:260EDF2:31E7200:6B042700
html-safe-nonce950486240d710fe7211437cc7b1619d5fbb379daf4069bb2d8ecc23f7af22aa1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTAyOjM0NkNGRToyNjBFREYyOjMxRTcyMDA6NkIwNDI3MDAiLCJ2aXNpdG9yX2lkIjoiNTc5NTY0OTY2NDYwODg0NDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac1b463e964d5e7d56e0558b8b6feb5f60914ecb706b7f0c7f61656fd00155220a
hovercard-subject-tagissue:5270653415
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/oracle/sql-developer-vscode/34/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4331145eb73e9e76f3c5b0fda434b1343fa9d7835005c13faa877755673d9934/oracle/sql-developer-vscode/issues/34
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4331145eb73e9e76f3c5b0fda434b1343fa9d7835005c13faa877755673d9934/oracle/sql-developer-vscode/issues/34
og:image:altSummary Running a .sql script from a SQL Worksheet that spools output to a local .log file and issues ALTER SYSTEM KILL SESSION ... IMMEDIATE against a session that cannot be killed synchronously (...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameflaviogcmelo
hostnamegithub.com
expected-hostnamegithub.com
Noneb7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e
turbo-cache-controlno-preview
go-importgithub.com/oracle/sql-developer-vscode git https://github.com/oracle/sql-developer-vscode.git
octolytics-dimension-user_id4430336
octolytics-dimension-user_loginoracle
octolytics-dimension-repository_id996875857
octolytics-dimension-repository_nwooracle/sql-developer-vscode
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id996875857
octolytics-dimension-repository_network_root_nwooracle/sql-developer-vscode
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec3dd496c3da6ea6b77e69c09279d2b81604654f1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/oracle/sql-developer-vscode/issues/34#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Foracle%2Fsql-developer-vscode%2Fissues%2F34
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Foracle%2Fsql-developer-vscode%2Fissues%2F34
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=oracle%2Fsql-developer-vscode
Reloadhttps://github.com/oracle/sql-developer-vscode/issues/34
Reloadhttps://github.com/oracle/sql-developer-vscode/issues/34
Reloadhttps://github.com/oracle/sql-developer-vscode/issues/34
oraclehttps://github.com/oracle
sql-developer-vscodehttps://github.com/oracle/sql-developer-vscode
Codehttps://github.com/oracle/sql-developer-vscode
Issues36 (36)https://github.com/oracle/sql-developer-vscode/issues
Pull requestshttps://github.com/oracle/sql-developer-vscode/pulls
Actionshttps://github.com/oracle/sql-developer-vscode/actions
Projectshttps://github.com/oracle/sql-developer-vscode/projects
Security and qualityhttps://github.com/oracle/sql-developer-vscode/security
Insightshttps://github.com/oracle/sql-developer-vscode/insights
https://github.com/oracle/sql-developer-vscode
New issuehttps://github.com/login?return_to=https://github.com/oracle/sql-developer-vscode/issues/34
New issuehttps://github.com/login?return_to=https://github.com/oracle/sql-developer-vscode/issues/34
VS Code disconnects (DBTS-05102) after ALTER SYSTEM KILL SESSION returns ORA-00031; spool/log file left locked (open handle) until window reloadhttps://github.com/oracle/sql-developer-vscode/issues/34#top
https://github.com/flaviogcmelo
flaviogcmelohttps://github.com/flaviogcmelo
on Aug 27, 2026https://github.com/oracle/sql-developer-vscode/issues/34#issue-5270653415
#29https://github.com/oracle/sql-developer-vscode/issues/29
#25https://github.com/oracle/sql-developer-vscode/issues/25
Connection lost after idle period – must re-attach for every .sql file #25https://github.com/oracle/sql-developer-vscode/issues/25
Saving a connection fails on Windows: *.temp connection folder cannot be renamed (open handle on credentials.sso) #29https://github.com/oracle/sql-developer-vscode/issues/29
Sign up for freehttps://github.com/signup?return_to=https://github.com/oracle/sql-developer-vscode/issues/34
Sign in to commenthttps://github.com/login?return_to=https://github.com/oracle/sql-developer-vscode/issues/34
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.