1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

RMANやSQLPLUSの日付データを日時表示にする

Posted at

■日付を日時に整形する

--sqlplusの場合
alter session set nls_date_format = 'yyyy/mm/dd hh24:mi:ss';

※RMANの場合は以下のOSコマンドで事前に実行する。

--OSコマンドの場合
export NLS_DATE_FORMAT='YY-MM-DD HH24:MI:SS'

■おまけ

「ORA-01843: 指定した月が無効です。 ORA-06512:」

上記エラーが表示された場合、DBのデフォルト言語を以下に設定する必要がある。

alter session set NLS_LANGUAGE='AMERICAN';

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?