28 Ekim 2011 Cuma

EDI Entegrasyon Projelerinin BizTalk Server 2006’dan BizTalk Server 2010’a Taşınması

 

EDI Entegrasyonları Taşınmasında Temel Yapılacaklar;  

 

1.    BizTalk Server 2006'daki mevcut entegrasyon BizTalk Server 2010'a taşınır.

 

2.    Entegrasyondaki EDI schema, bu schemanın yeni formatı ile değiştirilir. (yeni EDI file 'C:\Program Files (x86)\Microsoft BizTalk Server 2010\XSD_Schema\EDI\MicrosoftEdiXSDTemplates\EDIFACT' klasöründen seçilerek entegrasyona eklenir. )

 

3.    Entegrasyondaki EDI schema değiştirildikten sonra mapteki bağlantılar kopar. Bu bağlantılar yeni schema  ile map üzerinde tekrar yapılır.

 

4.    Map yeniden düzenlendikten sonra orchestrationa 'StartLog' eklenir (Entegrasyonun yeni sistemdeki -Bizwatch- loglamaya uygun çalışması.).

 

5.    Örnek input dosya ile test yapılır.

 

6.    Entegrasyon build / deploy edilir.

 

7.    Bu entegrasyonun .dll'i, BizTalk Administrations'ta ilgili applicationın altnda Resources kısmına eklenir.

 

8.    BizTalk Administrations'ta entegrasyonun receive location, receive port ve send portları oluşturulur ve entegrasyonun orchestrationı ile ilişkilendirilir.

 

9.    Entegrasyon için Party tanımlaması yapılır.

 

10.  Entegrasyonun .dll'i, loglamanın çalışabilmesi için Bizwatch'a yüklenir.

 

11.  Entegrasyonun orchestrationı başlatılıp örnek input dosyası ile çalıştırılır.

 

 

Karşılaşılan Teknik Sorunlar;

 

1.    2006 Projesinde 'Property schema' kullanıldıysa bu schema 2010'da kaldırılmalı. Kaldırılmazsa proje Bizwatcha yüklenirken hata veriyor.

2.    EDI çıktı almada sorun çıkabiliyor. Bu durumda; EDI schemada UNH2 segmentinin fieldlarının değerleri map üzerinden değil, schemada (UNH2.1, UNH2.2...)-> properties->Default Value ya yazılarak verilmesi gerekiyor.

-> UNH2.1 = COPARN    -> UNH2.2 = D     -> UNH2.3 = 95B    -> UNH2.4 = UN         -> UNH2.5 = ITG14

 

3.    RFF fieldı mandatory olmadığı için; kullanılmadığı zamanlarda properties->minOccurs = 0 yapılmalı, yapılmadığında TDT fieldından önce RFF fieldı değerini boş gördüğü için hata veriyor.

=> Conditional olan fieldların minOccurs özelliği 0 yapılmalı.

4.    COPARN çıktısının UNB segmentinde fazladan fieldlar var;

UNB+UNOA:1+BTS-SENDER:ZZZ+RECEIVE-PARTNER:ZZZ+110715:1616+116' olması gereken satır

UNB+UNOA:1+BTS-SENDER:ZZZ+RECEIVE-PARTNER:ZZZ+110715:1616+116++++0++0' şeklinde geliyor. Kırmızı olan alanlar 2006'da yok. Biztalk 2010'da gelmiş bir özellik. Bu alanlar kaldırılamadı. Müşteri tarafından bu hali ile denendi, sorun olmadığı için bu hali ile bırakıldı.

5.    COPARN çıktısının TMP fieldı kullanılmadıgında sorun yok, hem xml hem de edi olarak çıktı alınabiliyor. Bu field kullanıldığı zaman Biztalk Administration hataya düşüyor -dehydrated-, XML çıktıları alınıyor ama edi çıktıları alınamıyor:

Çözümü:

Visual Studioda input (XML) schemada; root-> EQDLoop1-> TMP-> C239-> C23901 fieldının Properties'inden 'Base Data Type' = xs:string seçilecek.

 

PARTY ve AGREEMENT OLUŞTURMA:

a.    İki adet party oluştur(entegrasyonun çalışacağı iki uç, ör: Yılport – ARKAS):

Figure1:Party properties

 

Party'ye isim verdikten sonra, bu partynin çalışacağı entegrasyonun EDI send portlarını bu party'ye ekle:

Figure 2: Party send ports tanımlama

 

b.    Bu iki party altında birer adet Business Profile oluştur:

                            

              Figure 3: Party altında Business Profile oluşturma

Oluşturulan Business Profile'in identities tabı aşağıdaki gibi tamamlanır:

 Figure 4: Business Profile Identities

 

c.     Bu iki party için yeni bir Agreement oluştur:

Figure 5: Agreement oluşturma – genel özellikleri

(Parties-> YILPORTBooking->YılportBookingAgreement)

 

  1. Kırmızı ile belirtilen tablardan ilki receiver->sender, ikincisi sender-> receiver şeklinde olacak.
  2. Bu sayfada 'code qualifier (UNB2.2 ve UNB3.2)' = <NotValued> olarak seçilecek.
  3. Her iki tabdada 'Character sets and seperators' = UNOA
  4. İlk tabda 'Transaction Set List' de UNH 2.1 = COPARN olacak ve 'Support Transaction Sets from List' seçili olacak
  5. Her iki tabda da 'Validation' da, UNH2.1 = COPARN yazılacak (alttaki resimde olduğu gibi).

  1. İkinci tabda(sender-> receiver) BizTalkta tanımlanmış olan send portlar gösterilecek (edi çıktısı alınacak send portlar).

 

 

 

 

 

14 Ekim 2011 Cuma

Sharepointte “Exception of type 'System.OutOfMemoryException' was thrown.” şeklinde bir hata aldığınızda, sharepointin çalıştığı application pool’ un worker process sayısını arttırarak çözüm sağlayabilirsiniz.

Sharepointin çalıştığı sunucuda IIS Manager’ ı açıp, application pool’ un özelliklerinden, Performance sekmesinde gerekli ayarı yapabiliriz.

Microsoft KB: http://support.microsoft.com/kb/823547/en-us

Configuring Web Gardens with IIS 6.0 : http://technet.microsoft.com/en-us/library/cc784869(WS.10).aspx

6 Ekim 2011 Perşembe

ORACLE 11G LISTAGG Birden fazla satırı gruplayıp tek satır haline getirmek

Bir sorguda alt alta gelen satırları belirli bir grup bazında birleştirerek gösterme işlemini tek fonksiyon ile yapabiliyoruz.

Bunu sağlayan fonksiyon “LISTAGG

 

MUSADR.MUSTERI_ID-> Gruplanan, tek satır gelecek bilgi

ADRES_METINIà bu fonksiyon ile birleştirilen, tekrar eden satırlar

',' à Ayırac

 

SELECT  MUSADR.MUSTERI_ID, LISTAGG(ADRES_METINI,',' ) WITHIN GROUP (ORDER BY ADRES_METINI) AS ADRES

FROM MUSTERI_ADRESI MUSADR

group by MUSADR.MUSTERI_ID

 

3 Ekim 2011 Pazartesi

Reporting Services Belli Sayıda Detay Kayıdı Göstererek Gruplama (yeni sayfaya geçme)

Detay TabliX’inin Group ifadesine aşağıdaki değer girilir. Gruptan sonra “Page Break” yap seçeneği işlenirse, istenilen sayıda kayıt yazdıktan sonra sayfa atlatılmış olur.

=Floor((RowNumber(Nothing) - 1) / 10)

 

KAYNAK

Add a group to your report and use the following expression to group on: =Floor((RowNumber(Nothing) - 1) / 10)  Also set the 'Page break at and' property for the group.  Peter

http://www.sqlservercentral.com/Forums/Topic490774-147-1.aspx

 

 

 

30 Eylül 2011 Cuma

Rapor Projesi Derlenmiyorsa, ClassLibrary Hatası Veriyor İse

YNAREPORT2008 de , derlenmeyen proje varsa, rapor önizleme yapmıyorsa , ClassLibrary Hatası Veriyor İse

 

Rapor Projesini Açıyoruz..

 

YNAClassLibrary Projesini Derliyoruz.  Oluşan DLL’leri

 

C:\Projects\YENI NESIL ACENTELIK (YNA)\Genel\YnaReport2008\YNAClassLibrary\bin\Debug

 

Klasöründen kopyalayıp

 

C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies

 

Klasörüne yapıştırıyoruz.

Count(*) Count(1) Count(Kolon_adi)

SELECT

       COUNT (*) CountYildiz_NulldaOlsaSayar,

       COUNT (1) Count1_Nulldahil1KabulEdpSayr,

       COUNT (D.TRANSIT_TASIMA_TIPI_ID) CountAlanAdi_NullariSaymaz,

       COUNT (DISTINCT D.TRANSIT_TASIMA_TIPI_ID) CntDistinct_NulldnFrkliKacAdt

  FROM dok_konsimento d

 

 

 

The parameter to the COUNT function is an expression that is to be evaluated for each row. The COUNT function returns the number of rows for which the expression evaluates to a non-null value. ( * is a special expression that is not evaluated, it simply returns the number of rows.)

 

There are two additional modifiers for the expression: ALL and DISTINCT. These determine whether duplicates are discarded. Since ALL is the default, your example is the same as count(ALL 1), which means that duplicates are retained.

Since the expression "1" evaluates to non-null for every row, and since you are not removing duplicates, COUNT(1) should always return the same number as COUNT(*).

27 Eylül 2011 Salı

Calling WCF Service with Service Reference

Doğru Kullanım
ServiceReference1.ArdTarifeServiceClient obj = new ServiceReference1.ArdTarifeServiceClient();
                    using (obj)
                    {
                        string s = (obj.Increment().ToString());
                    }

Daha Doğru Kullanım
bool mSuccess = false;
            ServiceReference1.ArdTarifeServiceClient obj = new ServiceReference1.ArdTarifeServiceClient();
            try
            {
                string s = obj.Increment().ToString();
                obj.Close();
                mSuccess = true;
            }
            finally
            {
                if (!mSuccess)
                    obj.Abort();
            }

Yanlış Kullanım ve Olacaklar

int t = 0;
            try
            {
                for (int i = 0; i < 500; i++)
                {
                    t = i;
                    ServiceReference1.ArdTarifeServiceClient obj = new ServiceReference1.ArdTarifeServiceClient();
                    string s = (obj.Increment().ToString());
                }
            }
            catch (Exception ex)
            {
                string hata = t + ".ci satirda : " + ex.ToString();
            }


System.TimeoutException: The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The socket transfer timed out after 00:00:59.9990000. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
   at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
   --- End of inner exception stack trace ---

Server stack trace:
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
   at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)





26 Eylül 2011 Pazartesi

ORACLE RECURSIVE QUERY CONNECT BY PRIOR

Örnek
ust_mal_id tablodaki başka bir kayıdı (id’yi) göstersin (seviye mal tablosu üzerindeki bir alandır. En üst seviye=1 dir ve seviye=1 olan kayıtların ust_mal_id değeri bostur).

SELECT seviye,id, ust_mal_id
FROM mal
CONNECT BY PRIOR ust_mal_id=id
START WITH ID = 25909
ORDER BY SEVIYE DESC

ÇIKTI
SEVIYE      ID    UST_MAL_ID
3           25909 24916
2           24916 25051
1           25051


Bir Function Yazarak Bu Sorguyu Program içinden kullanabiliriz

/* Formatted on 26.09.2011 15:59:27 (QP5 v5.149.1003.31008) */
CREATE OR REPLACE FUNCTION "MAL_USTMALIDLERI_BIRLESTIR" (P_MAL_ID IN NUMBER)
   RETURN VARCHAR2
IS
   CURSOR C1
   IS
          SELECT seviye, id, ust_mal_id
            FROM mal
      CONNECT BY PRIOR ust_mal_id = id
      START WITH ID = P_MAL_ID
        ORDER BY SEVIYE DESC;

   V_MAL_IDLER   VARCHAR2 (100);
BEGIN
   V_MAL_IDLER := '';

   FOR C1REC IN C1
   LOOP
      V_MAL_IDLER := V_MAL_IDLER  || C1REC.ID || ';';
   END LOOP;

   RETURN V_MAL_IDLER;
END MAL_USTMALIDLERI_BIRLESTIR;

Grant
DBMS_UTILITY.EXEC_DDL_STATEMENT('grant execute on MAL_USTMALIDLERI_BIRLESTIR to vtuser');

Kullanım
SELECT MAL_USTMALIDLERI_BIRLESTIR(25909) FROM DUAL;

ÇIKTI
25909;24916;25051;