惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
The Hacker News
The Hacker News
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
T
Tenable Blog
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Securelist
P
Privacy & Cybersecurity Law Blog
Know Your Adversary
Know Your Adversary
T
The Exploit Database - CXSecurity.com
Latest news
Latest news
D
Darknet – Hacking Tools, Hacker News & Cyber Security
I
Intezer
F
Fortinet All Blogs
Engineering at Meta
Engineering at Meta
Simon Willison's Weblog
Simon Willison's Weblog
The Register - Security
The Register - Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
H
Help Net Security
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
S
Schneier on Security
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
P
Privacy International News Feed
S
Secure Thoughts
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recorded Future
Recorded Future
C
Cybersecurity and Infrastructure Security Agency CISA
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
人人都是产品经理
人人都是产品经理
NISL@THU
NISL@THU
博客园 - Franky
T
Tor Project blog
G
GRAHAM CLULEY
博客园 - 【当耐特】
Jina AI
Jina AI
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
A
About on SuperTechFans
Hacker News - Newest:
Hacker News - Newest: "LLM"

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Oracle ORA-00054 오류 원인과 해결 방법 완벽 가이드
umzzil nng · 2026-05-29 · via DEV Community

umzzil nng

ORA-00054 resource busy and acquire with NOWAIT specified 는?

ORA-00054 에러는 특정 테이블이나 리소스에 대해 잠금(Lock)을 획득하려 할 때, 해당 리소스가 이미 다른 세션에 의해 점유된 상태에서 NOWAIT 옵션이 지정된 경우 즉시 발생하는 에러입니다. 일반적으로 ALTER TABLE, DROP TABLE, TRUNCATE, LOCK TABLE ... NOWAIT, 또는 DDL 작업 수행 시 다른 트랜잭션이 해당 객체를 사용 중이라면 Oracle은 대기하지 않고 곧바로 이 에러를 반환합니다. 실무에서는 배치 작업이나 테이블 구조 변경 작업 중 활성 세션이 해당 테이블에 DML을 수행 중일 때 빈번하게 발생하므로, 운영 환경에서 특히 주의가 필요합니다.


주요 발생 원인

1. DDL 작업 중 활성 DML 트랜잭션 충돌

ALTER TABLE, TRUNCATE TABLE, DROP TABLE 등 DDL 문은 내부적으로 해당 테이블에 대한 배타적 잠금(Exclusive Lock)을 요구합니다. 다른 세션이 해당 테이블에 INSERT, UPDATE, DELETE 등의 DML 작업을 수행하고 아직 커밋 또는 롤백하지 않은 상태라면, DDL 작업은 잠금을 획득하지 못하고 ORA-00054를 반환합니다. 특히 장시간 수행되는 배치 프로그램이 테이블을 점유하고 있을 때 운영자가 긴급 DDL 작업을 시도하는 상황에서 자주 목격됩니다.

2. NOWAIT 또는 짧은 WAIT 옵션이 설정된 락 요청

애플리케이션 레벨에서 SELECT ... FOR UPDATE NOWAIT 또는 LOCK TABLE ... IN EXCLUSIVE MODE NOWAIT와 같이 명시적으로 NOWAIT를 지정한 경우, 잠금을 즉시 획득하지 못하면 바로 에러가 발생합니다. 이는 교착 상태를 방지하기 위한 의도적인 설계일 수 있으나, 트래픽이 집중되는 시간대에 경합이 잦은 테이블에 대해서는 불필요한 에러를 유발할 수 있습니다. 애플리케이션 코드 리뷰 없이 무조건 NOWAIT를 사용하는 관행이 문제의 근원이 되기도 합니다.

3. 장기 미완료 트랜잭션(Long-running Transaction) 또는 락 좀비 세션

네트워크 단절, 애플리케이션 비정상 종료 등으로 인해 커밋/롤백 없이 트랜잭션이 열린 채로 방치된 세션이 존재할 경우, 해당 세션이 잠금을 계속 보유하게 됩니다. 이런 좀비 세션은 다른 정상적인 작업들을 모두 차단하며, 장시간 방치될 경우 연쇄적인 락 대기 현상을 일으켜 전체 서비스 장애로 이어질 수 있습니다. 실무에서는 정기적인 세션 모니터링과 임계치 기반 알림 시스템이 반드시 필요합니다.


해결 방법

원인 1 해결: 락을 보유한 세션 식별 및 처리

먼저 어떤 세션이 해당 객체에 락을 보유하고 있는지 확인합니다.

-- 현재 락을 보유 중인 세션과 대기 중인 세션 조회
SELECT
    l.sid,
    l.serial#,
    l.username,
    l.status,
    l.osuser,
    l.machine,
    l.program,
    l.logon_time,
    o.object_name,
    o.object_type,
    l2.type        AS lock_type,
    l2.lmode       AS lock_mode,
    l2.request     AS request_mode
FROM
    v$session  l,
    v$lock     l2,
    dba_objects o
WHERE
    l.sid      = l2.sid
    AND l2.id1 = o.object_id
    AND l2.type = 'TM'
ORDER BY
    l2.lmode DESC;

-- 특정 테이블에 걸린 락을 보유한 세션의 SQL 확인
SELECT
    s.sid,
    s.serial#,
    s.username,
    s.status,
    s.sql_id,
    q.sql_text,
    s.last_call_et AS elapsed_seconds
FROM
    v$session  s,
    v$sqlarea  q,
    v$lock     l,
    dba_objects o
WHERE
    s.sql_id    = q.sql_id(+)
    AND s.sid   = l.sid
    AND l.id1   = o.object_id
    AND l.type  = 'TM'
    AND o.object_name = UPPER('&테이블명')
    AND l.lmode > 0;

락을 보유한 세션을 확인한 후, 업무 영향도를 판단하여 강제 종료합니다.

-- 세션 강제 종료 (SID, SERIAL# 는 위 조회 결과 참조)
ALTER SYSTEM KILL SESSION '1234,56789' IMMEDIATE;

-- RAC 환경에서는 INST_ID 포함
ALTER SYSTEM KILL SESSION '1234,56789,@1' IMMEDIATE;

원인 2 해결: NOWAIT 대신 WAIT 절 사용

NOWAIT 대신 적절한 대기 시간을 설정하여 일시적인 경합 상황을 자연스럽게 해소합니다.

-- NOWAIT 대신 WAIT N 초 지정 (최대 N초간 대기 후 획득 실패 시 에러)
SELECT *
FROM   orders
WHERE  order_id = 1001
FOR UPDATE WAIT 10;  -- 10초 대기

-- LOCK TABLE에 WAIT 절 적용
LOCK TABLE orders IN EXCLUSIVE MODE WAIT 30;  -- 30초 대기

DDL 작업 시 Oracle 11g 이상에서는 DDL_LOCK_TIMEOUT 파라미터 활용이 가능합니다.

-- 세션 레벨에서 DDL 락 대기 시간 설정 (초 단위)
ALTER SESSION SET DDL_LOCK_TIMEOUT = 60;

-- 이후 DDL 수행 시 최대 60초 대기 후 실행
ALTER TABLE orders ADD (memo VARCHAR2(200));

-- 시스템 레벨 설정 (영구 적용)
ALTER SYSTEM SET DDL_LOCK_TIMEOUT = 30 SCOPE = BOTH;

-- 현재 설정 확인
SHOW PARAMETER DDL_LOCK_TIMEOUT;

원인 3 해결: 장기 미완료 트랜잭션 감지 및 정리

-- 오래된 미완료 트랜잭션 세션 조회 (30분 이상 경과)
SELECT
    s.sid,
    s.serial#,
    s.username,
    s.status,
    s.machine,
    s.program,
    ROUND((SYSDATE - l.start_time) * 24 * 60, 2) AS elapsed_min,
    l.used_ublk,
    l.used_urec
FROM
    v$session     s,
    v$transaction l
WHERE
    s.taddr = l.addr
    AND (SYSDATE - l.start_time) * 24 * 60 > 30
ORDER BY
    elapsed_min DESC;

-- 락 체인(Lock Chain) 전체 구조 파악: 블로커와 웨이터 한눈에 확인
SELECT
    DECODE(l.block, 0, '대기중', 1, '락보유(블로커)', '기타') AS lock_status,
    s.sid,
    s.serial#,
    s.username,
    s.status,
    s.last_call_et,
    o.object_name
FROM
    v$lock     l,
    v$session  s,
    dba_objects o
WHERE
    l.sid  = s.sid
    AND l.id1 = o.object_id(+)
    AND l.type = 'TM'
ORDER BY
    l.block DESC, l.id1;


예방 방법

1. DDL 작업 전 사전 점검 및 유지보수 윈도우 활용

운영 환경에서 DDL 작업은 반드시 서비스 트래픽이 최소화된 유지보수 윈도우(Maintenance Window) 시간대에 수행해야 합니다. 작업 전에는 아래 스크립트로 해당 테이블에 활성 세션이 없는지 반드시 확인하고, DDL_LOCK_TIMEOUT 파라미터를 적절히 설정하여 일시적인 경합에 유연하게 대처하는 것이 Best Practice입니다.

-- DDL 작업 전 활성 세션 사전 점검 스크립트
SELECT
    s.sid,
    s.serial#,
    s.username,
    s.status,
    s.sql_id,
    s.last_call_et AS elapsed_sec,
    t.start_time   AS tx_start
FROM
    v$session     s,
    v$transaction t
WHERE
    s.taddr = t.addr(+)
    AND s.username IS NOT NULL
    AND s.status   = 'ACTIVE'
ORDER BY
    elapsed_sec DESC;

2. 정기적인 락 모니터링 및 자동 알림 체계 구축

장기 락 세션을 실시간으로 탐지할 수 있는 모니터링 잡을 구성하고, 임계치 초과 시 DBA에게 알림이 발송되도록 자동화해야 합니다. Oracle Enterprise Manager(OEM) 또는 커스텀 DBMS_SCHEDULER 잡을 활용하여 5분 단위로 장기 락 세션을 점검하고 로그를 남기면, 문제 발생 시 신속한 원인 분석이 가능합니다.

-- DBMS_SCHEDULER를 이용한 정기 락 모니터링 잡 생성 예시
BEGIN
    DBMS_SCHEDULER.CREATE_JOB(
        job_name        => 'JOB_LOCK_MONITOR',
        job_type        => 'PLSQL_BLOCK',
        job_action      => '
            BEGIN
                -- 10분 이상 락 보유 세션 감지 시 로그 테이블에 기록
                INSERT INTO dba_lock_log (sid, serial#, username, elapsed_min, log_time)
                SELECT s.sid, s.serial#, s.username,
                       ROUND((SYSDATE - t.start_time)*24*60, 2),
                       SYSDATE
                FROM   v$session s, v$transaction t
                WHERE  s.taddr = t.addr
                AND    (SYSDATE - t.start_time)*24*60 > 10;
                COMMIT;
            END;
        ',
        start_date      => SYSTIMESTAMP,
        repeat_interval => 'FREQ=MINUTELY; INTERVAL=5',
        enabled         => TRUE,
        comments        => '장기 락 세션 5분 주기 모니터링'
    );
END;
/


관련 에러

  • ORA-00055: maximum number of DML locks exceeded — DML 락의 최대 허용 개수를 초과한 경우 발생하며, DML_LOCKS 파라미터 조정이 필요합니다.
  • ORA-00060: deadlock detected while waiting for resource — 두 세션이 서로 상대방의 락을 기다리며 교착 상태에 빠진 경우 발생합니다. Oracle은 자동으로 하나의 세션을 롤백하여 해소합니다.
  • ORA-04021: timeout occurred while waiting to lock object — 데이터 딕셔너리 객체에 대한 잠금 획득 타임아웃 시 발생하며, 주로 DDL 작업 중 경합 시 나타납니다.
  • ORA-01013: user requested cancel of current operation — 락 대기 중 사용자 취소 요청이 발생했을 때 나타납니다.