الانتقال إلى المحتوى

سؤال وجواب في Dba - موضوع متجدد


mageed_ahmed

Recommended Posts

  • الردود 119
  • البداية
  • اخر رد

أكثر المشاركين في هذا الموضوع

  • mageed_ahmed

    56

  • نور بوظبي

    6

  • honr

    5

  • المقنع2005

    4

السلام عليكم

عندي سوال :

الان عندي داتا بيز ابي وانسخها في مكان اخر في نفس السيرفر

السيرفر AIX


طبعا الغرض من النسخ DUPLICATE هو اعادة ترتيب الملفات و الفايل سيستم

انا انشئت الفايل سيستم الجديدة على الشكل الاتي

/dev/fslv35 75.00 74.99 1% 4 1% /u09/oradata/ebsprod/data
/dev/fslv36 20.00 20.00 1% 4 1% /u09/oradata/ebsprod/index
/dev/fslv37 2.00 2.00 1% 4 1% /u09/oradata/ebsprod/ctl
/dev/fslv38 10.00 10.00 1% 4 1% /u09/oradata/ebsprod/arch
/dev/fslv39 2.94 2.94 1% 4 1% /u09/oradata/ebsprod/redo


بس سوالي بالتحديد

ما الخطوات التي يجب القيام بها قبل عملية النسخ

وخاصة التعديلات الي في PARAMETER

اي PARAMETER يجب تغييره

وما الخطوات اللاحقة

ماهي البارياميتر التي يجب تغييرها لتواكب البااااث الجديد


----

معلومات الداتا بيز :

Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi



بعد كذا ما الامر الي يجب استخدامه في عملية النسخ


RMAN




=========

بعد ما اخلص من هذا كله كيف اتاكد من صحة عملي ؟

ادري الاسئلة كثيرة بس احسها بتكون مفيده كثيرا


ارجوا الرد والمساعدة


شكرا اخوي على الموصوع الرائع

اخوك عبدالعزيز

رابط هذا التعليق
شارك

السلام عليكم ورحمة الله وبركاته

أخي الكريم

لتحضير قاعدة بياناتك لعملية ال duplication يجب أن تقوم اولا بعمل auxiliary instance ويتم ذلك علي خطوات


في الرابط التالي ستجد بالفعل كل الخطوات مشروحة بسلاسة ويسر وما عليك الا تنفيذ الخطوات واذا كان لديك اي استفسارات أخري أرجوا التكرم بعملها في موضوع منفصل متنين لكم دوام التوفيق

الرابط
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb.htm#i1006474

رابط هذا التعليق
شارك

  • بعد 2 أسابيع...

السلام عليكم ورحمة الله وبركاته

س: ما هي أكثر الاسئلة شيوعا لمقابلات ال DBA

الاجابه
بعضها كما يلي علي أن يتم سردها في ردود أخري باذن الله تعالي

1. Explain database instance ?

A database instance (server) is a set of memory structures and background processes that access a set of database files.
The memory structures are used to store most queried data from database. This helps us to improve database performance by decreasing the amount of I/O performed against data file.
The process can be shared by all users.

2. What is parallel server?
Multiple instances accessing the same database (Only in Multi-CPU environments).

3. What is Schema ?
The set of objects owned by user account is called the schema

4. What is an Index ? How it is implemented in Oracle Database ?
An index is a database structure used by the server to have direct access of a row in a table.An index is automatically created when a unique or primary key constraint clause is specified in create table command

5. What is a clusters? Explain
Group of tables physically stored together because they share common columns and are often used together is called Clusters.

6. What is a cluster key ?
The related columns of the tables are called the cluster key. The cluster key is indexed using a cluster index and its value is stores only once for multiple tables in the cluster.

7. What are the basic element of an oracle Database ?
It consists ofone or more data filesone or more control filestwo or more redo log files
The database containsMultiple users/schemasone or more rollback segmentsone or more tablespacesData dictionary tables
User objects (tables,indexes,views etc)
The server that access the database consists of
SGA (Database buffer, Dictionary Cache Buffers, redo log buffers,Shared SQL pool)
SMON
PMON
LGWR
DBWR
ARCH
CKPT
RECO
Dispatcher
User process with associated PGA

8. What is deadlock ? Explain.
Two processes waiting to update the rows of a table which are locked by the other process then deadlock arises.
In a database environment this will often happen because of not issuing proper row lock commands. Poor design of front-end application may cause this situation and the performance of server will reduce drastically.
These locks will be released automatically when a commit/rollback operation performed or any one of this processes being killed externally.

9. What is SGA ?
The System Global Area in a Oracle database is the area in memory to facilitates the transfer of information between users. It holds the most recently requested structural information about the database.

10. What is Shared SQL pool ?
The data dictionary cache is stored in an area in SGA called the Shared SQL Pool. This will allow sharing of parsed SQL statements among concurrent users.

11. What is meant by Program Global Area (PGA) ?
It is area in memory that is used by a Single Oracle User process.

12. What is a data segment ?
Data segment are the physical areas within a database block in which the data associated with tables and clusters are stored.

13. What are the factors causing the reparsing of SQL statements in SGA ?
Due to insufficient Shared SQL pool size

تحياتي

رابط هذا التعليق
شارك

س : كيف يمكن تحميل عدة صيغ مختلفة لتواريخ باستخدام sql loader

ج : If you have to load a flat file containing multiple date formats into an Oracle Database, you must convert the date columns into the datatype DATE - but how can this be performed with SQL*Loader?

We received the following flat file contained multiple date formats:

roland egli, 01-11-00
martin zahn, 03/05/01
christoph gächter, 03.05.03
eric dubuis, jan-01-01
christoph zenger, 01-jan-01
karl seematter, 01-jan-2001


والحل
What we recommand here for simplicity is to write your own "TO_DATE" function.
This function can then be called from within SQL*Loader.

Create the Table

CREATE TABLE load (
employee VARCHAR2(20),
load_date DATE
);

Create the following Package

CREATE OR REPLACE PACKAGE conv_date_pkg
AS
FUNCTION conv_date
(p_string IN VARCHAR2)
RETURN DATE;
END;
/

CREATE OR REPLACE PACKAGE BODY conv_date_pkg
AS
TYPE fmtArray IS TABLE OF VARCHAR2(30);

g_fmts fmtArray := fmtArray ('dd-mm-rr',
'dd/mm/rr',
'dd.mm.rr',
'mon-dd-rr',
'dd-mon-rrrr');

FUNCTION conv_date (p_string IN VARCHAR2)
RETURN DATE
IS
RETURN_VALUE DATE;
BEGIN
FOR i IN 1 .. g_fmts.count
LOOP
BEGIN
return_value := TO_DATE(p_string,g_fmts(i));
EXIT;
EXCEPTION
WHEN OTHERS THEN NULL;
END;
END LOOP;

IF (return_value IS NULL) THEN
RAISE PROGRAM_ERROR;
END IF;
RETURN return_value;
END;
END;
/

Create the SQL*Loader Controlfile: load.ctl

LOAD DATA
INFILE *
INTO TABLE load
FIELDS TERMINATED BY ","
(employee,
load_date "conv_date_pkg.conv_date(:load_date)"
)
BEGINDATA
roland egli, 01-11-00
martin zahn, 03/05/01
christoph gächter, 03.05.03
eric dubuis, jan-01-01
christoph zenger, 01-jan-01
karl seematter, 01-jan-2001

Start SQL*Loader

sqlldr userid=scott/tiger@ARK2 control=load.ctl

SQL*Loader: Release 9.2.0.3.0 - Production
Copyright © 1982, 2002, Oracle Corporation.
Commit point reached - logical record count 6

Check the Result

select employee, to_char(LOAD_DATE,'DD.MM.YYYY')
FROM load;

EMPLOYEE TO_CHAR(LO
-------------------- ----------
roland egli 01.11.2000
martin zahn 03.05.2001
christoph gächter 03.05.2003
eric dubuis 01.01.2001
christoph zenger 01.01.2001
karl seematter 01.01.2001

6 rows selected

أرجوا أن تكون مفيده

رابط هذا التعليق
شارك

س : كيف يمكنني معرفة ال synonyms الغير فعاله

ج : كانك نريد سكريبت لايجاد ال invalid synonyms

نعم يمكنك استخدام التاليه

select *  
from dba_synonyms s  
where table_owner not in ('SYS', 'SYSTEM')
and db_link is NULL  
and table_name not in 
   (select object_name
   from dba_objects o
   where o.object_name = s.table_name
   and o.owner = s.table_owner
   and o.object_type not like '%SYNONYM%')
order by owner asc;


رابط هذا التعليق
شارك

س : كيف يمكنني تشغيل ال flash back?

ج : How to enable flashback database in Oracle

-- Set flashback database parameters
alter system set db_recovery_file_dest_size=10G;
alter system set db_recovery_file_dest='/dir/fra';

-- value in minutes
alter system set db_flashback_retention_target=2160;

-- Turn flashback on for the database
startup mount;
alter database flashback on;
alter database open;

-- Check if flashback is enabled
select flashback_on from v$database;

select * from v$flashback_database_log;

--
--
-- To create a guaranteed restore point

create restore point RESTORE_POINT guarantee flashback database;

select NAME, SCN, TIME from V$RESTORE_POINT;


-- To flashback the database to specific time
flashback database to timestamp to_timestamp('dd/mm/ccyy HH24:MI:SS', 'DD/MM/YYYY
HH24:MI:SS');

-- To drop a restore point
select NAME, SCN, TIME from V$RESTORE_POINT;

drop restore point RESTORE_POINT;



رابط هذا التعليق
شارك

س : كيف يمكنني ايقاف Oracle Session من نظام تشغيل يونكس
ج:
Killing Oracle sessions from OS level

When shutdown immediate does not work this command may help (replace DBNAME with ORACLE_SID of
database you are trying to shutdown):


kill -9 `ps -ef | grep DBNAME | grep 'LOCAL=' | awk '{printf("%s ", $2);}'`

رابط هذا التعليق
شارك

لو سمحت اخي العزيز انا اعمل على oracle 10g اذا اردت ان انزل برنامج على اكثر من جهاز متصليين بشبكة WIRELESS فقد قمت باختيار احدهم لوضعه كسيرفر وقمت بانزال ال DB AND DEVELOPER عليه بالنسبة لباقي الاجهزة ( clients ) ماذا احتاج بالظبط ان انزل عليهم


رايت حلول منها انزال FORMS DEVELOPER ومن ثم تغيير ملف TSNAMES (بمعنى تغير ال HOST)

رايت حل اخر يقول لا تحتاج غير JINITIATOR

رايت حل يقول APP SERVER ولكن لم يتم التوضيح


ارجو ان تعطيني الحل الاخير والمفيد لهذه المشكلة وشكرا

رابط هذا التعليق
شارك

أخي الفاضل

السلام عليكم ورحمة الله وبركاته

بعد عمل db server يجب أولا أن تعمل الشبكة بين الاجهزة جميعها علي الشبكة بشكل جيد كعمل ping ويردو جميعا بدون مشاكل


نأتي للمرحلة الثانية

اذا كان التطبيق علي 6i يجب انزال ال forms and reports 6i علي ال clients وتهيئة ال TNS names الخاصة بهذه ال clients وفقا لما هو موجود في DB server

واذا كنت تعمل علي App server 10g فما عليك الا تشغيل رابط ال app server علي clients

أول مره سيقوم بانزال ال jinit كما تفضلت ومن ثم سيتم العمل باذن الله

لمعرفة كيفيه التعامل مع ايا من المذكور يرجي البحث عنها في المنتدي حيث أن الخطوات مشروحة في أكثر من مكان حيث أن منتدي قواعد البيانات لم يختص بعمل هذه الاعدادات


تمنياتنا لكم بدوام التوفيق

رابط هذا التعليق
شارك

الله يعطيك العافية على الرد اخي .. ولكني انا لا استخدم App server 10g بل فقط DB 10g and forms 10g على الــ DB server

فهل هناك فرق حيث اني لا اعلم كيفية انزال ال app server وشكرا

رابط هذا التعليق
شارك

لتشغيل ال froms 10g في البيئة العملية لا بد من عمل application server ووضع ال froms والتقارير عليه
يمكن مراجعة منتدي الشاشات ومواضيع عن Application server ,اهميته


موفق

رابط هذا التعليق
شارك

س : هل يمكن استراجع TABLESPACE المحذوفه؟

الاجابه

Recovery of a dropped tablespace

To recover from a case of a dropped tablespace, the Tablespace Point In Time Recovery (TSPITR) method cannot be used.

When you drop a tablespace, the controlfile will then no longer have any records of the tablespace which has been dropped. Attempts to use the RMAN RECOVER TABLESPACE command will return the RMAN error RMAN-06019 – “could not translate tablespace name” as shown below.

SQL> drop tablespace rman10 including contents and datafiles;

Tablespace dropped.

testdb:/u01/oracle/diag/rdbms/apex/apex/trace> rman target /

Recovery Manager: Release 10.2.0.4.0 - Production on Mon Aug 3 11:53:58 2009

Copyright © 1982, 2007, Oracle. All rights reserved.

connected to target database: TESTDB (DBID=2469552796)

RMAN> restore tablespace rman10;

Starting restore at 03-AUG-09
using target database control file instead of recovery catalog
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: sid=141 devtype=SBT_TAPE
channel ORA_SBT_TAPE_1: Data Protection for Oracle: version 5.5.1.0
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=140 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/03/2009 11:54:11
RMAN-20202: tablespace not found in the recovery catalog

So to recover from a dropped tablespace, we have two options:

1) Do a point in time recovery of the whole database until the time the tablespace was dropped.
2) Create a clone of the database from a valid backup, export the required tables from the tablespace which has been dropped, recreate the tablespace and then import the tables from the clone.

The first option will require an outage of the entire database and the entire database will be rolled back in tine in order to recover the tablespace. The second option can be peformed online, but we will need to factor in the disk space requirements to create a clone of the database from which the tablespace has been dropped.

Let us examine the first option using the example shown below:

In this example, CONTROLFILE AUTOBACKUP has been turned on and Flashback has been enabled for the database.
With Flashback enabled, the db_recovery_file_dest will have a sub-directory ‘autobackup’ as shown below for each day

ttestdb:/u02/oradata/testdb/TESTDB/autobackup/2009_08_03> ls -lrt
total 63040
-rw-r----- 1 oracle dba 6455296 Aug 3 10:22 o1_mf_s_693915680_57dlgcqh_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 11:49 o1_mf_s_693920955_57dqkw0j_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 13:28 o1_mf_s_693926889_57dxcbdx_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 14:18 o1_mf_s_693928526_57f094n9_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 14:20 o1_mf_s_693930026_57f0fbo2_.bkp

When we drop the tablespace we are changing the structure of the database and since controlfile autobackup has been turned on, we see another backup file has been created in the autobackup location in the flash recovery area on disk.

SQL> drop tablespace arul including contents and datafiles;

Tablespace dropped.

SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
testdb:/u02/oradata/testdb/TESTDB/autobackup/2009_08_03> ls -lrt
total 75648
-rw-r----- 1 oracle dba 6455296 Aug 3 10:22 o1_mf_s_693915680_57dlgcqh_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 11:49 o1_mf_s_693920955_57dqkw0j_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 13:28 o1_mf_s_693926889_57dxcbdx_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 14:18 o1_mf_s_693928526_57f094n9_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 14:20 o1_mf_s_693930026_57f0fbo2_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 14:38 o1_mf_s_693931114_57f1hbmo_.bkp

We then shutdown the database, startup in nomount mode and attempt to restore the controlfile from autobackup.

The most recent controlfile autobackup has been restored, but since this has been taken after the tablespace was dropped, the tablespace which has been dropped (ARUL) is not referenced in the control file that we just restored. If we try to restore and recover the database, the dropped tablespace will not be restored.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 264241152 bytes
Fixed Size 2083304 bytes
Variable Size 142607896 bytes
Database Buffers 113246208 bytes
Redo Buffers 6303744 bytes

RMAN> restore controlfile from autobackup;

Starting restore at 03-AUG-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK

recovery area destination: /u02/oradata/testdb/
database name (or database unique name) used for search: TESTDB
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /u02/oradata/testdb/TESTDB/autobackup/2009_08_03/o1_mf_s_693931114_57f1hbmo_.bkp
channel ORA_DISK_1: control file restore from autobackup complete
output filename=/u02/oradata/testdb/control01.ctl
output filename=/u02/oradata/testdb/control02.ctl
output filename=/u02/oradata/testdb/control03.ctl
Finished restore at 03-AUG-09

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> report schema;
...

List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 1230 SYSTEM *** /u02/oradata/testdb/system01.dbf
2 1700 UNDOTBS1 *** /u02/oradata/testdb/undotbs01.dbf
3 370 SYSAUX *** /u02/oradata/testdb/sysaux01.dbf
4 280 USERS *** /u02/oradata/backup/bkp.04klgv2b
5 131 EXAMPLE *** /u02/oradata/testdb/example01.dbf
6 150 USERS *** /u02/oradata/backup/bkp.06klgv3k
9 100 USERS *** /u02/oradata/backup/bkp.08klgv4i


We will need to restore a backup of the controlfile which contains records for the tablespace ARUL. We use the RESTORE CONTROLFILE FROM command to restore a specific controlfile autobackup.

RMAN> restore controlfile from '/u02/oradata/testdb/TESTDB/autobackup/2009_08_03/o1_mf_s_693930026_57f0fbo2_.bkp';

Starting restore at 03-AUG-09
using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/u02/oradata/testdb/control01.ctl
output filename=/u02/oradata/testdb/control02.ctl
output filename=/u02/oradata/testdb/control03.ctl
Finished restore at 03-AUG-09

RMAN> report schema;
.....

List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 1230 SYSTEM *** /u02/oradata/testdb/system01.dbf
2 1700 UNDOTBS1 *** /u02/oradata/testdb/undotbs01.dbf
3 370 SYSAUX *** /u02/oradata/testdb/sysaux01.dbf
4 280 USERS *** /u02/oradata/backup/bkp.04klgv2b
5 131 EXAMPLE *** /u02/oradata/testdb/example01.dbf
6 150 USERS *** /u02/oradata/backup/bkp.06klgv3k
7 0 ARUL *** /u02/oradata/testdb/arul01.dbf
9 100 USERS *** /u02/oradata/backup/bkp.08klgv4i


The alert log will also show the time when the tablespace was dropped. We can also see that a controlfile autobackup has taken place after the tablespace was dropped.

drop tablespace arul including contents and datafiles
Mon Aug 3 14:38:34 2009
Deleted file /u02/oradata/testdb/arul01.dbf
Starting control autobackup
Control autobackup written to DISK device
handle '/u02/oradata/testdb/TESTDB/autobackup/2009_08_03/o1_mf_s_693931114_57f1hbmo_.bkp'
Completed: drop tablespace arul including contents and datafiles


Now that we know the time the tablespace was dropped, we can do a point in time recovery of the DATABASE in order to recover the tablespace which has been dropped.

RMAN> run {
2> set until time "to_date('03-AUG-2009 14:38:00','DD-MON-YYYY HH24:Mi:SS')";
3> restore database;
4> recover database;
5> }

executing command: SET until clause
using target database control file instead of recovery catalog

Starting restore at 03-AUG-09
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: sid=159 devtype=SBT_TAPE
channel ORA_SBT_TAPE_1: Data Protection for Oracle: version 5.5.1.0
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK

channel ORA_DISK_1: restoring datafile 00004
input datafile copy recid=14 stamp=693929215 filename=/u02/oradata/testdb/users01.dbf
destination for restore of datafile 00004: /u02/oradata/backup/bkp.04klgv2b
channel ORA_SBT_TAPE_1: starting datafile backupset restore
channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u02/oradata/testdb/system01.dbf
restoring datafile 00002 to /u02/oradata/testdb/undotbs01.dbf
restoring datafile 00003 to /u02/oradata/testdb/sysaux01.dbf
restoring datafile 00005 to /u02/oradata/testdb/example01.dbf
restoring datafile 00007 to /u02/oradata/testdb/arul01.dbf
channel ORA_SBT_TAPE_1: reading from backup piece 0gkloo6p_1_1
channel ORA_DISK_1: copied datafile copy of datafile 00004
output filename=/u02/oradata/backup/bkp.04klgv2b recid=21 stamp=693932732
channel ORA_DISK_1: restoring datafile 00006
input datafile copy recid=13 stamp=693929146 filename=/u02/oradata/testdb/users02.dbf
destination for restore of datafile 00006: /u02/oradata/backup/bkp.06klgv3k
channel ORA_DISK_1: copied datafile copy of datafile 00006
output filename=/u02/oradata/backup/bkp.06klgv3k recid=23 stamp=693932755
channel ORA_DISK_1: restoring datafile 00009
input datafile copy recid=10 stamp=693929108 filename=/u02/oradata/testdb/users03.dbf
destination for restore of datafile 00009: /u02/oradata/backup/bkp.08klgv4i
channel ORA_DISK_1: copied datafile copy of datafile 00009
output filename=/u02/oradata/backup/bkp.08klgv4i recid=26 stamp=693932809
channel ORA_SBT_TAPE_1: restored backup piece 1
piece handle=0gkloo6p_1_1 tag=TAG20090803T113241
channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:02:40
Finished restore at 03-AUG-09

Starting recover at 03-AUG-09
using channel ORA_SBT_TAPE_1
using channel ORA_DISK_1

starting media recovery

archive log thread 1 sequence 8 is already on disk as file /u02/oradata/testdb/arch/arch.8.1.693662800.log
archive log thread 1 sequence 9 is already on disk as file /u02/oradata/testdb/arch/arch.9.1.693662800.log
archive log thread 1 sequence 10 is already on disk as file /u02/oradata/testdb/arch/arch.10.1.693662800.log
archive log thread 1 sequence 1 is already on disk as file /u02/oradata/testdb/redo01.log
archive log thread 1 sequence 2 is already on disk as file /u02/oradata/testdb/redo02.log
archive log filename=/u02/oradata/testdb/arch/arch.8.1.693662800.log thread=1 sequence=8
archive log filename=/u02/oradata/testdb/arch/arch.9.1.693662800.log thread=1 sequence=9
archive log filename=/u02/oradata/testdb/arch/arch.10.1.693662800.log thread=1 sequence=10
archive log filename=/u02/oradata/testdb/redo01.log thread=1 sequence=1
archive log filename=/u02/oradata/testdb/redo02.log thread=1 sequence=2
media recovery complete, elapsed time: 00:00:06
Finished recover at 03-AUG-09

RMAN>

RMAN> alter database open resetlogs;

database opened

We can now see that the tablespace which has been dropped has been recovered

SQL> select file_name,bytes from dba_data_files where
2 tablespace_name='ARUL';

FILE_NAME
--------------------------------------------------------------------------------
BYTES
----------
/u02/oradata/testdb/arul01.dbf
37748736

رابط هذا التعليق
شارك

  • بعد 3 أسابيع...

ماذا عن ال session

كيف يمكن معرفة المستخدمين المتصلين حاليا

select username
, sid || ',' || serial# "ID"
, status
, last_call_et "Last Activity"
from v$session
where username is not null
order by status desc
, last_call_et desc
/




ومنذ كم هو متصل ؟

select username
, floor(last_call_et / 60) "Minutes"
, status
from v$session
where username is not null
order by last_call_et
/



ولو أردنا ترتيب ال sessions حسب وقت الدخول

set lines 100 pages 999
col ID		format a15
col osuser	format a15
col login_time	format a14
select 	username
,	osuser
,	sid || ',' || serial# "ID"
,	status
,	to_char(logon_time, 'hh24:mi dd/mm/yy') login_time
,	last_call_et
from	v$session
where	username is not null
order	by login_time
/



ولمعلومات أكثر

col "SID/SERIAL" format a10
col username format a15
col osuser format a15
col program format a40
select	s.sid || ',' || s.serial# "SID/SERIAL"
,	s.username
,	s.osuser
,	p.spid "OS PID"
,	s.program
from	v$session s
,	v$process p
Where	s.paddr = p.addr
order 	by to_number(p.spid)
/


ولمعرفة ال sql statements الحالي عملها

Select sql_text
from v$sqlarea
where (address, hash_value) in
(select sql_address, sql_hash_value
from v$session)
/



وماذا نفعل لعرض العمليات المستغرقه وقت طويل

Display any long operations
set lines 100 pages 999
col username format a15
col message format a40
col remaining format 9999
select	username
,	to_char(start_time, 'hh24:mi:ss dd/mm/yy') started
,	time_remaining remaining
,	message
from	v$session_longops
where	time_remaining = 0
order by time_remaining desc
/




طيب سمعت أنه ك performance wise يجب معرفة ال كورسور المفتوحين فهل من طريقه حياك الله؟

نعم

set pages 999
select 	sess.username
,	sess.sid
,	sess.serial#
,	stat.value cursors
from	v$sesstat stat
,	v$statname sn
,	v$session sess
where	sess.username is not null
and	sess.sid = stat.sid
and	stat.statistic# = sn.statistic#
and	sn.name = 'opened cursors current'
order by value
/


أو

set lines 100 pages 999
select count(hash_value) cursors
, sid
, user_name
from v$open_cursor
group by 
sid
, user_name
order by 
cursors
/


تحياتي

رابط هذا التعليق
شارك

  • بعد 1 شهر...

السلام عليكم

شكراً لك يا احمد على مجهود الطيب

لدي سؤال ..

هل لكل يوزر انشأه في الداتا بيز انشئ له تابل سبيس مخصص له ؟

بمعنى لو انشأت عشرين حساب هل أنشئ عشرين تابل سبيس ايضاً ؟

رابط هذا التعليق
شارك

أخي الكريم بالفعل هذا هو المستحسن أن يكون لكل مستخدم Tablespace خاصه به

أشكرك

رابط هذا التعليق
شارك

  • بعد 4 أسابيع...

السلام عليكم و رحمة الله
لدي مشكله على الداتا بيز

انظمه مشبوكة مع داتا بيز بتكون شابك على النظام و فجاه بتطلع شاشه يوز نيم و الباسورد و السيرفس يعني كانه السيشين بتفصل هلا ممكن يكون في لود على الداتا بيز

و مو عارفه شو حل المشكله مع العلم انه سيرفر الداتا بيز لينكس ريد هات

رابط هذا التعليق
شارك

وعليكم السلام ورحمة الله وبركاته

نعم بسبب فتح المستخدمين ل Sessions ولم يتبقي أي Resources ل new sessions لذلك يتم عمل ما وصفتيه

فضلا قومي بقراءة ردي في هذا الموضوع ليتبين أن خادم قواعد البيانات لديك هو Dedicated Server

http://araboug.org/ib/index.php?showtopic=44373

تحياتي

رابط هذا التعليق
شارك

س : ما الفرق المختصر بين oracle DBA و oracle application DBA ???

ج : الاول يهتم بقاعدة البيانات نفسها اما الثاني فيجب أن يكون ال database housing ل Oracle Apps محل عنايته وأن يكون قادر علي الربط السليم بين قاعدة البيانات و Oracle Apps يعني بلغة أخري أن يكون قادر علي عمل
map the front end of Oracle Apps to the Backend tables
وكذلك عمل بعض من system administration work وكذلك معرفة Concurrent Manager


ما هي الادوات التي يمكن أن تستخدمها ك Apps DBA...?

ج Sql Navigator وكذلك Toad

رابط هذا التعليق
شارك

  • بعد 1 شهر...

الاخ احمد لم ترد على موضوعي

أريد أن اثبت قاعدة البيانات والابلكيشن سيرفر لعمل برنامج في الشبكة يستخدمه 15 شخص ومكون من 6 شاشات

ما مواصفات السيرفر القادرة على تشغيل قاعدة البيانات والابلكيشن سيرفر بكل كفاءة

ايضاً اتمنى تعطيني نصائح أثناء التثبيت والنسخ الاحتياطي

بارك الله فيك ونفع بك الأمة الإسلامية

تم تعديل بواسطة honr
رابط هذا التعليق
شارك

أخي الفاضل

السلام عليكم ورحمة الله وبركاته

15 Client مع 6 شاشات هو حد أدني

يعني أقل موصفات ممكنة تكون جيدة لتحقيق نفع برنامجك

ببساطة ممكن لو قدرت تجيب Healthy PC or small server ويمكنك وضع قاعدة البيانات و AS عليه لان البرنامج صغير

2GHZ CPU
2 GB RAM ويفضل لو زادت
80GB HDD or more

يمكنك انزال قاعدة البيانات و AS SErver عليه

لو فيه ميزانية أعلي يمكنك ويفضل عمل Server AS AS (App Server)

بالنسبة لقاعدة البيانات ممكن تجعل نظام التشغيل Linux وتضع عليه قاعدة البيانات

بالنسبة ل Backup خذ Exp يومي

يمكنك عمل Script For Daily back up تجدها بالبحث بسهولة

تحياتي

رابط هذا التعليق
شارك

يعطيك العافية مهندس أحمد

كما عهدناك سباقاً لخدمة اخوانك المسلمين

تبقى لي كم سؤال ..

بالنسبة للسكيما .. هل اعمل سكيما واحده فقط وانشى يوزرات في البرنامج ..

أم أعمل لكل يوزر سكيما وتايلبسبيس خاصة به ؟

عند انشاء سكيما لليوزرات هل يثقل من عمل قاعدة البيانات ؟

حيث أريد أن اكتسب خبرة في ادراة القواعد البيانات فما الأفضل في التطبيق ؟


وهل أفضل اجعل قاعدة البيانات shared server أو dedicated ؟

وجزاك الله خيراً يا مهندس أحمد

رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية