Jump to content

Oracle Dba Discussion Board


Recommended Posts

Posted

so many ways to get DDL.....from sql and from using external tools

Posted

[quote name='STFU' timestamp='1366752078' post='1303652585']

DDL ki datapump enduku bhayya sql lo kuda cheyachu



[background=transparent]sqlplus[/background][background=transparent]<<[/background][background=transparent]EOF[/background]
[color=#00008B][background=transparent]set[/background][/color][background=transparent] long [/background][color=#800000][background=transparent]100000[/background][/color]
[color=#00008B][background=transparent]set[/background][/color][background=transparent] head [/background][color=#00008B][background=transparent]off[/background][/color]
[color=#00008B][background=transparent]set[/background][/color][background=transparent] echo [/background][color=#00008B][background=transparent]off[/background][/color]
[color=#00008B][background=transparent]set[/background][/color][background=transparent] pagesize [/background][color=#800000][background=transparent]0[/background][/color]
[color=#00008B][background=transparent]set[/background][/color][background=transparent] verify [/background][color=#00008B][background=transparent]off[/background][/color]
[color=#00008B][background=transparent]set[/background][/color][background=transparent] feedback [/background][color=#00008B][background=transparent]off[/background][/color]
[background=transparent]spool [/background][color=#00008B][background=transparent]schema[/background][/color][background=transparent].[/background][background=transparent]out[/background]

[color=#00008B][background=transparent]SELECT[/background][/color][background=transparent] DBMS_METADATA[/background][background=transparent].[/background][background=transparent]GET_DDL[/background][background=transparent]([/background][background=transparent]object_type[/background][background=transparent],[/background][background=transparent] object_name[/background][background=transparent],[/background][background=transparent] owner[/background][background=transparent])[/background]
[background=transparent] [/background][color=#00008B][background=transparent]FROM[/background][/color][background=transparent] all_OBJECTS
[/background][color=#00008B][background=transparent]WHERE[/background][/color][background=transparent] [/background][background=transparent]([/background][background=transparent]OWNER [/background][background=transparent]=[/background][background=transparent] [/background][color=#800000][background=transparent]'OWNER1'[/background][/color][background=transparent]);[/background]

[background=transparent]spool [/background][color=#00008B][background=transparent]off[/background][/color]
[background=transparent]quit
EOF

cat [/background][color=#00008B][background=transparent]schema[/background][/color][background=transparent].[/background][background=transparent]out[/background][background=transparent]|[/background][background=transparent]sed [/background][color=#800000][background=transparent]'s/OWNER1/MYOWNER/g'[/background][/color][background=transparent]>[/background][color=#00008B][background=transparent]schema[/background][/color][background=transparent].[/background][background=transparent]out[/background][background=transparent].[/background][background=transparent]change[/background][background=transparent].[/background][background=transparent]sql[/background]
[/quote]

aa spool chesedi edo direct ga *.sql ke create cheseyochu kada.. malla .out kelli and .sql ki change kayko re?

ya idi kuda chyochu..

nen mostly network link to over the network chesta, ddl extraction and empty schema creation..


ee toad to okasari try chesi chudali

Posted

[quote name='CBZ' timestamp='1366752833' post='1303652663']
aa spool chesedi edo direct ga *.sql ke create cheseyochu kada.. malla .out kelli and .sql ki change kayko re?

ya idi kuda chyochu..

[b]nen mostly network link to over the network chesta,[/b] ddl extraction and empty schema creation..


ee toad to okasari try chesi chudali
[/quote]

yeah anthe le..... bold ????

Posted

[quote name='STFU' timestamp='1366753003' post='1303652675']

yeah anthe le..... bold ????
[/quote]

export em cheyakunda, direct oka network link create chesi, import cheseyadame target meeda, ddl or emply tables/structures/schema cheyali ante, nen ide prefer chesta..tvaraga kuda aiyipotadi...



***************
Network import
***************

With network mode imports, one doesn't need any intermediate dump files (GREAT, no more FTP'ing of dump files). Data is exported across a database link and imported directly into the target database. Example:
SQL> create user new_scott identified by tiger;
User created.

SQL> grant connect, resource to new_scott;
Grant succeeded.

SQL> grant read, write on directory dmpdir to new_scott;
Grant succeeded.

SQL> grant create database link to new_scott;
Grant succeeded.
SQL> conn new_Scott/tiger
Connected.

SQL> create database link old_scott connect to scott identified by tiger using 'orcl.oracle.com';
Database link created.
impdp new_scott/tiger DIRECTORY=dmpdir NETWORK_LINK=old_scott remap_schema=scott:new_scott
All work is performed on the target system. The only reference to the source systems is via the database link.

Posted

Che, stfu, ACP:

Performance Tuning meeda oka disco kavali vayya..

mainly, or fistly, aa AWR report analyze/chudatam cheyatam cheppali vayya..

info unte share cheyurri

Posted

[quote name='CBZ' timestamp='1366753701' post='1303652708']
Che, stfu, ACP:

Performance Tuning meeda oka disco kavali vayya..

mainly, or fistly, aa AWR report analyze/chudatam cheyatam cheppali vayya..

info unte share cheyurri
[/quote]


OEM nuchi chudachu,inka server meda awr reports run cheyachu

[url="http://www.oracle.com/technetwork/database/performance/tips-perf-awr-sql-report-129542.pdf?ssSourceSiteId=otnjp"]http://www.oracle.co...rceSiteId=otnjp[/url]

Posted

[quote name='CBZ' timestamp='1366753701' post='1303652708']
Che, stfu, ACP:

Performance Tuning meeda oka disco kavali vayya..

mainly, or fistly, aa AWR report analyze/chudatam cheyatam cheppali vayya..

info unte share cheyurri
[/quote]


Q's adigey mama...evariki telisindi vallu cheptaru........

Performance tuning ante evaru full ga thopulu undaru so we can learn alot from othes and always.......e tuning oka end antu undadu and chala small things kuda telisi undali.....

so evariki thochina Q's adigeyyadame...telisinavallu answer chestaru

Posted

[quote name='CheGuevara' timestamp='1366754031' post='1303652728']


Q's adigey mama...evariki telisindi vallu cheptaru........

Performance tuning ante evaru full ga thopulu undaru so we can learn alot from othes and always.......e tuning oka end antu undadu and chala small things kuda telisi undali.....

so evariki thochina Q's adigeyyadame...telisinavallu answer chestaru
[/quote]


+1

Posted

[quote name='STFU' timestamp='1366753991' post='1303652725']
OEM nuchi chudachu,inka server meda awr reports run cheyachu

[url="http://www.oracle.com/technetwork/database/performance/tips-perf-awr-sql-report-129542.pdf?ssSourceSiteId=otnjp"]http://www.oracle.co...rceSiteId=otnjp[/url]
[/quote]

atla kaadu bhayya....

naa question.. first AWR report lo unna stats anni analyze cheyatam ravali kada.. ekkada bottleneck undo telusukotaniki..

am very very poor in perf tuning..so anduke. first awr report analyzing nundi nerchukundam ani adiga..

Posted

[quote name='CheGuevara' timestamp='1366754031' post='1303652728']


Q's adigey mama...evariki telisindi vallu cheptaru........

Performance tuning ante evaru full ga thopulu undaru so we can learn alot from othes and always.......e tuning oka end antu undadu and chala small things kuda telisi undali.....

so evariki thochina Q's adigeyyadame...telisinavallu answer chestaru
[/quote]


I agree..

first AWR reports ni meeru ela analyze chestaru...? edanna material unda, like ee particular parameter meaning enti, enta unte manchidi antaru ( benchmark anuko),

edi ekkuva aite, em cheyali ani.. ala

Posted

[color=#7A7A7A][font=Georgia, Times, serif]
OEM lo oka rendu AWR reports generate chesi daniki difference chudu kinda matter base chesuko neku koncham idea vastundi[/font][/color]
[color=#7A7A7A][font=Georgia, Times, serif]
http://savvinov.com/2012/02/22/reading-awr-reports/[/font][/color][color=#7A7A7A][font=Georgia, Times, serif]
Since this is a very popular subject on the OTN forum, I decided to put together a few points about analyzing AWR reports.[/font][/color][color=#7A7A7A][font=Georgia, Times, serif]
1[b]. Choosing time period for the AWR report[/b][/font][/color][color=#7A7A7A][font=Georgia, Times, serif]
When troubleshooting a specific problem, one should try and chose the period as [url="http://savvinov.com/2012/02/22/reading-awr-reports/#"]close[/url] to the duration of the incident as possible. Including snapshots beyond that period would dilute the symptoms of the problem. For example, if the incident occured between 5:49 pm and 7:06 pm, then it’s reasonable to pick 7 pm as the start snapshot and 8 pm as the end snapshot. Choosing 5 pm and 8 pm will result in the AWR report being diluted by 1 hour and 55 minutes of normal running.[/font][/color][color=#7A7A7A][font=Georgia, Times, serif]
If the AWR report is generated to get a general feel of the database profile, then it’s preferable to chose the period of a peak load, since potential performance bottlenecks are more likely to manifest themselves at such times. On the other hand one should avoid any untypical activity(e.g. huge reports that are only run once a year) or any maintenance (e.g. an rman [url="http://savvinov.com/2012/02/22/reading-awr-reports/#"]backup[/url]).[/font][/color][color=#7A7A7A][font=Georgia, Times, serif]
Of course, the AWR report cannot include an instance restart.[/font][/color][color=#7A7A7A][font=Georgia, Times, serif]
2. [b]Choosing a baseline report[/b][/font][/color][color=#7A7A7A][font=Georgia, Times, serif]
When using AWR report to troubleshoot a specific issue, it is a good idea to generate a second report to as a point of reference. When choosing start and end snapshots for such report, one should take into account [url="http://savvinov.com/2012/02/22/reading-awr-reports/#"]application[/url] workload periodicity. E.g. if Mondays are busier than other days of week, then an incident that occured on a Monday between 2 and 3 am should be compared to a similar period for another Monday, etc.[/font][/color][color=#7A7A7A][font=Georgia, Times, serif]

3. [b]Most informative sections of the report[/b][/font][/color][color=#7A7A7A][font=Georgia, Times, serif]
I find the following sections most useful:[/font][/color][list]
[*]summary
[*]top 5 timed events
[*]top SQL (by elapsed time, by gets, sometimes by reads)
[/list][color=#7A7A7A][font=Georgia, Times, serif]
4. [b]Things to look for[/b][/font][/color][list]
[*]general workload profile (redo per sec, transactions per sec)
[*]abnormal waits (first of all, [i]concurrency [/i]and [i]commit[/i])
[*]clear leaders in the top SQL (suggestive of plan-flip kind of a performance issue)
[/list][color=#7A7A7A][font=Georgia, Times, serif]
5. [b]Things to keep in mind when interpreting the report[/b][/font][/color][color=#7A7A7A][font=Georgia, Times, serif]
It is important not to get obsessed by the ratios in the report, especially ones that you don’t fully understand. Normally AWR doesn’t contain enough evidence to do the full analysis of a performance problem, it’s just a departing point. The next logical [url="http://savvinov.com/2012/02/22/reading-awr-reports/#"]step[/url] is to use high-resolution tools to pinpoint the root cause of the problem, such as:[/font][/color]

[color=#7A7A7A][font=Georgia, Times, serif]
http://savvinov.com/2012/02/22/reading-awr-reports/[/font][/color]

Posted

[quote name='CBZ' timestamp='1366754255' post='1303652745']
atla kaadu bhayya....

naa question.. first AWR report lo unna stats anni analyze cheyatam ravali kada.. ekkada bottleneck undo telusukotaniki..

am very very poor in perf tuning..so anduke. first awr report analyzing nundi nerchukundam ani adiga..
[/quote]


http://dbataj.blogspot.com/2007/10/awr-reportsnapshot.html

Posted

[quote name='CBZ' timestamp='1366754988' post='1303652799']
Good links stfu... Tfs
[/quote]

hands on okati awr report generate cheyi inka baga idea vastundi

Posted

[b]HTH [/b]


[b]AWR vs ADDM vs ASH[/b]

[size=5][b]AWR : automatic workload repository[/b][/size]

The AWR is used to collect performance statistics including:
Wait events used to identify performance problems.
Time model statistics indicating the amount of DB time associated with a process from the V$SESS_TIME_MODEL andV$SYS_TIME_MODEL views.
Active Session History (ASH) statistics from the V$ACTIVE_SESSION_HISTORY view.
Some system and session statistics from the V$SYSSTAT and V$SESSTAT views.
Object usage statistics.
Resource intensive SQL statements.
I will not get into Details how to generate AWR since i mention it before on my Blog .


[b][size=5]ADDM : automatic database diagnostic monitor[/size][/b]


analyzes data in the Automatic Workload Repository (AWR) to identify potential performance bottlenecks.and we use it for the following cases :

CPU bottlenecks
Undersized memory structures
I/O capacity issues
High load SQL statements
RAC specific issues
Database configuration issues
Also provides recommendations on hardware changes, database configuration & schema changes.
Generate ADDM :
Login to SQL
@$ORACLE_HOME/rdbms/admin/addmrpt.sql
enter system password when you asked for .
Specify a begin_snap from the list and press Enter.
Specify the end_snap from the list and press Enter.
Report Name
[b][size=5]ASH : Active Session History [/size][/b]

statistics from the in-memory performance monitoring tables also used to track session activity and simplify performance tuning.

ASH reports Give the following information :

Top User Events (frequent wait events)
Details to the wait events
Top Queries
Top Sessions
Top Blocking Sessions
Top DB Object.
Activity Over Time
Generate ASH reports :

[size=5][b]The Best way to do that using OEM. (Enterprise manager).[/b][/size]







[url="http://community.xmatters.com/docs/DOC-2264#.UXcIfRfkuys"]http://community.xma...64#.UXcIfRfkuys[/url]


[b] ASH Report[/b]

[font=MyriadPro-Regular,]In Oracle, ASH stands for [i]Active Session History[/i]. An ASH report details statistics from the in-memory[url="http://community.xmatters.com/docs/DOC-2264#"]performance monitoring[/url] tables. The report provides:[/font][list]
[*]Top User Events (frequent wait events)
[*]Details to the wait events
[*]Top Queries
[*]Top Sessions
[*]Top Blocking Sessions
[*]Top DB Objects (Note: be wary of the QRTZ_LOCKS result. This table is what Quartz, our third-party Java scheduler, uses as a locking mechanism. As a result, any contention is intentional and will not affect performance).
[*]Activity Over Time
[/list]

×
×
  • Create New...