2 Replies Latest reply: Feb 12, 2013 10:12 AM by TSharma-Oracle RSS

    RMAN SET NLS PARAMETERS

    902332
      Hi all,

      while restoring the database to point in time does we need to set NLS_LANG and NLS_DATE_FORMAT parameters, is these are mandatory parameters..?

      My database restore to point in time is not getting successful. it's restore everything. Please let me know about these paramters...

      Thank you!
        • 1. Re: RMAN SET NLS PARAMETERS
          vlethakula
          You have to specify time using

          set until time "to_date('Feb 12 2013 08:00:00','Mon DD YYYY HH24:MI:SS')";
          • 2. Re: RMAN SET NLS PARAMETERS
            TSharma-Oracle
            Setting NLS Environment Variables
            Before invoking RMAN, set the NLS_DATE_FORMAT and NLS_LANG environment variables. These variables determine the format used for the time parameters in RMAN commands such as restore, recover, and report.

            The following example shows typical language and date format settings:

            NLS_LANG=american
            NLS_DATE_FORMAT='Mon DD YYYY HH24:MI:SS'

            Specifying Dates in RMAN Commands
            When specifying dates in RMAN commands, the date string can be either:

            A literal string whose format matches the NLS_DATE_FORMAT setting.

            A SQL expression of type DATE, for example, 'SYSDATE-10' or "TO_DATE('01/30/1997', 'MM/DD/YYYY')". Note that the second example includes its own date format mask and so is independent of the current NLS_DATE_FORMAT setting.

            Following are examples of typical date settings in RMAN commands:

            backup archivelog from time 'SYSDATE-31' until time 'SYSDATE-14';
            restore database until time "TO_DATE('12/20/98','MM/DD/YY')";

            Specifying the Database Character Set
            If you are going to use RMAN to connect to a non-mounted database and then mount the database later while RMAN is still connected, set the NLS_LANG variable so that it also specifies the character set used by the database.

            A database that is not mounted assumes the default character set, which is US7ASCII. If your character set is different from the default, then RMAN returns errors after the database is mounted. To avoid this problem, set the NLS_LANG to specify the target database's character set. For example, if the character set is WE8DEC, you can set the NLS_LANG parameter as follows:

            NLS_LANG=american_america.we8dec.


            --------------------------------------------------------------------------------
            Note:
            You must set both NLS_LANG and NLS_DATE_FORMAT for NLS_DATE_FORMAT to be used.


            This is the snippet from the following link:
            http://docs.oracle.com/cd/A84870_01/doc/server.816/a76990/preparer.htm

            What exact error you are getting?