jump.kanjibarcode.com

ASP.NET PDF Viewer using C#, VB/NET

The CHECK_DB function checks whether you can transport the tablespace from its current location to a different platform, and whether the tablespace is in the correct state for performing the transport. In the following example, I use this function to see if I can transport tablespaces from a database running on Linux to a database running on the Solaris operating system. You can find out the target platform name by querying the V$TRANSPORTABLE_PLATFORM view, as shown in 14. The related V$DB_TRANSPORTABLE_PLATFORM view shows all platforms that have the same endian format as the source platform. If the endian formats are the same, you won t need to perform any conversion of the tablespaces. If they aren t, you use the RMAN command CONVERT TABLESPACE to perform a conversion either before or after moving the source platform s database files over to the target platform. SQL> SET SERVEROUTPUT ON SQL> DECLARE db_ready BOOLEAN; BEGIN db_ready := DBMS_TDB.CHECK_DB('Solaris Operating System (x86)'); END; / Database is not open READ-ONLY mode. Open the database in READ-ONLY mode and retry. PL/SQL procedure successfully completed. SQL> The CHECK_DB function tells me to open my database first in the READ ONLY mode. I shut down the database and start it up in the READ ONLY mode: SQL> SHUTDOWN IMMEDIATE; SQL> STARTUP MOUNT SQL> ALTER DATABASE OPEN READ ONLY; Database altered. SQL> Once the database is in the READ ONLY mode, I execute the CHECK_DB function again. This time, the function executes without any messages, indicating that I can transport the tablespaces from my database to the Solaris operating system, because their endian formats are compatible: SQL> SET SERVEROUTPUT ON SQL> DECLARE db_ready BOOLEAN; BEGIN

excel 2007 barcode formula, barcode excel, excel barcodes free, free barcode generator for excel 2013, barcode in excel 2007 free, barcode in excel 2007, barcode generator in excel 2007 free download, microsoft excel 2010 barcode generator, create barcode macro excel, active barcode excel 2010,

db_ready := DBMS_TDB.CHECK_DB('Solaris Operating System (x86)'); END; / PL/SQL procedure successfully completed. SQL> If the operating system name you supplied for the CHECK_DB function isn t compatible with your current operating system, you d have seen the following message instead: The specified target platform name 'platform_name' is invalid or the target platform is not transportable

Microsoft (R) COFF/PE Dumper Version 8.00.50727.42 Copyright (C) Microsoft Corporation. All rights reserved.

The CHECK_EXTERNAL function checks for any external tables, directories, or BFILEs in the database. Here s an example: SQL> SET SERVEROUTPUT ON SQL> DECLARE external BOOLEAN; BEGIN external := DBMS_TDB.CHECK_EXTERNAL; END; / The following directories exist in the database: SYS.DATA_PUMP_DIR, SYS.ADMIN_DIR, SYS.WORK_DIR PL/SQL procedure successfully completed. SQL>

DBMS_JOB is one of the most widely used Oracle-supplied packages. You can use the package to schedule and maintain automated user jobs from within the Oracle database. Many times, you ll need to schedule a program to run on a regular basis, and the DBMS_JOB package lets you do this without recourse to the operating system utilities. With the introduction of the Oracle Scheduler feature, the DBMS_JOB package becomes a secondary way to schedule jobs in your database. The Oracle Scheduler feature is much more powerful than the job system you can create with the DBMS_JOB package, and offers you many more capabilities. I discuss the DBMS_SCHEDULER package, which supports the Oracle Scheduler, later in this chapter, in the section titled DBMS_SCHEDULER.

The final condition handles the case where there is no issue with the running process: the script just issues a message saying so.

You use various procedures in the DBMS_JOB package to create and schedule jobs. The SUBMIT procedure, which lets you submit a new job, has several parameters, which I explain in more detail in the following section. These parameters are as follows: JOB: This parameter stands for the job ID. WHAT: This is the code to be executed, and it can be plain SQL or a PL/SQL module.

NEXT_DATE: This parameter indicates the next time the job is to be run. INTERVAL: This parameter indicates the next time to execute the job after NEXT_DATE. NO_PARSE: This parameter s default is FALSE. If it s set to TRUE, Oracle will parse the statement when it s run for the first time. INSTANCE: This parameter specifies the instance that runs the jobs. FORCE: This parameter s default is FALSE, which means that the instance must be running for the job to be scheduled. Listing 24-1 shows the use of the SUBMIT procedure to create and schedule a new job. Listing 24-1. Using the SUBMIT Procedure SQL> DECLARE 2 v_job NUMBER; 3 v_what VARCHAR2(1000) := 'insert into test_table values (9999);'; 4 BEGIN 5 dbms_job.submit(job => v_job, 6 what => v_what, 7 next_date => sysdate, 8 interval => 'sysdate + 1/24'); 9 COMMIT; 10 END; 11* / PL/SQL procedure successfully completed. SQL> As you can see from Listing 24-1, you need to pass values for at least two parameters, JOB and WHAT, to schedule a job. However, it s important to pass the NEXT_DATE and INTERVAL parameters instead of taking the default values.

If you don t specify the NEXT_DATE parameter explicitly, the job will run only once. Note that you also need to use an explicit COMMIT after your DBMS_JOB.SUBMT procedure.

To make sure your job is scheduled correctly, you can query the DBA_JOBS dictionary view, as shown here: SQL> SELECT job, 2 next_date, 3 what 4 FROM 5* dba_jobs; JOB NEXT_DATE WHAT ----- -------------------------- -----------------------------2 11-JUL-2005 05:00:00 am insert into test values (9999); SQL>

else test $debug -gt 0 && echo "process cpu time ok" fi ;;

   Copyright 2020.