|
|
| 控制文件丢失的解决办法 |
| 作者:无从考证 来源:转载 发布时间:2005-12-29 23:52:25 发布人:我爱源码 |
减小字体
增大字体
关键的内容有: FUNCTION deviceAllocate( type IN varchar2 default NULL ,name IN varchar2 default NULL ,ident IN varchar2 default NULL ,noio IN boolean default FALSE ,params IN varchar2 default NULL ) RETURN varchar2; -- Describe the device to be used for sequential I/O. For device types where -- only one process at a time can use a device, this call allocates a device -- for exclusive use by this session. The device remains allocated until -- deviceDeallocate is called or session termination. The device can be used -- both for creating and restoring backups. -- -- Specifying a device allocates a context that exists until the session -- terminates or deviceDeallocate is called. Only one device can be specified -- at a time for a particular session. Thus deviceDeallocate must be called -- before a different device can be specified. This is not a limitation since -- a session can only read or write one backup at a time. -- -- The other major effect of allocating a device is to specify the name space -- for the backup handles (file names). The handle for a sequential file does -- not necessarily define the type of device used to write the file. Thus it -- is necessary to specify the device type in order to interpret the file -- handle. The NULL device type is defined for all systems. It is the file -- system supplied by the operating system. The sequential file handles are -- thus normal file names. -- -- A device can be specified either by name or by type. -- If the type is specified but not the name, the system picks an -- available device of that type. -- If the name is specified but not the type, the type is determined -- from the device. -- If neither the type or the name is given, the backups are files in -- the operating system file system. -- Note that some types of devices, optical disks for example, can be shared -- by many processes, and thus do not really require allocation of the device -- itself. However we do need to allocate the context for accessing the -- device, and we do need to know the device type for proper interpretation -- of the file handle. Thus it is always necessary to make the device -- allocation call before making most other calls in this package. -- -- Input parameters: -- type -- If specified, this gives the type of device to use for sequential -- I/O. The allowed types are port specific. For example a port may -- support the type "TAPE" which is implemented via the Oracle tape -- API. If no type is specified, it may be implied by specifying a -- particular device name to allocate. The type should be allowed to -- default to NULL if operating system files are to be used. -- -- name -- If specified, this names a particular piece of hardware to use for -- accessing sequential files. If not specified, any available -- device of the correct type will be allocated. If the device cannot -- be shared, it is allocated to this session for exclusive use. -- The name should be allowed to default to NULL if operating system -- files are to be used. -- -- ident -- This is the users identifier that he uses to name this device. It -- is only used to report the status of this session via -- dbms_application_info. This value will be placed in the CLIENT_INFO -- column of the V$SESSION table, in the row corresponding to the -- session in which the device was allocated. This value can also -- be queried with the dbms_application_info.read_client_info procedure. -- -- noio -- If TRUE, the device will not be used for doing any I/O. This allows -- the specification of a device type for deleting sequential files -- without actually allocating a piece of hardware. An allocation for -- noio can also be used for issuing device commands. Note that some -- commands may actually require a physical device and thus will get -- an error if the allocate was done with noio set to TRUE. -- -- params -- This string is simply passed to the device allocate OSD. It is -- completely port and device specific. -- -- Returns: -- It returns a valid device type. This is the type that should be -- allocated to access the same sequential files at a later date. Note -- that this might not be exactly the same value as the input string. -- The allocate OSD may do some translation of the type passed in. The -- return value is NULL when using operating system files.
PROCEDURE restoreControlfileTo(cfname IN varchar2); -- This copies the controlfile from the backup set to an operating system -- file. If the database is mounted, the name must NOT match any of the -- current controlfiles. -- -- Input parameters: -- cfname -- Name of file to create or overwrite with the controlfile from the -- backup set.
PROCEDURE restoreDataFileTo( dfnumber IN binary_integer ,toname IN varchar2 default NULL); -- -- restoreDataFileTo creates the output file from a complete backup in the -- backup set. 如果您有兴趣可以去阅读一下这两个文件的注释说明. 我们首先尝试恢复控制文件:上一页 [1] [2] [3] 下一页
|
|
[]
[返回上一页]
[打 印]
[收 藏] |
|
| ∷相关文章评论∷ (评论内容只代表网友观点,与本站立场无关!) [发表评论...] |
|
|