UC560 T1E1 with Direct TCP SIP
Hi,
Firstly I am new to cisco's voice setup, and have a UC560-T1E1-K9 which I need to configure as just a basic gateway. Essentially i want to setup trunk-to-trunk between ISDN PRI and TCP SIP but do not have the first idea where to start.
The main aim is to receive calls over ISDN PRI (E1 NET5) and pass the call stright through to a direct tcp sip trunk (incoming only).
Then configure FXS for a few numbers for two way calling.
Hope someone can give me a couple of pointers as the CUE is not very helpful
Thanks,
Alex.
Hi,
You have two approaches.
Option A
Use CCA to configure the unit from scratch. Configure the unit for your ISDN connection and test using the fxs ports. Manually configure a SIP dial-peer to route inbound PSTN calls to your Lync server. You'll need to tweak the configuration at various places to make it work. You therefore need to be pretty confident in understanding all the work CCA has done for you. The benefit this, is you have a local outbound dial-plan pre-configured on the unit.
Option B
Configure the unit yourself from scratch. Rough outline:
1. Configure E1 controller for voice
2. Setup the DSP modules for your region
3. configure a pots inbound dial peer to accept calls from the PSTN
4. configure an outbound SIP dial-peer to send the calls to Lync.
Lync expects calls to be prefixed with a + & E.164 and bare in mind the telco may only send you the last 6 sigits of the called number
Here's an example for UK ISDN with 30 timeslots: note module slots will be incorrect in this code, example is generic IOS and not specific to UC560.
1. Configure E1 controller for voice
card type e1 0
network-clock-participate wic 0 ! something like this, you may need to work out which slot you have
network-clock-participate slot 1 ! or something like this
network-clock-select 5 E1 1/0 ! you get the idea....
controller E1 1/0
pri-group timeslots 1-31
interface Serial1/0:15 ! do a show run to check the right interface slot number
description "use dial-peer voice 10 to reach me for outbound"
no ip address
encapsulation hdlc
isdn switch-type primary-net5
isdn timer T309 400000
isdn incoming-voice modem
isdn T309-enable
isdn send-alerting
isdn sending-complete
no cdp enable
Your E1 card should now be up
c2821.1.hex#show controllers e1
E1 1/0 is up.
Applique type is Channelized E1 - balanced
Cablelength is Unknown
No alarms detected.
alarm-trigger is not set
Version info Firmware: 20090408, FPGA: 13, spm_count = 0
Framing is NO-CRC4, Line Code is HDB3, Clock Source is Line.
CRC Threshold is 320. Reported from firmware is 320.
Data in current interval (652 seconds elapsed):
0 Line Code Violations, 0 Path Code Violations
0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
Total Data (last 24 hours)
0 Line Code Violations, 0 Path Code Violations,
0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
2. Setup the DSP modules for your region
voice-port 1/0:15
cptone GB
bearer-cap Speech
3. configure a pots inbound dial peer to accept calls from the PSTN
I suggest at this point, you debug isdn q931 and dial in. See how many digits the telco sends you.
Configure a number translation to put this number in to E.164
In my example we take the 6 digits the telco sends us and prepend 441234
voice translation-rule 10
rule 1 /^\(.+\)$/ /441234\1/
voice translation-profile incomingisdn
translate called 10
in exec mode:
SOV_TAG1#test voice translation-rule 10 567890
Matched with rule 1
Original number: 567890 Translated number: 441234567890
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
dial-peer voice 1000 pots
description Inbound POTS dial-peer
translation-profile incoming incomingisdn
incoming called-number .+
direct-inward-dial
port 1/0:15
4. configure an outbound SIP dial-peer to send the calls to Lync. Lync expects calls to be prefixed with a + & E.164 so we're going to add a plus
voice class codec 1
codec preference 1 g711alaw
codec preference 2 g711ulaw
codec preference 3 g729r8
codec preference 4 g729br8
voice translation-rule 20
rule 1 /\(.+\)/ /+\1/
voice translation-profile addaplus
translate called 20
in exec mode
#test voice translation-rule 20 123
Matched with rule 1
Original number: 123 Translated number: +123
dial-peer voice 1010 voip
description SIP Trunk to Lync
translation-profile outgoing addaplus
preference 5
destination-pattern ^441234.+ ! note this is the area code we added to make the number into E164
voice-class codec 1
voice-class sip outbound-proxy ipv4:192.168.10.10 ! ip address of lync
session target dns:lync.mydomain.net ! your lync realm
session protocol sipv2
session transport tcp
dtmf-relay rtp-nte
no vad
and that's about it apart from getting the fx0 ports sorted - one step at a time.
For outbound you added an incoming SIP dial-peer and an outgoing pots dial peer.
Adam
VoIP.co.uk
Similar Messages
-
Redundant power with UC560-T1E1-K9
Good morning,
Is there any way of having redundant power with UC560-T1E1-K9 (redundant internal power, RPS, UPS, etc..)?
Thank you very much
Best Regards
João MendesHello,
In order to use Meet-Me conferencing, you have two options.
1. Conferences have to be "initiated" by an internal phone.
a) To initiate conference, pickup an internal phone handset, hit "more" button on phone menu, hit "MeetMe" option. Then dial meet-me extension (770). Now that the conference has been initiated, other phones can just dial the 770 extension to join the conference.
2. Select "Enable Meet-me Unlocked" on the CCA page for the conference configuration.
a) To initiate a conference, just dial the conference extension (770). Users can join by dialing 770 also.
Thank you,
Darren -
Video only enabled when call is initiated from one direction across SIP Trunk
wonder If anyone can shed some light on this.
I have an issue between two cucm clusters, tied together with a SIP trunk.
If we dial from Australia to the US there is two way video and audio. If the US calls Australia, there is only audio. I have run a test call from the US through VLT and have found the following SDP's (see below). When The US make a video enabled call to australia the message "Video is not available, Remote party has video off" on the US phone screen.
Both clusters have the SIP trunk set up with the same codec settings and video bandwidth between reqions and locations. the SIP trunk is configured pretty much stock standard and identical at both ends, yet the SDP seem to want to negotiate different Video Parameters (again see SDP's below). CUCM in australia is 10.61.2.82.
what other settings can I check to get video to work when calls get initiated from either direction,...................
both phones are SIP 8941's, again audio is no problem in both directions.
=======this is from the phone in Australia to the CUCM in australia phone IP 10.61.4.112======================================
45870304.002 |09:02:07.941 |AppInfo |SIPTcp - wait_SdlReadRsp: Incoming SIP TCP message from 10.61.4.112 on port 34271 index 53563 with 2089 bytes:
[344530309,NET]
SIP/2.0 200 OK
Via: SIP/2.0/TCP 10.61.2.82:5060;branch=z9hG4bKe0103892bbb75
From: "Anonymous" <sip:[email protected]>;tag=109791678~1b5af941-cea2-4a00-a0bd-15a532224d7d-59374526
To: <sip:[email protected]>;tag=5057a887bfdd550c0d321a20-7f843426
Call-ID: [email protected]
Date: Wed, 29 Apr 2015 23:02:07 GMT
CSeq: 101 INVITE
Server: Cisco-CP8941/9.4.2
Contact: <sip:[email protected]:34271;transport=tcp>;video
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE,INFO
Remote-Party-ID: "Dennis Mink - 33935" <sip:[email protected]>;party=called;id-type=subscriber;privacy=off;screen=yes
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-7.0.0,X-cisco-xsi-8.5.1
Allow-Events: kpml,dialog
Recv-Info: conference
Recv-Info: x-cisco-conference
Content-Length: 966
Content-Type: application/sdp
Content-Disposition: session;handling=optional
v=0
o=Cisco-SIPUA 28123 0 IN IP4 10.61.4.112
s=SIP Call
t=0 0
m=audio 16736 RTP/AVP 0 8 18 102 9 116 101
c=IN IP4 10.61.4.112
a=trafficclass:conversational.audio.avconf.aq:admitted
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:102 L16/16000
a=rtpmap:9 G722/8000
a=rtpmap:116 iLBC/8000
a=fmtp:116 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
m=video 16738 RTP/AVP 126 97
c=IN IP4 10.61.4.112
b=TIAS:2000000
a=trafficclass:conversational.video.avconf.aq:admitted <----this is missing from US SDP
a=rtpmap:126 H264/90000
a=fmtp:126 profile-level-id=428014;packetization-mode=1;level-asymmetry-allowed=1;max-mbps=36000;max-fs=1200;max-rcmd-nalu-size=1300
a=imageattr:126 send * recv [x=640,y=480]
a=rtpmap:97 H264/90000
a=fmtp:97 profile-level-id=428014;packetization-mode=0;level-asymmetry-allowed=1;max-mbps=36000;max-fs=1200
a=imageattr:97 send * recv [x=640,y=480]
a=rtcp-fb:* ccm tmmbr
a=sendrecv
============below is coming from the US (phone IP is 10.1.109.81)================
04/30/2015 09:02:08.169 Send 10.61.4.112 SIP ACK bfa99a00-541162ed-71da57-52023d0a NotAvail
SIPTcp - wait_SdlSPISignal: Outgoing SIP TCP message to 10.61.4.112 on port 34271 index 53563
[344530326,NET]
ACK sip:[email protected]:34271;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 10.61.2.82:5060;branch=z9hG4bKe010481f320b08
From: "Anonymous" <sip:[email protected]>;tag=109791678~1b5af941-cea2-4a00-a0bd-15a532224d7d-59374526
To: <sip:[email protected]>;tag=5057a887bfdd550c0d321a20-7f843426
Date: Wed, 29 Apr 2015 23:02:05 GMT
Call-ID: [email protected]
User-Agent: Cisco-CUCM10.0
Max-Forwards: 70
CSeq: 101 ACK
Allow-Events: presence
Content-Type: application/sdp
Content-Length: 456
SDP Message
====================================================
v=0
o=CiscoSystemsCCM-SIP 109791678 1 IN IP4 10.61.2.82
s=SIP Call
c=IN IP4 10.1.109.81
b=TIAS:8000
b=AS:8
t=0 0
m=audio 16412 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=trafficclass:conversational.audio.aq:admitted <---what does this do here, and how?
m=video 0 RTP/SAVP 31 34 96 97 <-----------port 0. why?
a=rtpmap:31 H261/90000
a=rtpmap:34 H263/90000
a=rtpmap:96 H263-1998/90000
a=rtpmap:97 H264/90000
a=content:main
a=inactiveHi Dennis,
On US phone SDP media attribute is inactive.
a=rtpmap:97 H264/90000
a=content:main
a=inactive
Are you sure that audio works ? Can you please share all the SIP messages of both the scenarios.
Thanks
Manish -
RTP Media Stream with "Third Party SIP Device" always through CUCM
Hello,
i have i quite strage problem on one of my customers locations:
we have a cucm 7.1.5(SU4) with the cucm in the datacenter. And we have a small location(branch office) which has a small wan connection to the datacenter (1MBit/s).
In this location we have several Kirk (Polycom) Dect phones which register as "Third Party SIP Device - Basic" on the CUCM.
(The problem is the same if i use the X-Lite SIP Client instead)
When this SIP Phones or the X-Lite Client dials a internal Number of the same location the RTP Media Streams goes directly from the SIP Client to the phone. But if they dial an external number the RTP Stream goes from the SIP Client via the wan connection to the CUCM and back via the wan connection to the 2901 H.323 Gateway (on the same location).
and of course if i now start a big download or upload i'm no longe able to complete the phone call because we have no QOS on the wan connection, because we don't want to make calls over this connection.
When i look at the Sniffer files with Wireshark i see that the CUCM sends his own ip adresse in the SDP Header for the RTP Stream to the SIP Client. And this of course is wrong because the RTP Stream should always reside on the branch office.
i tested this in my lab (CUCM 8.5) and it is the same. i used the "Standard SIP Profile" and a Basic Third Party SIP Device"
The SCCP Phones on the same location which are configured with the same Region, Location, Device Pools, Media Resources and which use the same Gateway for external calls do not have this problem.
In the Gateway configuration "MTP Required" is not activated and i tested it in my lab with some Cisco SIP Phones (9971) and they are also not affacted with this problem.
any ideas?do you have a SIP trunk to the external devices with MTP required checked ?
-
Problem with direction in a page(??????)
Hi every body,
I have a problem with direction in some page when i change the language to Arabic(right to left language).
in some page like welcome page its completely true ,but in some page that i buile with my self (and add some portlet to it like :advanced search portlet)its directon does not appear properly,the label is appear in left, and text box appear in right(its not true).
what can i do??????????????????
please answer me :(This is not the right forum for your question. Try to post it in the Oracle Application Server Portal forum, or contact Oracle Support.
Peter -
How do I use home sharing with direct TV / Verizon internet. I have turned on Home sharing on apple tv and in iTunes but can't see the library in apple tv. I can see the photo stream but thats it. Any Ideas????
go to home-sharing on Apple TV and type in your info as ask.
hope this help -
Hello, i use premiere pro cc and i would like to upload my sequence in speedgrade with direct link but it's not available. I can see the option but it's not clickable, somebody knows why ?
Oh i'm not sure they are on same, i downloaded speedgrade this morning and i didn't upgraded premiere so it's maybe this ! thanks i will try it and let you know
-
I've only been using Premiere for a single project as my university specified we should use it, I'm not used to such a complex programme, or even video editing to be honest, so bear with me. (I'm following that guide on what information to add to questions on this forum)
I'm using Premiere Pro CC with the 7.2.1 update, that's the most recent update
I'm on Windows 7
Version
6.1.7601 Service Pack 1 Build 7601
I'm not actually sure what a codec is but my source material is just one .jpg image, I put effects on it in one project then imported it to another project though
Here's the problem message
Problem Event Name:
APPCRASH
Application Name:
Adobe Premiere Pro.exe
Application Version:
7.2.1.4
Application Timestamp:
52aed7f3
Fault Module Name:
OpenCL.dll
Fault Module Version:
1.2.11.0
Fault Module Timestamp:
52a242a8
Exception Code:
c0000005
Exception Offset:
0000000000002b89
OS Version:
6.1.7601.2.1.0.768.3
Locale ID:
2057
Additional Information 1:
5273
Additional Information 2:
52739eafd9c00fbd41b66266050284b2
Additional Information 3:
750c
Additional Information 4:
750c2263c4fb3446348e7454d5714618
Computer:
Processor
Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz, 3501 Mhz, 4 Core(s), 8 Logical Processor(s)
I THINK I have a AMD Radeon HD 7870 which isn't supposed to be supported for GPU acceleration
Premier crashes when it gets to the point in my sequence where I used the directional blur effect (I'm pretty sure that's when it crashes anyway), it also can't export I assume because it can't render
this is like 4 seonds of video as well
I reaaaaally need it to work soon because I have university deadlines to meet and I need Premiere Pro to finish my work
Hope someone can give some adviceI tried it without the directional blur effect and it rendered fine, for some reason it just can't deal with directional blur...
-
Problem with direct input program while uploading data into database
TABLES: BGR00, " Mappensatz
BMM00, " MM01/MM02 BTCI-Kopfdaten
BMMH1, " MM01/MM02 Hauptdaten
BMMH2, " Länderdaten (Steuern)
BMMH3, " Prognosewerte
BMMH4, " Verbrauchswerte
BMMH5, " Kurztexte
BMMH6, " Mengeneinheiten
BMMH7, " Langtexte
BMMH8. " Referentielle EAN's
Satztypen
DATA: MAPPENSATZ LIKE BMM00-STYPE VALUE '0',
KOPFSATZ LIKE BMM00-STYPE VALUE '1',
HAUPTSATZ LIKE BMM00-STYPE VALUE '2',
KUN_SATZ LIKE BMM00-STYPE VALUE 'Z',
LANDSATZ LIKE BMM00-STYPE VALUE '3',
PROGSATZ LIKE BMM00-STYPE VALUE '4',
VERBSATZ LIKE BMM00-STYPE VALUE '5',
KTEXTSATZ LIKE BMM00-STYPE VALUE '6',
MESATZ LIKE BMM00-STYPE VALUE '7',
TEXTSATZ LIKE BMM00-STYPE VALUE '8',
EANSATZ LIKE BMM00-STYPE VALUE '9'.
Common Data Bereich fuer die extern aufgerufenen Routinen
Initialstrukturen
DATA: BEGIN OF COMMON PART RMMMBIMY.
DATA: BEGIN OF I_BMM00.
INCLUDE STRUCTURE BMM00. " Kopfdaten
DATA: END OF I_BMM00.
DATA: BEGIN OF I_BMMH1.
INCLUDE STRUCTURE BMMH1. " Haupdaten
DATA: END OF I_BMMH1.
DATA: BEGIN OF I_BMMH2.
INCLUDE STRUCTURE BMMH2. " Länderdaten
DATA: END OF I_BMMH2.
DATA: BEGIN OF I_BMMH3.
INCLUDE STRUCTURE BMMH3. " Prognosewerte
DATA: END OF I_BMMH3.
DATA: BEGIN OF I_BMMH4.
INCLUDE STRUCTURE BMMH4. " Verbrauchswerte
DATA: END OF I_BMMH4.
DATA: BEGIN OF I_BMMH5.
INCLUDE STRUCTURE BMMH5. " Kurztexte
DATA: END OF I_BMMH5.
DATA: BEGIN OF I_BMMH6.
INCLUDE STRUCTURE BMMH6. " Mengeneinheiten
DATA: END OF I_BMMH6.
DATA: BEGIN OF I_BMMH7.
INCLUDE STRUCTURE BMMH7. " Textzeilen
DATA: END OF I_BMMH7.
DATA: BEGIN OF I_BMMH8.
INCLUDE STRUCTURE BMMH8. " Referentielle EAN's
DATA: END OF I_BMMH8.
DATA: END OF COMMON PART.
DATA: WA LIKE TEDATA-DATA.
Einzelfelder
DATA: GROUP_COUNT(6) TYPE C, " Anzahl Mappen
TRANS_COUNT(6) TYPE C, " alte Definition für rmmmbim0
SATZ_COUNT LIKE MUEB_REST-TRANC, " Trans.zähler neu
H_IND_COUNT LIKE MUEB_REST-D_IND, " Index welches Feld zurücks.
SATZ2_COUNT(6) TYPE C. " Anz. Sätze je Trans. ohne Kopfsatz
DATA: XEOF(1) TYPE C, " X=End of File erreicht
XHAUPTSATZ_EXIST TYPE C, " X=Hauptsatz zum Kopf exi.
NODATA(1) TYPE C. " kein BI für dieses Feld
mk/15.08.94:
DATA: GROUP_OPEN(1) TYPE C. " X=Mappe schon geöffnet
*eject
Konstanten
DATA: C_NODATA(1) TYPE C VALUE '/'. " Default für NODATA
DATA: MATNR_ERW LIKE MARA-MATNR VALUE '0 '.
DATA: MATNR_ERW_INT LIKE MARA-MATNR. "internal sight of '0 '
DATA: MATNR_LAST LIKE MARA-MATNR. "Material number
mk/11.08.94 2.1H:
If this flag is initial, the database updates will be done directly
during background maintenance instead of using a separate update
task. (no usage of this flag in dialogue mode!)
DATA: DBUPDATE_VB(1) VALUE ' '. "note 306628
data: matsync type mat_sync. "wk/99a no update in dialog if called
***INCLUDE ZMUSD070.
TABLES: MARA, "Material Master: General Data
MARC, "Material Master: C Segment
MARD, "Material Master: St Loc/Batch
MBEW, "Material Valuation
MVKE, "Material Master: Sales Data
MLGN, "Material Data per Whse Number
MLAN, "Tax Classification: Material
T001W, "Plants/Branches
TBICU.
DATA: BEGIN OF VALUTAB OCCURS 0.
INCLUDE STRUCTURE RSPARAMS.
DATA: END OF VALUTAB.
DATA: BEGIN OF VARTECH.
INCLUDE STRUCTURE VARID.
DATA: END OF VARTECH.
DATA: PARMS LIKE ZXXDCONV.
DATA: REC_COUNT TYPE I,
REC_COUNT_BAD TYPE I,
ZJOBID LIKE TBIZU-JOBID,
ZJOBCOUNT LIKE TBIZU-JOBCOUNT,
ZMATNR LIKE MARA-MATNR,
ZTEXT(80) TYPE C.
CONSTANTS: LIT_ZERO(18) TYPE C VALUE '000000000000000000',
LIT_CHAR TYPE C VALUE '_',
LIT_CREATE LIKE BMM00-TCODE VALUE 'MM01',
LIT_CHANGE LIKE BMM00-TCODE VALUE 'MM02',
LIT_CHECK(1) TYPE C VALUE 'X'.
DATA: BEGIN OF INP_DATA OCCURS 0,
MATNR(18) TYPE C, " Material code
UMREN(6) TYPE C, " Denominator
MEINH(3) TYPE C, " Alternate UOM
UMREZ(6) TYPE C, " Numerator
END OF INP_DATA.
*eject
SELECTION-SCREEN BEGIN OF BLOCK INOUT WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (13) TEXT-004.
PARAMETERS: P_PC RADIOBUTTON GROUP SRC DEFAULT 'X'.
SELECTION-SCREEN COMMENT (6) TEXT-005.
PARAMETERS: P_UNIX RADIOBUTTON GROUP SRC.
SELECTION-SCREEN COMMENT (6) TEXT-006.
PARAMETERS: P_DS_TYP LIKE ZXXDCONV-DS_TYP
DEFAULT 'ASC'.
SELECTION-SCREEN END OF LINE.
*SELECT-OPTIONS: S_PATH FOR PARMS-PATH
NO INTERVALS
LOWER CASE.
PARAMETERS: P_PATH TYPE RLGRAP-FILENAME.
PARAMETERS: P_HDRLIN LIKE ZXXDCONV-HDR_LINES
DEFAULT 0,
P_JOBNAM LIKE TBICU_S-JOBNAME
MEMORY ID BM1,
P_DI_EXE AS CHECKBOX
DEFAULT LIT_CHECK,
P_MAPPE LIKE BGR00-GROUP
DEFAULT 'MRP_UOM_LOAD'
NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK INOUT.
*eject
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PATH.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_PATH'
CHANGING
FILE_NAME = S_PATH-LOW
FILE_NAME = P_PATH
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2.
AT SELECTION-SCREEN.
Set up parameter record
PARMS-UNIX = P_UNIX.
PARMS-PC = P_PC.
PARMS-DS_TYP = P_DS_TYP.
PARMS-JOBNAME = P_JOBNAM.
PARMS-MAPPE = P_MAPPE.
PARMS-HDR_LINES = P_HDRLIN.
*eject
Main Processing Routine *
START-OF-SELECTION.
Initialization
PERFORM 0000_HOUSEKEEPING.
Initialize transaction data in I_BM00
PERFORM 0500_INIT_BMM00.
Process input files
SORT S_PATH BY SIGN OPTION LOW.
MOVE S_PATH-LOW TO PARMS-PATH.
MOVE P_PATH TO PARMS-PATH.
LOOP AT S_PATH.
AT NEW LOW.
CLEAR INP_DATA.
REFRESH INP_DATA.
Read source data into internal table
PERFORM 1000_GET_SOURCE_DATA TABLES INP_DATA.
Processs each record in internal table
ZTEXT = TEXT-007.
ZTEXT+13 = PARMS-DS_NAME.
PERFORM 4000_PROGRESS_INDICATOR USING ZTEXT.
Initialize transaction data in I_BM00
PERFORM 0500_INIT_BMM00.
LOOP AT INP_DATA.
Reset tables for each record
BMM00 = I_BMM00.
BMMH1 = I_BMMH1.
BMMH6 = I_BMMH6.
Load structures with data
MOVE-CORRESPONDING INP_DATA TO BMM00.
PERFORM 2000_WRITE_OUTPUT USING BMM00.
MOVE-CORRESPONDING INP_DATA TO BMMH1.
PERFORM 2000_WRITE_OUTPUT USING BMMH1.
MOVE-CORRESPONDING INP_DATA TO BMMH6.
PERFORM 2000_WRITE_OUTPUT USING BMMH6.
REC_COUNT = REC_COUNT + 1.
ENDLOOP.
ENDAT.
ENDLOOP.
IF REC_COUNT GT 0
AND P_DI_EXE EQ LIT_CHECK.
PERFORM 3000_START_DI_JOB.
ENDIF.
WRITE: / TEXT-008,
REC_COUNT.
PERFORM 9000_END_OF_JOB.
*eject
Include containing common routines used by direct input programs
INCLUDE ZMUSD071.
*eject
FORM 0500_INIT_BMM00 *
Initialize I_BMM00 with transaction code and views selected *
FORM 0500_INIT_BMM00.
***this changes done by samson**
if not inp_data[] is initial.
select single matnr from mara INTO ZMATNR where matnr = inp_data-matnr.
if sy-subrc = 0.
I_BMM00-TCODE = LIT_CHANGE.
Basic data
I_BMM00-XEIK1 = LIT_CHECK.
else.
I_BMM00-TCODE = LIT_CREATE.
Basic data
I_BMM00-XEIK1 = LIT_CHECK.
endif.
endif.
**this changes above done by samson**
Transaction code
I_BMM00-TCODE = LIT_CHANGE.
Basic data
I_BMM00-XEIK1 = LIT_CHECK.
ENDFORM.
INCLUDE ZMUSD069.
*eject
FORM 0000_HOUSEKEEPING *
Initialization routines *
FORM 0000_HOUSEKEEPING.
PERFORM 0010_LDS_NAME.
PERFORM 0020_DS_NAME.
PERFORM 0030_OPEN_FILE.
PERFORM 0040_INIT_STRUCTS.
ENDFORM.
*eject
FORM 0010_LDS_NAME *
Obtain logical file name from DI job details *
FORM 0010_LDS_NAME.
Check valid job name
SELECT SINGLE * FROM TBICU
WHERE JOBNAME EQ PARMS-JOBNAME.
IF SY-SUBRC EQ 0.
CALL FUNCTION 'RS_VARIANT_VALUES_TECH_DATA'
EXPORTING
REPORT = TBICU-REPNAME
VARIANT = TBICU-VARIANT
IMPORTING
TECHN_DATA = VARTECH
TABLES
VARIANT_VALUES = VALUTAB
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 2
OTHERS = 3.
IF SY-SUBRC EQ 0.
READ TABLE VALUTAB WITH KEY 'LDS_NAME'.
MOVE VALUTAB-LOW TO PARMS-LDS_NAME.
ELSE.
MESSAGE I001 WITH PARMS-JOBNAME.
MESSAGE A099.
ENDIF.
ELSE.
MESSAGE I000 WITH PARMS-JOBNAME.
MESSAGE A099.
ENDIF.
ENDFORM.
*eject
FORM 0040_INIT_STRUCTS *
Initialize structures for direct input records *
FORM 0040_INIT_STRUCTS.
Start of standard SAP initialization from example program RMMMBIME
*------- Write session record -
CLEAR BGR00.
BGR00-STYPE = MAPPENSATZ.
BGR00-GROUP = PARMS-MAPPE.
BGR00-NODATA = C_NODATA.
BGR00-MANDT = SY-MANDT.
BGR00-USNAM = SY-UNAME.
BGR00-START = BGR00-NODATA.
BGR00-XKEEP = BGR00-NODATA.
PERFORM 2000_WRITE_OUTPUT USING BGR00.
*----- Initialize structures -
NODATA = BGR00-NODATA.
PERFORM INIT_STRUKTUREN_ERZEUGEN(RMMMBIMI) USING NODATA.
End of standard SAP initialization from example program RMMMBIME
ENDFORM.
*eject.
FORM 3000_START_DI_JOB *
Start direct input job *
FORM 3000_START_DI_JOB.
ZTEXT = 'Starting '(021).
ZTEXT+9 = TBICU-JOBNAME.
PERFORM 4000_PROGRESS_INDICATOR USING ZTEXT.
CALL FUNCTION 'BI_START_JOB'
EXPORTING
JOBID = ' '
JOBTEXT = TBICU-JOBNAME
REPNAME = TBICU-REPNAME
SERVER = TBICU-EXECSERVER
VARIANT = TBICU-VARIANT
NEW_JOB = 'X'
CONTINUE_JOB = ' '
START_IMMEDIATE = 'X'
DO_NOT_PRINT = 'X'
USERNAME = SY-UNAME
IMPORTING
JOBID = ZJOBID
JOBCOUNT = ZJOBCOUNT
EXCEPTIONS
JOB_OPEN_FAILED = 1
JOB_CLOSE_FAILED = 2
JOB_SUBMIT_FAILED = 3
WRONG_PARAMETERS = 4
JOB_DOES_NOT_EXIST = 5
WRONG_STARTTIME_GIVEN = 6
JOB_NOT_RELEASED = 7
WRONG_VARIANT = 8
NO_AUTHORITY = 9
DIALOG_CANCELLED = 10
JOB_ALREADY_EXISTS = 11
PERIODIC_NOT_ALLOWED = 12
ERROR_NUMBER_GET_NEXT = 13
OTHERS = 14.
IF SY-SUBRC EQ 0.
WRITE: / 'Direct input job'(022), TBICU-JOBNAME, 'started'.
ELSE.
WRITE: / 'Direct input failed with return code'(023), SY-SUBRC.
ENDIF.
FORM 0020_DS_NAME.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
CLIENT = SY-MANDT
LOGICAL_FILENAME = PARMS-LDS_NAME
OPERATING_SYSTEM = SY-OPSYS
IMPORTING
FILE_NAME = PARMS-DS_NAME
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC NE 0.
MESSAGE E002 WITH PARMS-LDS_NAME.
MESSAGE A099.
ENDIF.
ENDFORM.
*eject
FORM 0030_OPEN_FILE *
Open physical file for output *
FORM 0030_OPEN_FILE.
OPEN DATASET PARMS-DS_NAME FOR OUTPUT IN TEXT MODE. "thg191105
OPEN DATASET PARMS-DS_NAME FOR OUTPUT IN TEXT MODE
encoding default. "thg191105
IF SY-SUBRC NE 0.
MESSAGE E003 WITH PARMS-DS_NAME.
MESSAGE A099.
ENDIF.
ENDFORM.
*eject
FORM 1000_GET_SOURCE_DATA *
Read source data into internal table *
--> INP_DATA " Name of internal table passed as parameter *
FORM 1000_GET_SOURCE_DATA TABLES INP_DATA.
CALL FUNCTION 'Z_FILE_UPLOAD'
EXPORTING
UNIX = PARMS-UNIX
PC = PARMS-PC
FILETYPE = PARMS-DS_TYP
FILENAME = PARMS-PATH
HDR_LINES = PARMS-HDR_LINES
TABLES
DATA_TAB = INP_DATA
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
INVALID_SOURCE = 8
OTHERS = 9.
ENDFORM.
*eject
FORM 2000_WRITE_OUTPUT *
Write record in standard SAP structure to UNIX file *
--> I_STRUCT " Name of record passed as parameter *
*FORM 2000_WRITE_OUTPUT USING I_STRUCT."SRY28NOV05
FORM 2000_WRITE_OUTPUT USING I_STRUCT TYPE ANY. "SRY28NOV05
TRANSFER I_STRUCT TO PARMS-DS_NAME.
IF SY-SUBRC NE 0.
MESSAGE E004 WITH PARMS-DS_NAME.
MESSAGE A099.
ENDIF.
ENDFORM.
*eject
*& Form 2100_WS_DOWNLOAD
text *
--> p1 text
<-- p2 text
FORM 2100_WS_DOWNLOAD TABLES INP_DATA.
DATA: FILENAME LIKE RLGRAP-FILENAME. "SRY28NOV05
DATA: W_FILENAME TYPE STRING. "SRY28NOV05
DATA: W_FTYP(10) TYPE C VALUE 'DAT'. "SRY28NOV05
MOVE PARMS-DS_NAME TO FILENAME. "SRY28NOV05
MOVE PARMS-DS_NAME TO W_FILENAME. "SRY28NOV05
*BEGIN OF BLOCK COMMENT BY SRY28NOV05
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
CODEPAGE = ' '
FILENAME = FILENAME
FILETYPE = 'DAT'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
importing
filelength =
TABLES
DATA_TAB = INP_DATA
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
OTHERS = 8.
*END OF BLOCK COMMENT BY SRY28NOV05
*BEGIN OF BLOCK ADDED BY SRY28NOV05
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = W_FILENAME
FILETYPE = W_FTYP
TABLES
DATA_TAB = INP_DATA
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*END OF BLOCK ADDED BY SRY28NOV05
ENDFORM. " 2100_WS_DOWNLOAD
*eject
FORM 4000_PROGRESS_INDICATOR *
Write progress text to status bar *
--> TEXT " Text passed as parameter *
FORM 4000_PROGRESS_INDICATOR USING TEXT.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT
EXCEPTIONS
OTHERS = 1.
ENDFORM.
*eject.
FORM 9000_END_OF_JOB *
Close files on UNIX *
FORM 9000_END_OF_JOB.
CLOSE DATASET PARMS-DS_NAME.
ENDFORM.
FORM 1000_GET_SOURCE_DATA TABLES INP_DATA.
CALL FUNCTION 'Z_FILE_UPLOAD'
EXPORTING
UNIX = PARMS-UNIX
PC = PARMS-PC
FILETYPE = PARMS-DS_TYP
FILENAME = PARMS-PATH
HDR_LINES = PARMS-HDR_LINES
TABLES
DATA_TAB = INP_DATA
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
INVALID_SOURCE = 8
OTHERS = 9.
ENDFORM.
*eject
FORM 2000_WRITE_OUTPUT *
Write record in standard SAP structure to UNIX file *
--> I_STRUCT " Name of record passed as parameter *
*FORM 2000_WRITE_OUTPUT USING I_STRUCT."SRY28NOV05
FORM 2000_WRITE_OUTPUT USING I_STRUCT TYPE ANY. "SRY28NOV05
TRANSFER I_STRUCT TO PARMS-DS_NAME.
IF SY-SUBRC NE 0.
MESSAGE E004 WITH PARMS-DS_NAME.
MESSAGE A099.
ENDIF.
ENDFORM.
*eject
*& Form 2100_WS_DOWNLOAD
text *
--> p1 text
<-- p2 text
FORM 2100_WS_DOWNLOAD TABLES INP_DATA.Hi,
Thnaks for your reply, This is my requirement.
Here my problem is i am trying to upload the data from flatfile which contain materil number, denominator, Actual UOM, Nominator field values.
Which is the data i need to upload into MM02 and MM01, if material number is new then it has to create the material, if material is already existing it has to update the UOM values.
here i am getting data into my internal table INP_DATA, from that i am trying to upload the data to database by using job name MRP_MATERIAL_MASTER_DATA_UPLOAD with direct input program RMDATIND.
when i execute my program i am getting success message all the records writtin from flatfile to application server. and job started message.
then if i go into sm37 screen there i execute the job it is also giving active message. if i refresh it it is showing job completed message.
then i look at job log status. there i found that for existing material it is expecting material type, for new material it is giving some gravity error.
So could u help me in this it will be gr8.
Thanks & Regards,
RamNV -
Serial table scan with direct path read compared to db file scattered read
Hi,
The environment
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
8K block size
db_file_multiblock_read_count is 128
show sga
Total System Global Area 1.6702E+10 bytes
Fixed Size 2219952 bytes
Variable Size 7918846032 bytes
Database Buffers 8724152320 bytes
Redo Buffers 57090048 bytes
16GB of SGA with 8GB of db buffer cache.
-- database is built on Solid State Disks
-- SQL trace and wait events
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true )
-- The underlying table is called tdash. It has 1.7 Million rows based on data in all_objects. NO index
TABLE_NAME Rows Table Size/MB Used/MB Free/MB
TDASH 1,729,204 15,242 15,186 56
TABLE_NAME Allocated blocks Empty blocks Average space/KB Free list blocks
TDASH 1,943,823 7,153 805 0
Objectives
To show that when serial scans are performed on database built on Solid State Disks (SSD) compared to Magnetic disks (HDD), the performance gain is far less compared to random reads with index scans on SSD compared to HDD
Approach
We want to read the first 100 rows of tdash table randomly into buffer, taking account of wait events and wait times generated. The idea is that on SSD the wait times will be better compared to HDD but not that much given the serial nature of table scans.
The code used
ALTER SESSION SET TRACEFILE_IDENTIFIER = 'test_with_tdash_ssdtester_noindex';
DECLARE
type array is table of tdash%ROWTYPE index by binary_integer;
l_data array;
l_rec tdash%rowtype;
BEGIN
SELECT
a.*
,RPAD('*',4000,'*') AS PADDING1
,RPAD('*',4000,'*') AS PADDING2
BULK COLLECT INTO
l_data
FROM ALL_OBJECTS a;
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
FOR rs IN 1 .. 100
LOOP
BEGIN
SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;
END LOOP;
END;
/Server is rebooted prior to any tests
Whern run as default, the optimizer (although some attribute this to the execution engine) chooses direct path read into PGA in preference to db file scattered read.
With this choice it takes 6,520 seconds to complete the query. The results are shown below
SQL ID: 78kxqdhk1ubvq
Plan Hash: 1148949653
SELECT *
FROM
TDASH WHERE OBJECT_ID = :B1
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 2 47 0 0
Execute 100 0.00 0.00 1 51 0 0
Fetch 100 10.88 6519.89 194142802 194831012 0 100
total 201 10.90 6519.90 194142805 194831110 0 100
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER) (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS FULL TDASH (cr=1948310 pr=1941430 pw=0 time=0 us cost=526908 size=8091 card=1)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 TABLE ACCESS MODE: ANALYZED (FULL) OF 'TDASH' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
Disk file operations I/O 3 0.00 0.00
db file sequential read 2 0.00 0.00
direct path read 1517504 0.05 6199.93
asynch descriptor resize 196 0.00 0.00
DECLARE
type array is table of tdash%ROWTYPE index by binary_integer;
l_data array;
l_rec tdash%rowtype;
BEGIN
SELECT
a.*
,RPAD('*',4000,'*') AS PADDING1
,RPAD('*',4000,'*') AS PADDING2
BULK COLLECT INTO
l_data
FROM ALL_OBJECTS a;
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
FOR rs IN 1 .. 100
LOOP
BEGIN
SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;
END LOOP;
END;
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 3.84 4.03 320 48666 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 1 3.84 4.03 320 48666 0 1
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
SQL ID: 9babjv8yq8ru3
Plan Hash: 0
BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 0 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 2 3.84 4.03 320 48666 0 2
Fetch 0 0.00 0.00 0 0 0 0
total 3 3.84 4.03 320 48666 0 2
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 0.00 0.00
log file sync 1 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 9 0.01 0.00 2 47 0 0
Execute 129 0.01 0.00 1 52 2 1
Fetch 140 10.88 6519.89 194142805 194831110 0 130
total 278 10.91 6519.91 194142808 194831209 2 131
Misses in library cache during parse: 9
Misses in library cache during execute: 8
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 5 0.00 0.00
Disk file operations I/O 3 0.00 0.00
direct path read 1517504 0.05 6199.93
asynch descriptor resize 196 0.00 0.00
102 user SQL statements in session.
29 internal SQL statements in session.
131 SQL statements in session.
1 statement EXPLAINed in this session.
Trace file: mydb_ora_16394_test_with_tdash_ssdtester_noindex.trc
Trace file compatibility: 11.1.0.7
Sort options: default
1 session in tracefile.
102 user SQL statements in trace file.
29 internal SQL statements in trace file.
131 SQL statements in trace file.
11 unique SQL statements in trace file.
1 SQL statements EXPLAINed using schema:
ssdtester.plan_table
Schema was specified.
Table was created.
Table was dropped.
1531657 lines in trace file.
6520 elapsed seconds in trace file.I then force the query not to use direct path read by invoking
ALTER SESSION SET EVENTS '10949 trace name context forever, level 1' -- No Direct path read ;In this case the optimizer uses db file scattered read predominantly and the query takes 4,299 seconds to finish which is around 34% faster than using direct path read (default).
The report is shown below
SQL ID: 78kxqdhk1ubvq
Plan Hash: 1148949653
SELECT *
FROM
TDASH WHERE OBJECT_ID = :B1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 2 47 0 0
Execute 100 0.00 0.00 2 51 0 0
Fetch 100 143.44 4298.87 110348670 194490912 0 100
total 201 143.45 4298.88 110348674 194491010 0 100
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER) (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS FULL TDASH (cr=1944909 pr=1941430 pw=0 time=0 us cost=526908 size=8091 card=1)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 TABLE ACCESS MODE: ANALYZED (FULL) OF 'TDASH' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
Disk file operations I/O 3 0.00 0.00
db file sequential read 129759 0.01 17.50
db file scattered read 1218651 0.05 3770.02
latch: object queue header operation 2 0.00 0.00
DECLARE
type array is table of tdash%ROWTYPE index by binary_integer;
l_data array;
l_rec tdash%rowtype;
BEGIN
SELECT
a.*
,RPAD('*',4000,'*') AS PADDING1
,RPAD('*',4000,'*') AS PADDING2
BULK COLLECT INTO
l_data
FROM ALL_OBJECTS a;
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
FOR rs IN 1 .. 100
LOOP
BEGIN
SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;
END LOOP;
END;
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 3.92 4.07 319 48625 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 1 3.92 4.07 319 48625 0 1
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
SQL ID: 9babjv8yq8ru3
Plan Hash: 0
BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 0 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 2 3.92 4.07 319 48625 0 2
Fetch 0 0.00 0.00 0 0 0 0
total 3 3.92 4.07 319 48625 0 2
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 0.00 0.00
log file sync 1 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 9 0.01 0.00 2 47 0 0
Execute 129 0.00 0.00 2 52 2 1
Fetch 140 143.44 4298.87 110348674 194491010 0 130
total 278 143.46 4298.88 110348678 194491109 2 131
Misses in library cache during parse: 9
Misses in library cache during execute: 8
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 129763 0.01 17.50
Disk file operations I/O 3 0.00 0.00
db file scattered read 1218651 0.05 3770.02
latch: object queue header operation 2 0.00 0.00
102 user SQL statements in session.
29 internal SQL statements in session.
131 SQL statements in session.
1 statement EXPLAINed in this session.
Trace file: mydb_ora_26796_test_with_tdash_ssdtester_noindex_NDPR.trc
Trace file compatibility: 11.1.0.7
Sort options: default
1 session in tracefile.
102 user SQL statements in trace file.
29 internal SQL statements in trace file.
131 SQL statements in trace file.
11 unique SQL statements in trace file.
1 SQL statements EXPLAINed using schema:
ssdtester.plan_table
Schema was specified.
Table was created.
Table was dropped.
1357958 lines in trace file.
4299 elapsed seconds in trace file.I note that there are 1,517,504 waits with direct path read with total time of nearly 6,200 seconds. In comparison with no direct path read, there are 1,218,651 db file scattered read waits with total wait time of 3,770 seconds. My understanding is that direct path read can use single or multi-block read into the PGA. However db file scattered reads do multi-block read into multiple discontinuous SGA buffers. So it is possible given the higher number of direct path waits that the optimizer cannot do multi-block reads (contigious buffers within PGA) and hence has to revert to single blocks reads which results in more calls and more waits?.
Appreciate any advise and apologies for being long winded.
Thanks,
MichHi Charles,
I am doing your tests for t1 table using my server.
Just to clarify my environment is:
I did the whole of this test on my server. My server has I7-980 HEX core processor with 24GB of RAM and 1 TB of HDD SATA II for test/scratch backup and archive. The operating system is RHES 5.2 64-bit installed on a 120GB OCZ Vertex 3 Series SATA III 2.5-inch Solid State Drive.
Oracle version installed was 11g Enterprise Edition Release 11.2.0.1.0 -64bit. The binaries were created on HDD. Oracle itself was configured with 16GB of SGA, of which 7.5GB was allocated to Variable Size and 8GB to Database Buffers.
For Oracle tablespaces including SYS, SYSTEM, SYSAUX, TEMPORARY, UNDO and redo logs, I used file systems on 240GB OCZ Vertex 3 Series SATA III 2.5-inch Solid State Drive. With 4K Random Read at 53,500 IOPS and 4K Random Write at 56,000 IOPS (manufacturer’s figures), this drive is probably one of the fastest commodity SSDs using NAND flash memory with Multi-Level Cell (MLC). Now my T1 table created as per your script and has the following rows and blocks (8k block size)
SELECT
NUM_ROWS,
BLOCKS
FROM
USER_TABLES
WHERE
TABLE_NAME='T1';
NUM_ROWS BLOCKS
12000000 178952which is pretty identical to yours.
Then I run the query as brelow
set timing on
ALTER SESSION SET TRACEFILE_IDENTIFIER = 'test_bed_T1';
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8';
SELECT
COUNT(*)
FROM
T1
WHERE
RN=1;
which gives
COUNT(*)
60000
Elapsed: 00:00:05.29
tkprof output shows
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.02 5.28 178292 178299 0 1
total 4 0.02 5.28 178292 178299 0 1
Compared to yours:
Fetch 2 0.60 4.10 178493 178498 0 1
It appears to me that my CPU utilisation is by order of magnitude better but my elapsed time is worse!
Now the way I see it elapsed time = CPU time + wait time. Further down I have
Rows Row Source Operation
1 SORT AGGREGATE (cr=178299 pr=178292 pw=0 time=0 us)
60000 TABLE ACCESS FULL T1 (cr=178299 pr=178292 pw=0 time=42216 us cost=48697 size=240000 card=60000)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 SORT (AGGREGATE)
60000 TABLE ACCESS MODE: ANALYZED (FULL) OF 'T1' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 3 0.00 0.00
SQL*Net message from client 3 0.00 0.00
Disk file operations I/O 3 0.00 0.00
direct path read 1405 0.00 4.68
Your direct path reads are
direct path read 1404 0.01 3.40Which indicates to me you have faster disks compared to mine, whereas it sounds like my CPU is faster than yours.
With db file scattered read I get
Elapsed: 00:00:06.95
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 1.22 6.93 178293 178315 0 1
total 4 1.22 6.94 178293 178315 0 1
Rows Row Source Operation
1 SORT AGGREGATE (cr=178315 pr=178293 pw=0 time=0 us)
60000 TABLE ACCESS FULL T1 (cr=178315 pr=178293 pw=0 time=41832 us cost=48697 size=240000 card=60000)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 SORT (AGGREGATE)
60000 TABLE ACCESS MODE: ANALYZED (FULL) OF 'T1' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
Disk file operations I/O 3 0.00 0.00
db file sequential read 1 0.00 0.00
db file scattered read 1414 0.00 5.36
SQL*Net message from client 2 0.00 0.00
compared to your
db file scattered read 1415 0.00 4.16On the face of it with this test mine shows 21% improvement with direct path read compared to db scattered file read. So now I can go back to re-visit my original test results:
First default with direct path read
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 2 47 0 0
Execute 100 0.00 0.00 1 51 0 0
Fetch 100 10.88 6519.89 194142802 194831012 0 100
total 201 10.90 6519.90 194142805 194831110 0 100
CPU ~ 11 sec, elapsed ~ 6520 sec
wait stats
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
direct path read 1517504 0.05 6199.93
roughly 0.004 sec for each I/ONow with db scattered file read I get
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 2 47 0 0
Execute 100 0.00 0.00 2 51 0 0
Fetch 100 143.44 4298.87 110348670 194490912 0 100
total 201 143.45 4298.88 110348674 194491010 0 100
CPU ~ 143 sec, elapsed ~ 4299 sec
and waits:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 129759 0.01 17.50
db file scattered read 1218651 0.05 3770.02
roughly 17.5/129759 = .00013 sec for single block I/O and 3770.02/1218651 = .0030 for multi-block I/ONow my theory is that the improvements comes from the large buffer cache (8320MB) inducing it to do some read aheads (async pre-fetch). Read aheads are like quasi logical I/Os and they will be cheaper compared to physical I/O. When there is large buffer cache and read aheads can be done then using buffer cache is a better choice than PGA?
Regards,
Mich -
Alerts not working with direct agent?
I'm aware of
this issue with the SQL Intelligence pack and direct agents, which I'm also experiencing, but Alerts don't seem to be working with my direct agents either. I switched the handful of servers I had reporting under the old gateway model to direct agents
last week, and added 6 new direct agent servers, I know some of those new servers have the same hotfix alerts that I'm seeing from the old ones, but I have not received a new alert since 11/26 when I switched everything over, and when I login to the portal
and view alerts I receive:
"No gateway or SCOM management group detected. Op Insights required a gateway or SCOM management group in order to analyze data and generate alerts"
Followed by a link to the deployment guide, when I read the deployment guide for direct agents there no mention of an SCOM deployment requirement.
Any suggestions? Is anyone who is configured with direct agents successfully receiving alerts?Indeed. Configuration Assessment 'alerts' are disabled with Direct Agent. Please look at the answer given here
https://social.msdn.microsoft.com/Forums/azure/en-US/8241918e-41f4-4429-9a5f-962e96908878/repeated-closed-alerts-emails-on-closed-alerts-in-opsinsight?forum=opinsights with regards to those 'alerts': we are moving away from 'alerts' for configuration-related
issues, and replacing them with those 'Recomendations' shapes (like the SQL Assessment). Those weren't 'alerts' in the first place - those were *proactive* recommendations. For new accounts with only Direct agents, those are not even produced and those screens
are unavailable. We think of 'Alerts' in the SCOM sense: server is down, needs immediate action even at 2am.
In this sense, we think of 'Alerts' as something that should be user-defined and based on searches where you can determine what to alert for, against any type of data - see this idea here
http://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519198-long-running-saved-searches-or-scheduled-that-ca -
Has anyone got Maps to work with directions in the UK?
If I enter US addresses, it works, but I can not get the routing function to work at all for anywhere in the UK, even used Yo Sushi as seen on the posters and I can find it but the directions function did not work, even from the next street.
Anyone had any success with directions on maps in the UK? And if so, can you give me the example that worked.I am having the same problem and checked out the Apple Discussions for a solution.
I too am meticulous with my addresses.
Seeing no solution I went back to testing.
I have tried:
From Shrewsbury
To Telford
The result was a trip in the US taking 14 hours.
Then I tried:
From Shrewsbury UK
To Telford UK
This worked.
When on the "Get Directions" screen there is a "Globe" icon by the "Space" icon. Pressing this brings up "English (US)". Press again and you get "English (UK).
Any ideas?
When I use the "Contacts" to get the Start and End fields the iPhone is bringing up the correct address but with "United States" at the end of the address.
Again any ideas?
In my Address book I never use the "Country" field as all my contacts are in the UK. I wonder if this is the problem and the iPhone is defaulting to US in the absence of no "Country"?
Help! -
I'm going to france will siri be able to help me with directions
I'm going to france will siri be able to help me with directions?
Tamara
As well, check with your carrier website to see what "non-home" country offers they have. My Carrier offers a wide variety of international options that I have used.
I agree with Pvonk about a cheap fon for six months that you just use for calls and texts and use your iPhone for wifi options - email, etc etc -
Why i am unable to select between 2 anchor points with in a object while dragging with direct select
why i am unable to select between 2 anchor points with in a object while dragging with direct selection tool instead it moves
Another option is to temporarily change your view to outline mode, when your done switch back to preview mode. Ctrl-Y or View>Outline {View>Preview} The menu option will change depending on which mode you are in.
And another option, double click on the object in question to place it in Isolation mode. You can now edit to your hearts content. When done, click on the gray border at top of document.
So as you can see there are multiple ways of accomplishing the same thing. -
SQL*Loader problem with direct path load
Hi all,
Its on Oracle 9.2
I have a sqlldr control file which has couple of columns like,
my_column_1 ,
my_column_2 "decode(:my_column_1,'ONE','AAA','TWO','BBB', :my_column_1)"
The table I am loading to is in user X and I am running the load from
user Y. Everything works fine with conventional path load (not direct
path) as grants are made for the table to user Y.
When I load the data with same control file with direct path, I get an
error ,
01031 - insufficient privileges
Is this anything to do with the syntex I have used in the control file
or its a privilege issue. If its a privilege issue which privilege is
that ?
I did following tests,
1) Load is run with conventional path load, from user Y and the decode
statement is in control file - Load works
2) Load is run with direct path load, from user Y and decode statement
is in control file - Load fails with above mentioned error
3) Load is run with direct path load, from user Y and decode IS REMOVED
from the control file - Load works (!!!)
What can be the conclusion? Way out ?
Thanks and RegardsYou need to grant
grant lock any table to userY;
For more information see MetaLink Note 1082550.6
Maybe you are looking for
-
I'm looking for some ideas on this baffling problem. I have three Vostro 1720 laptops from about 4 years ago. They all arrived in the same shipment. Their BIOS's were updated to the same version. They had been on Win7, so late last year I clean-insta
-
Can I recover emails that were blocked when my storage was full?
The storage on icloud was full for me for perhaps a number of days. I bought extra storage (20GB) and my emails are now working, but how can I recover the emails that were blocked when my storage was full?
-
Can I load my ipod using it on another computer?
Hello please could someone help me ? I have 2 questions: 1. How can I make the ipod list my audiobooks under audiobooks? It doesn't seem to do that but stores them under music or lists. 2. I plug my ipod into my pc and it uploads any podcasts automat
-
Where can get version 10 of Elements 10? I have bought a new PC and need to load it.
Where can get version 10 of Elements 10? I have bought a new PC and need to load it.
-
Using the bone tool with a psd, png, or jpeg
When I import a psd, png, or jpeg file into Flash CS5 and try to use the bone tool, it scrambles the image. It does this if I simply import and BREAK APART the image or if I turn it into a graphic symbol. PLEASE HELP!