Newsgroup: it.comp.software.database
Titolo: Aiuto cr_db.sql

Data un'istanza Oracle,817, come faccio ad avere lo script di
creazione
della stessa , unix , visto che chi ha creato l'istanza ha usato
il
DBAssist ?
E' possibile, solo sapere dove bisogna andare a prendere i
valori giusti.
non voglio riusare dbassist.
grazie in anticipo.
--------------------------------
Inviato via 
http://usenet.iol.it

 non voglio riusare dbassist.
ti spedisco PRIMA la seconda parte...
in genere la creazione di un db avviene in 3 steps-
da svrmgrl (db chiuso), lanci:
1:
------------
set echo on
connect internal
startup nomount
create database "ludo"
    maxinstances 1
    maxlogfiles 8
    datafile '/ora/oradata/ludo/system_01.dbf' size 40M
    logfile
        '/ora/oradata/ludo/redo_01.dbf' size 1M,
        '/ora/oradata/ludo/redo_02.dbf' size 1M,
        '/ora/oradata/ludo/redo_03.dbf' size 1M;
-------------
questo ti crea il db. ovviamente l'init.ora deve essere gia esistente.
2:
---------------------------------
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
--------------------------------
questo ti crea viste, ruoli, triggers ecc.. di sistema
3:
---------------------
create tablespace rbs datafile
        '/ora/oradata/ludo/roll_01.dbf' size  10M
default storage (
        initial          1M
        next             1M
        pctincrease        0
        minextents         2
);
create tablespace temp datafile
        '/ora/oradata/ludo/temp_01.dbf' size 5M temporary
default storage (
        initial      256k
        next         256k
        pctincrease  0
);
create rollback segment r01 tablespace rbs
storage ( initial 1M next 1M optimal 2M minextents 2 maxextents 20);
create rollback segment r02 tablespace rbs
storage ( initial 1M next 1M optimal 2M minextents 2 maxextents 20);
create rollback segment r03 tablespace rbs
storage ( initial 1M next 1M optimal 2M minextents 2 maxextents 20);
create rollback segment r04 tablespace rbs
storage ( initial 1M next 1M optimal 2M minextents 2 maxextents 20);
alter rollback segment r01 online;
alter rollback segment r02 online;
alter rollback segment r03 online;
alter rollback segment r04 online;
alter user sys temporary tablespace temp;
alter user system temporary tablespace temp;
--------------------------
questo ti crea tbsp di base e rbs vari
ciao

 
nella ORACLE_HOME:
orapwd file=orapw<SID> password=manager #o quella che vuoi
ti mando il mio init.ora.
le directories devono essere già esistenti.
(i files invece li crea la creazione del db che ho già spedito).
in ORACLE_HOME/dbs deve esserci il link al tuo init.ora e si deve chiamare
init<SID>.ora
ciao
[LIST init.ora]
# replace DEFAULT with your database name
db_name=ludo
db_files = 80                                                         # 
SMALL
# db_files = 400                                                      # 
MEDIUM
# db_files = 1000                                                     # 
LARGE
db_file_multiblock_read_count = 8                                     # 
SMALL
# db_file_multiblock_read_count = 16                                  # 
MEDIUM
# db_file_multiblock_read_count = 32                                  # 
LARGE
db_block_buffers = 100                                                 # 
SMALL
# db_block_buffers = 550                                              # 
MEDIUM
#db_block_buffers = 3200                                            # LARGE
shared_pool_size = 3500000                                            # 
SMALL
# shared_pool_size = 5000000                                          # 
MEDIUM
# shared_pool_size = 9000000                                          # 
LARGE
log_checkpoint_interval = 10000
processes = 50                                                        # 
SMALL
# processes = 100                                                     # 
MEDIUM
# processes = 200                                                     # 
LARGE
parallel_max_servers = 5                                              # 
SMALL
# parallel_max_servers = 4 x (number of CPUs)                         # 
MEDIUM
# parallel_max_servers = 4 x (number of CPUs)                         # 
LARGE
log_buffer = 8192                                                     # 
SMALL
# log_buffer = 32768                                                  # 
MEDIUM
# log_buffer = 163840                                                 # 
LARGE
sequence_cache_entries = 10                                           # 
SMALL
# sequence_cache_entries = 30                                         # 
MEDIUM
# sequence_cache_entries = 100                                        # 
LARGE
sequence_cache_hash_buckets = 10                                      # 
SMALL
# sequence_cache_hash_buckets = 23                                    # 
MEDIUM
# sequence_cache_hash_buckets = 89                                    # 
LARGE
# audit_trail = true            # if you want auditing
# timed_statistics = true       # if you want timed statistics
max_dump_file_size = 10240      # limit trace file size to 5 Meg each
# Uncommenting the line below will cause automatic archiving if archiving 
has
# been enabled using ALTER DATABASE ARCHIVELOG.
# log_archive_start = true
# log_archive_dest = disk$rdbms:[oracle.archive]
# log_archive_format = "T%TS%S.ARC"
log_archive_start = false
log_archive_dest = /ora/arch/ludo
log_archive_format = "T%TS%S.ARC"
# If using private rollback segments, place lines of the following
# form in each of your instance-specific init.ora files:
# rollback_segments = (name1, name2)
# If using public rollback segments, define how many
# rollback segments each instance will pick up, using the formula
#   # of rollback segments = transactions / 
transactions_per_rollback_segment
# In this example each instance will grab 40/10 = 4:
# transactions = 40
# transactions_per_rollback_segment = 10
# Global Naming -- enforce that a dblink has same name as the db it 
connects to
global_names = FALSE
# Edit and uncomment the following line to provide the suffix that will be
# appended to the db_name parameter (separated with a dot) and stored as the
# global database name when a database is created.  If your site uses
# Internet Domain names for e-mail, then the part of your e-mail address 
after
# the '@' is a good candidate for this parameter value.
# db_domain = 
us.acme.com
       # global database name is db_name.
db_domain = ludo
# FOR DEVELOPMENT ONLY, DEFAULT TO SINGLE-PROCESS
# single_process = TRUE
# FOR DEVELOPMENT ONLY, ALWAYS TRY TO USE SYSTEM BACKING STORE
# vms_sga_use_gblpagfil = TRUE
# FOR BETA RELEASE ONLY.  Enable debugging modes.  Note that these can
# adversely affect performance.  On some non-VMS ports the db_block_cache_*
# debugging modes have a severe effect on performance.
#_db_block_cache_protect = true                       # memory protect 
buffers
#event = "10210 trace name context forever, level 2" # data block checking
#event = "10211 trace name context forever, level 2" # index block checking
#event = "10235 trace name context forever, level 1" # memory heap checking
#event = "10049 trace name context forever, level 2" # memory protect 
cursors
# define parallel server (multi-instance) parameters
#ifile = ora_system:initps.ora
# define two control files by default
control_files = (/ora/oradata/ludo/ora_control1, 
/ora/oradata/ludo/ora_control2)
# Uncomment the following line if you wish to enable the Oracle Trace 
product
# to trace server activity.  This enables scheduling of server collections
# from the Oracle Enterprise Manager Console.
# Also, if the oracle_trace_collection_name parameter is non-null,
# every session will write to the named collection, as well as enabling you
# to schedule future collections from the console.
# oracle_trace_enable = TRUE
remote_login_passwordfile = exclusive

create rollback segment r04 tablespace rbs
ti ringrazio per il
pensiero, ma non è esattamente quello che cercavo,
forse mi sono spiegato
male, quei nomi/parametri/path/valori che
tu indichi nei vari cr_db_x.sql
io vorrei che venissero presi
dall 'istanza esistente.
mi spiego:
da
sqlplus lancio una query che faccia:
spool cr_db.sql
select "create
database"|| 
db.name
 " 
       from v$database
. . . .
....
spool off
al lancio del file spoollato devo ottenere, da un'altra parte un'istanza
clonata, adesso che ci penso dovrei avere un clona db!
grazie e spero di
essermi capito.


 clonata, adesso che ci penso dovrei avere un clona db!
se vuoi calonare il db al 100% puoi usare rman... chiaro che ci va qualche 
nozione in +!!
se vuoi provare "a mano"
devi guardare il manuale Oracle 8i reference
che contiene tutte le variabili, parametri, viste di sistema...
(dba_data_files, v$database, v$logfile, v$parameter ecc..)
ma sarà un po' lungo...
io il db assistant lo uso solo sotto Windows e possibilmente cerco di 
evitare anche quello!
ciao