1 package AD_TSPACE_UTIL AUTHID CURRENT_USER as
2 /* $Header: adtsutls.pls 115.9 2002/12/12 21:09:54 athies noship $*/
3 -- Star of Comments
4 --
5 -- Name
6 --
7 -- Package name: AD_TSPACE_UTIL
8 --
9 -- History
10 -- Sept-10-02 hxue Creation Date
11 -- Dec-10-02 sgadag Added function to accept
12 -- application_id
13 --
14 --
15 procedure is_new_ts_mode(x_ts_mode out NOCOPY varchar2);
16 --
17 -- Purpose
18 --
19 -- Check whether the database is in new tablespace management mode or not.
20 --
21 -- Arguments
22 --
23 -- Out Parameters
24 --
25 -- x_ts_mode Return value of 'Y' indicates new tablespace management mode
26 -- Return value of 'N' indicates old tablespace management mode
27 --
28 -- Example
29 --
30 -- none
31 --
32 -- Notes
33 --
34 -- none
35 --
36 procedure get_object_tablespace(x_product_short_name in varchar2,
37 x_object_name in varchar2,
38 x_object_type in varchar2,
39 x_index_lookup_flag in varchar2,
40 x_validate_ts_exists in varchar2,
41 x_is_object_registered out NOCOPY varchar2,
42 x_ts_exists out NOCOPY varchar2,
43 x_tablespace out NOCOPY varchar2);
44 --
45 -- Purpose
46 --
47 -- Returns the tablespace based on the product short name,
48 -- object name, object type and index look up flag.
49 -- Also return flags which indicate if the object specified has been registered in
50 -- FND_OBJECT_TABLESPACES and if x_validate_ts_exists is passed an 'Y', will validate
51 -- whether or not the tablespace exists in the database
52 --
53 -- Arguments
54 --
55 -- In Parameters
56 -- x_product_short_name: Application Short Name that the object belongs to
57 -- x_object_name: the name of object
58 -- x_object_type: valid object types are TABLE, MVIEW, AQ_TABLE, IOT_TABLE and MV_LOG.
59 -- x_index_lookup_flag: to get the tablespace for an index, pass the table
60 -- name on which the index is based as x_object_name,
61 -- pass 'TABLE' as x_object_type
62 -- and 'Y' as x_index_lookup_flag. Set this flag
63 -- to 'N'' if you are not looking up and index
64 -- x_validate_ts_exists: 'Y': to check if the tablespace exist,
65 -- 'N': do not check if the tablespace exist,
66 -- Out Parameters
67 -- x_is_object_registered: 'Y' indicates the object has been registered in
68 -- FND_OBJECT_TABLESPACES
69 -- 'N' indicates the object has not been registered
70 -- x_ts_exists:
71 -- 'Y': indicates the tablespace exists
72 -- 'N': indicates the tablespace does not exist
73 -- This will be Null if x_validate_ts_exists is 'N''
74 --
75 -- x_tablespace: the name of the(physical) tablespace
76 --
77 -- Example
78 --
79 -- none
80 --
81 -- Notes
82 --
83 -- none
84 --
85 procedure get_tablespace_name(x_product_short_name in varchar2,
86 x_tablespace_type in varchar2,
87 x_validate_ts_exists in varchar2,
88 x_ts_exists out NOCOPY varchar2,
89 x_tablespace out NOCOPY varchar2);
90 --
91 -- Purpose
92 --
93 -- Returns a physical tablespace given a tablespace type (logical tablespace)
94 -- and Application Short Name. Also returns a flag which indicates if the
95 -- tablespace exists in the database
96 --
97 -- Arguments
98 -- In Parameters
99 -- x_product_short_name: Application Short Name that object belongs to
100 -- x_tablespace_type: the tablespace type (logical tablespace name)
101 -- x_validate_ts_exists: 'Y' to check if the tablespace exists,
102 -- 'N' do not check
103 -- Out Parameters
104 -- x_ts_exists: 'Y': indicates the tablespace exists
105 -- 'N': indicates the tablespace does not exist
106 -- This will be Null if x_validate_ts_exists is 'N'
107 --
108 -- x_tablespace: the name of the (physical) tablespace
109 --
110 -- Example
111 --
112 -- none
113 --
114 -- Notes
115 --
116 -- none
117 --
118 function get_appl_id(x_product_short_name in varchar2) return number;
119 -- Function to return application_short_name from FND_APPLICATION
120 -- when passed application_id
121 function get_product_short_name(x_appl_id in number) return varchar2;
122 -- Function to return application_id from FND_APPLICATION
123 -- when passed application_short_name
124 end AD_TSPACE_UTIL;