# info > Apache::Session::Oracle

---
type: CommandReference
command: Apache::Session::Oracle
mode: perldoc
section: 3pm
source: perldoc
---

## Quick Reference

- `tie %hash, 'Apache::Session::Oracle', $id, { DataSource => ..., UserName => ..., Password => ..., Commit => 1 }` — Open new DB handles and store session
- `tie %hash, 'Apache::Session::Oracle', $id, { Handle => $dbh, Commit => 1 }` — Use existing database handle

## Name

Apache::Session::Oracle - An implementation of Apache::Session using Oracle backing store with no locking

## Synopsis

perl
use Apache::Session::Oracle;

# Open new DB handles:
tie %hash, 'Apache::Session::Oracle', $id, {
   DataSource => 'dbi:Oracle:sessions',
   UserName   => $db_user,
   Password   => $db_pass,
   Commit     => 1
};

# Use existing handle:
tie %hash, 'Apache::Session::Oracle', $id, {
   Handle => $dbh,
   Commit => 1
};
## Options

- `DataSource` — DBI data source string (e.g., `'dbi:Oracle:sessions'`)
- `UserName` — Database username
- `Password` — Database password
- `Handle` — Existing database handle (alternative to DataSource/UserName/Password)
- `Commit` — **Mandatory**. If true, commits the transaction after each session write. If false, relies on external transaction management.
- `LongReadLen` — Maximum size of session object in bytes (default: 8192)

## Examples

Open new database handles:

perl
tie %hash, 'Apache::Session::Oracle', $id, {
   DataSource => 'dbi:Oracle:sessions',
   UserName   => $db_user,
   Password   => $db_pass,
   Commit     => 1
};
Use an existing database handle:

perl
tie %hash, 'Apache::Session::Oracle', $id, {
   Handle => $dbh,
   Commit => 1
};
## See Also

- [Apache::Session::File](http://localhost/phpMan.php/perldoc/Apache%3A%3ASession%3A%3AFile/markdown)
- [Apache::Session::Flex](http://localhost/phpMan.php/perldoc/Apache%3A%3ASession%3A%3AFlex/markdown)
- [Apache::Session::DB_File](http://localhost/phpMan.php/perldoc/Apache%3A%3ASession%3A%3ADBFile/markdown)
- [Apache::Session::Postgres](http://localhost/phpMan.php/perldoc/Apache%3A%3ASession%3A%3APostgres/markdown)
- [Apache::Session](http://localhost/phpMan.php/perldoc/Apache%3A%3ASession/markdown)