> For the complete documentation index, see [llms.txt](https://docs.tibero.com/tibero-manuals/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tibero.com/tibero-manuals/7.2.6.manuals/sql-reference-guide/data-definition-language/create-context.md).

# CREATE CONTEXT

문맥 네임스페이스를 생성하거나 수정하고, 해당 네임스페이스의 문맥을 조작할 수 있는 패키지를 지정합니다. 지정된 패키지에서 DBMS\_SESSION.SET\_CONTEXT 프러시저를 사용해 해당 네임스페이스의 속성 값을 설정할 수 있습니다.

문맥 네임스페이스를 생성하거나 수정하고, 해당 네임스페이스의 문맥을 조작할 패키지를 지정합니다.

지정된 패키지에서는 DBMS\_SESSION.SET\_CONTEXT 프러시저를 사용해 해당 네임스페이스의 속성 값을 설정할 수 있습니다.

**CREATE CONTEXT**의 세부 내용은 다음과 같습니다.

* **문법**

<div align="left"><figure><img src="https://content.gitbook.com/content/evqs7Ne3nMyXQFkBSQWR/blobs/5cFXkh1h8iOhjh0JXkqA/image.png" alt=""><figcaption></figcaption></figure></div>

* **특권**
  * `CREATE ANY CONTEXT` 시스템 특권이 있어야 합니다.
* **구성요소**

– create\_context\_clause

<table><thead><tr><th width="223">구성요소</th><th>설명</th></tr></thead><tbody><tr><td>namespace</td><td>생성하거나 수정할 문맥 네임스페이스 이름을 지정</td></tr><tr><td>schema</td><td><ul><li>문맥을 조작할 패키지의 스키마를 지정</li><li>생략하면 현재 스키마를 가정</li></ul></td></tr><tr><td>package_name</td><td><ul><li>문맥을 조작할 패키지 이름을 지정</li><li>패키지가 현재 존재하지 않아도 DDL은 정상 수행됨</li></ul></td></tr><tr><td>ACCESSED GLOBALLY</td><td>데이터베이스 인스턴스가 살아 있는 동안 모든 세션에서 해당 문맥의 내용을 읽을 수 있게 설정</td></tr></tbody></table>

* **예제**

다음은 **CREATE CONTEXT**를 사용해 문맥을 생성하는 예입니다. 보안 정책을 구현한 패키지는 `pol_pkg`이며, 문맥 네임스페이스 이름은 `sec_ctx`입니다.

```sql
SQL> CREATE CONTEXT sec_ctx USING pol_pkg;
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tibero.com/tibero-manuals/7.2.6.manuals/sql-reference-guide/data-definition-language/create-context.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
