Você está na página 1de 3

This Download is from www.downloadmela.com .

The main motto of this website is to provide free download links of ebooks,video tutorials,magazines,previous papers,interview related content. To download more visit the website. If you like our services please help us in 2 ways. 1.Donate money. lease go through the link to donate http!""www.downloadmela.com"donate.html 2.Tell about this website to your friends,relatives.
Thanks for downloading. Enjoy the reading.

1. #ow can variables be passed to a $%& routine' &evel! &ow ()pected answer! *y use of the + symbol. ,or passing in variables the numbers 1-. can be used /+1, +2,...,+.0 to pass the values after the command into the $%& &1$ session. To be prompted for a specific variable, place the ampersanded variable in the code itself! 2select 3 from dba4tables where owner5+owner4name62 . 1se of double ampersands tells $%& &1$ to resubstitute the value for each subse7uent use of the variable, a single ampersand will cause a reprompt for the value unless an 899( T statement is used to get the value from the user. 2. :ou want to include a carriage return"linefeed in your output from a $%& script, how can you do this' &evel! Intermediate to high ()pected answer! The best method is to use the 9#;/0 function /9#;/1<0 is a return"linefeed0 and the concatenation function 2==2. 8nother method, although it is hard to document and isn't always portable is to use the return"linefeed as a part of a 7uoted string. >. #ow can you call a &"$%& procedure from $%&' &evel! Intermediate ()pected answer! *y use of the (?(91T( /short form (?(90 command. @. #ow do you e)ecute a host operating system command from within $%&' &evel! &ow ()pected answer! *y use of the e)clamation point 2A2 /in 1BI? and some other C$0 or the #C$T /#C0 command.

Disit

http!""www.downloadmela.com"

for more papers

E. :ou want to use $%& to build $%&, what is this called and give an e)ample &evel! Intermediate to high ()pected answer! This is called dynamic $%&. 8n e)ample would be! set lines F< pages < termout off feedback off verify off spool drop4all.s7l select 'drop user '==username==' cascade6' from dba4users where username not in /G$:$G,G$:$T(HG06 spool off (ssentially you are looking to see that they know to include a command /in this case D;C 1$(;...98$98D(60 and that you need to concatenate using the '==' the values selected from the database. 8lternately, if you are using &"$%&, you can do ls4s7l4string !5 G9;(8T( T8*&( ,;(D 8$ $(&(9T $:$D8T( 84D8T( ,;CH D18&G6 (?(91T( IHH(DI8T( ls4s7l4string6 I. Jhat $%& lus command is used to format output from a select' &evel! low ()pected answer! This is best done with the 9C&1HB command. K. :ou want to group the following set of select returns, what can you group on' Ha)/sum4of4cost0, min/sum4of4cost0, count/item4no0, item4no &evel! Intermediate ()pected answer! The only column that can be grouped on is the 2item4no2 column, the rest have aggregate functions associated with them. .. Jhat special Cracle feature allows you to specify how the cost based system treats a $%& statement' &evel! Intermediate to high ()pected answer! The 9C$T based system allows the use of #IBTs to control the optimizer path selection. If they can give some e)ample hints such as ,I;$T ;CJ$, 8&& ;CJ$, 1$IBL IBD(?, $T8;, even better. F. :ou want to determine the location of identical rows in a table before attempting to place a uni7ue inde) on the table, how can this be done' &evel! #igh ()pected answer! Cracle tables always have one guaranteed uni7ue column, the rowid column. If you use a min"ma) function against your rowid and then select against the proposed primary key you can s7ueeze out the rowids of the duplicate rows pretty 7uick. ,or e)ample! select rowid from emp e where e.rowid M /select min/).rowid0 from emp ) where ).emp4no 5 e.emp4no06 In the situation where multiple columns make up the proposed key, they must all be used in the where clause. 1<. Jhat is a 9artesian product' &evel! &ow ()pected answer! 8 9artesian product is the result of an unrestricted Noin of two or more tables. The result set of a three table 9artesian product will have ) 3 y 3 z number of rows where ), y, z correspond to the number of rows in each table involved in the Noin. 11. :ou are Noining a local and a remote table, the network manager complains about the traffic involved, how can you reduce the network traffic' &evel! #igh ()pected answer! ush the processing of the remote data to the remote instance by using a view to pre-

Disit

http!""www.downloadmela.com"

for more papers

select the information for the Noin. This will result in only the data re7uired for the Noin being sent across. 12. Jhat is the default ordering of an C;D(; *: clause in a $(&(9T statement' &evel! &ow ()pected answer! 8scending 1>. Jhat is tkprof and how is it used' &evel! Intermediate to high ()pected answer! The tkprof tool is a tuning tool used to determine cpu and e)ecution times for $%& statements. :ou use it by first setting timed4statistics to true in the initialization file and then turning on tracing for either the entire database via the s7l4trace parameter or for the session using the 8&T(; $($$ICB command. Cnce the trace file is generated you run the tkprof tool against the trace file and then look at the output from the tkprof tool. This can also be used to generate e)plain plan output. 1@. Jhat is e)plain plan and how is it used' &evel! Intermediate to high ()pected answer! The (? &8IB &8B command is a tool to tune $%& statements. To use it you must have an e)plain4table generated in the user you are running the e)plain plan for. This is created using the utl)plan.s7l script. Cnce the e)plain plan table e)ists you run the e)plain plan command giving as its argument the $%& statement to be e)plained. The e)plain4plan table is then 7ueried to see the e)ecution plan of the statement. ()plain plans can also be run using tkprof. 1E. #ow do you set the number of lines on a page of output' The width' &evel! &ow ()pected answer! The $(T command in $%& &1$ is used to control the number of lines generated per page and the width of those lines, for e)ample $(T 8L($IO( I< &IB($IO( .< will generate reports that are I< lines long with a line width of .< characters. The 8L($IO( and &IB($IO( options can be shortened to 8L($ and &IB($. 1I. #ow do you prevent output from coming to the screen' &evel! &ow ()pected answer! The $(T option T(;HC1T controls output to the screen. $etting T(;HC1T C,, turns off screen output. This option can be shortened to T(;H. 1K. #ow do you prevent Cracle from giving you informational messages during and after a $%& statement e)ecution' &evel! &ow ()pected answer! The $(T options ,((D*89P and D(;I,: can be set to C,,. 1.. #ow do you generate file output from $%&' &evel! &ow ()pected answer! *y use of the $ CC& command

Disit

http!""www.downloadmela.com"

for more papers

Você também pode gostar