14 Ocak 2016 Perşembe

SQL Server'da Oracle veritabanına Linked Server kurulumu


  1. SQL Server ile Oracle Veritabanlari arasinda linked server ile baglanti saglamak için SQL Server’in kurulu oldugu sunucuda Oracle Client’in kurulu olmasi ve SQL Server’in OraOLEDB.Oracle provider destegini sunmasi gerekmektedir. Bu gerekçeler nedeniyle öncelikle asagidaki programlarin sunucuya kurulmasi gerekmektedir. Her iki kurulumunda ayni sürüm olmasina dikkat etmeliyiz. 
  2. Baglanti yapilacak SQL Server sunucusuna Oracle Database 11g Release 2 Client (11.2.0.3.0) for Microsoft Windows (x64) kurulur. (Ilgili kurulum ek olarak sunulan ‘Ek-1. Oracle Client Kurulumu’ dökümaninda mevcuttur)
  3. Baglanti yapilacak SQL Server sunucusuna 64-bit ODAC 11.2 Release 4 (11.2.0.3.0) for Windows x64 (Oracle Data Access Components) seçenegi ile kurulur. (Ilgili kurulum ek olarak sunulan ‘Ek-2. ODAC Kurulumu’ dökümaninda mevcuttur)
  4. Linked Server olusturulacak SQL Server Veritabani, Cluster ise her iki nod’un SQL Server Software kurulu olan dizinine (Genellikle C dizini) bu iki kurulumu yapmamiz gerekir.
  5. Kurulum bittikten sonra SQL Server servisi tekrar baslatilir ve sunucudan ORACLE veritabani baglantisinin yapilip yapilamadigi asagidaki sekilde test edilir.
    • NOTEPAD ile masaüstünde txt uzantili bos bir dosya yaratilir.
    • Txt uzantisi udl (uniform data link) olarak degistirilir.
    • Bu islemden sonra dosya uzantisi degisecektir uyarisi kabul edilerek dosya kapatilir.
    • Olusturulan bu dosyaya çift tiklanarak açilir. Açilan ekranda Saglayici sekmesinde Microsoft OLE DBProvider for Oracle seçilir.
    • Baglanti tabinda baglanti yapilacak ORACLE veritabani sunucusunun parametreleri TNSNAMES.ORA dosyasina göre girilir ve baglanti test edilir. Burada girilen kullanici bilgileri baglanti yapilmak istenen oracle veritabaninda olusturulan kullanici bilgileridir.
    • Baglanti basarili ise SQL Server sunucu üzerinden ORACLE sunucusuna erisim saglanmis demektir, ekran sol alt kösesindeki Tamam(OK) butonuna basilarak ekran kapatilir.
    • UDL dosyasi seçili iken sag tiklanir, ve çikan ekrandan NOTEPAD ile bu dosya açilir. Yapilan baglantinin tüm detaylari görüntülenir.

      Bu dosya içerigi SQL Server’da Linked Server tanimi yaparken kullanilacaginda dosyayi kapatmadan arka planda bekletiniz.
  6. Linked Server kofigürasyonu yapilacak SQL Server üzerinde Server Objects-->Linked Servers-->OraOLEDB.Oracleseçilir, sag tiklanarak gelen ekrandan Properties seçilir.
  7. Açilan Provider Options – Oracle Provider for OLE DB ekranindan Provider Options ekranindan Allow inprocessseçenegi Enable seçilir, ok tiklanarak ekran kapatilir.
  8. Server Objects-->Linked Servers seçili iken sag tiklanir, New Linked Server seçilir.                    
                                             
  9. Açilan ekranda General tabinda New Linked Server ekraninda Linked Server alanina linked server adi girilir. Product name, Data Source ve Provider stringalanlari olusturulan UDL dosyasindaki bilgilere göre doldurulur.
  10. Ayni ekranda iken Security tabina geçilir. Be made using this security context opsiyonu tiklanir, Remote login ve With Password alanlari girilir ve OK tiklanir.
  11. Olusturulan yeni linked server, Linked Servers altinda seçilir, sag tiklanir, çikan ekrandan Test Connection opsiyonu seçilerek test baglantisi yapilir.

  12. Olusturulan linked server’dan kayit sorgulanmak istendiginde OPENQUERYile sorgulama yapilir.
  
 Kaynak : http://www.sqlserveronculeri.com/1/Article/494/sql-server 






 
Kaynak
Share:

6 Ocak 2016 Çarşamba

Gpupdate /force Logon script olarak çalıştırma / Gpupdate /force option initially run as a logon script


Gpupdate /force seçeneğinizi başlangıçta logon script olarak çalıştırma.


Gpupdate /force option initially run as a logon script

'VB Script for Refreshing GroupPolicy Settings silently
'Created: 06/01/2016
'Created By: hakanoncel.blogspot.com

Dim WshShell
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Run "gpupdate.exe /target:user /force /wait:0",0,true
Set WshShell = Nothing
'Hand back the errorlevel
Wscript.Quit(Result)

Share:

23 Aralık 2015 Çarşamba

Masaüstüne Dosya Kaydetmeyi Engelleme - Block To Save The File To Your Desktop

Merhaba,

  • Group Policy 'den Computer  configuration-windows settings-security settings - file system'dan add diyelim
  •  %userprofile%\desktop yazalım. gelen ekranda "replace existing permission...." seçeneğini seçip edit security tıklayalım. 
  • Buraya tüm kullanıcıların bulunduğu bir security grup ekleyelim.
  • Bu policy tüm kullanıcı bilgisayarına uygulayalım.



İstediğiniz gibi kullanıcılar masaüstlerine kaydedemeyeceklerdir.

Hello

solution of the desired operation is as follows. 
  • Expand - Group Policy \ Computer \ configuration-windows settings-security settings - file system
  • Select to Add
  • Write %userprofile%\desktop  
  • On the next screen, select to "replace existing permission...." choice 
  • Select  Edit Security tab 
  • You must create new security group and included all users
  • The person you want to apply, this policy, 

Kaynak / Source : http://www.cozumpark.com/forums/permalink/152803/152971/ShowThread.aspx#152971

Share:

8 Eylül 2015 Salı

SQL Para Birimi Formatı

NUMSTR(number, decimals, format)

Verilen sayıyı metne çevirerek istenen formatta yazar.

NUMSTR(1234,4,7) = 1.234,0000
Share:

7 Ağustos 2015 Cuma

Windows 7 - Windows 8 - Windows 10 Username Password Reset - Programsız Kullanıcı adı ve şifresi resetleme

Windows 7, Windows 8, Windows 10 kullanıcı şifrenizi unuttuysanız, veya local yetkili yeni bir kullanıcı oluşturmak istiyorsanız aşağıdaki adımları sırasıyla yapmanız yeterli.

In my last post, I explained how you can recover a Microsoft account password using Microsoft’s online forms. If this failed, the method described below will help you sign in again to your Windows 10 computer and access the files associated with your Microsoft account. If you are used to signing in to your Windows 10 computer with a local account instead of a Microsoft account, you can use the method here to reset your password.

If you forgot the password for your Microsoft account and you were unable to reset the password with Microsoft’s online recovery methods, the best way is to create a new local account so you can sign in again to your Windows 10 computer. This method will also allow you to access all of your Microsoft account’s local files.


  • 1. Boot from the Windows 10 DVD. Make sure that your PC setup is configured to boot from a DVD and that UEFI and Secure Boot are disabled.


Bilgisayarınız uygun işletim sistemi dvd veya usb başlangıç medyası ile başlatın.UEFI Secure Boot sçeneğinin devre dışı olduğundan emin olun.



 Boot from Windows 10 DVD

  • Press SHIFT + F10 to open a command prompt.



 Open a command prompt with SHIFT + F10

  • Replace the file utilman.exe with cmd.exe. Before you do this, you should make a copy of utilman.exe so that you can restore it later. Note that you can only restore this file if you boot again from the Windows DVD.
move c:\windows\system32\utilman.exe c:\windows\system32\utilman.exe.bak
copy c:\windows\system32\cmd.exe c:\windows\system32\utilman.exe






  • Replace utilman.exe with cmd.exe

    • After you have replaced utilman.exe successfully, you can remove the DVD and restart your problematic Windows 10 installation:

    wpeutil reboot
    Reboot Windows 10
    • On the Windows 10 sign-in page, click the Utility Manager icon.

    Click Utility Manager icon
    • Since we replaced the Utility Manager with the cmd.exe, a command prompt should open now. Don’t worry about the error message.

     Command prompt at sign-in page


    • You can now add a new user with the command below. We also have to add the user to the administrator group so that we regain full control of our Windows installation. Replace <username> with the account name of your choice. Note that the account name must not exist on this Windows installation. Don’t let the Windows 10 screen saver distract you.

    net user <username> /add


    net localgroup administrators <username> /add


    Add a new user and adding the user to the administrator group
    • Click the screen to make the sign-in page appear again. Your new account should show up, and you can sign in without a password.
    Sign in with a new local account
    • You can now access the files associated with your Microsoft account in the C:\Users folder.
    Users folder
    • If you worked with a local account instead of a Microsoft account, you can reset your password in Computer Management. Right-click the Start button, select Computer Management, and navigate to Local Users and Groups. Right-click your local account and select Set Password.
    Reset Windows 10 password
    A shorter way to reset the password of a local account is to replace the first command in step 6 with the following command. (In this case, you don’t need to create a new user.)

    Share:

    31 Temmuz 2015 Cuma

    GPO ile Local Administrator Şifresi Değiştirme ve Enable Yapma

    strComputer = "."
    Set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user")
    objUser.SetPassword "Yeni Şifre"
    objUser.AccountDisabled = False
    objUser.SetInfo

    Yukarıdaki kodu logo.vbs adıyla kaydedin. Ardından Sysvol dizinine dosyayı kopyalayın.

    Son olarak aşağıdaki sıra ile GPO oluşturup, ilgili bilgisayar gruplarınızı bu GPO ile ilişkilendirin.


    Resimler yalnızca GPO 'nun nasıl oluşturulacağına dair bilgi vermek içindir.
    Image of start of process to create GPO

    Image of Scripts (Logon/Logoff) window

    Image of Logon Properties

    Image of dropping script into Logon script folder


    Share:

    7 Temmuz 2015 Salı

    Fast reporta dışarıdan sorgu ekleme

    Bu makalemizde fastreportta oluşturulan raporlara exe’ye müdahale etmeden AdoQuery ile yeni alanlar eklemekten bahsedeceğim
    örneğin yazdığınız programda bir çok alanı öngörerek sorgunuza eklediniz ve harika çalışıyor hatta son kullanıcınında dizayn edebileceği bir yapı kurdunuz kendisi sağa sola çekiyor renkleri değiştiriyor istediği gibi dizayn edebiliyor ancak o da ne ihtiyacı olan bir alanı bulamıyor ve sizinde gözünüzden kaçmış bunun için sizin sorguya ilave etmeniz ve yeni bir exe göndermeniz gerekiyor bir çuval

    incir berbat oldu yarın başka bir müşteri başka bir alan istemeye başladı vs.vs. bunun için yapmanız gereken püf nokta sorgunuza anahtar alanları eklemeyi unutmamış olmanız yeterli ve sonrasında fast report dizayn ekranında kod kısmını kullanarak
    ihtiyacınız olan alanları join edebilirsiniz
    basit bir örnek vereceğim
    fr1de görüldüğü gibi yeni bir memo ekliyoruz ve memo seçili iken




    fr2 onbeforeprint eventına çift tıklayak kod kısmının açılmasını sağlıyoruzdaha sonra data kısmına girerer bir  adoconnection ve bir adoquery ekliyoruz ve bağlantı ayarlarımızı yaparak
    kod kısmına geri dönüyoruz


    fr3resimdeki sorguyu datasette olan bir alan ile join ederek yeni memoları ihtiyacınıza göre kullanıyoruz
    umarım ihtiyaç sahibi arkadaşlara faydalı olacaktır.

    Bu Yazı : http://www.mustafasoy.com.tr 'den alınmıştır.
    Share:

    Blog Arşivi