Below are the code for read tnsname.ora file(tns name) in vb.net. Through below functions you can get the information of the tns.
//Declare namespace Imports System Imports System.Collections.Generic Imports System.Text.RegularExpressions Imports System.IO Public Class ReadTNS //Function for Load TNS Name Public Function LoadTNSNames() As List(Of String) Dim DBNamesCollection As New List(Of String)() Dim regPattern As String = "[\n][\s]*[^\(][a-zA-Z0-9_.]+[\s]*" Dim tnsNamesOraFilePath As String = GetPathToTNSNamesFile() If Not tnsNamesOraFilePath.Equals("") Then ' Verify file exists Dim tnsNamesOraFile As New FileInfo(tnsNamesOraFilePath) If tnsNamesOraFile.Exists Then If tnsNamesOraFile.Length > 0 Then 'read tnsnames.ora file Dim tnsNamesContents As String = File.ReadAllText(tnsNamesOraFile.FullName) Dim numMatches As Integer = Regex.Matches(tnsNamesContents, regPattern).Count Dim col As MatchCollection = Regex.Matches(tnsNamesContents, regPattern) For Each match As Match In col Dim m As String = match.ToString() m = m.Trim() DBNamesCollection.Add(m.ToUpper()) Next End If End If End If Return DBNamesCollection End Function //Function for Get path of TNS File Private Shared Function GetPathToTNSNamesFile() As String Dim systemPath As String = Environment.GetEnvironmentVariable("Path") Dim reg As New Regex("[a-zA-Z]:\\[a-zA-Z0-9\\]*(oracle|app)[a-zA-Z0-9_.\\]*(?=bin)") Dim col As MatchCollection = reg.Matches(systemPath) Dim subpath As String = "network\ADMIN\tnsnames.ora" For Each match As Match In col Dim path As String = match.ToString() & subpath If File.Exists(path) Then Return path End If Next Return String.Empty End Function End Class
thank you!
ReplyDeleteMost welcome.
DeleteYou are the best. Thanks a lot.
ReplyDeleteMost welcome, can i do any help to you.
Deleteno deposit bonus forex 2021 - takipçi satın al - takipçi satın al - takipçi satın al - tiktok takipçi satın al - instagram beğeni satın al - instagram beğeni satın al - google haritalara yer ekleme - btcturk güvenilir mi - izlenme-satin-al.com - numarasmsonay.com - borsagazete.com - takipcisatinals.com - izlenme-satin-al.com/youtube - google haritalara yer ekleme - altyapısız internet - mikrofiber havlu - forexbonus2020.com - tiktok jeton hilesi - tiktok beğeni satın al - microsoft word ücretsiz indir - misli apk indir - binance güvenilir mi - takipçi satın al - mikrofiber havlu - uc satın al - takipçi satın al - takipçi satın al - finanspedia.com
ReplyDeleteinstagram takipçi satın al
ReplyDeleteinstagram takipçi satın al
takipçi satın al
instagram takipçi satın al
instagram takipçi satın al
takipçi satın al
instagram takipçi satın al
aşk kitapları
tiktok takipçi satın al
instagram beğeni satın al
youtube abone satın al
twitter takipçi satın al
tiktok beğeni satın al
tiktok izlenme satın al
twitter takipçi satın al
tiktok takipçi satın al
youtube abone satın al
tiktok beğeni satın al
instagram beğeni satın al
trend topic satın al
trend topic satın al
youtube abone satın al
beğeni satın al
tiktok izlenme satın al
sms onay
youtube izlenme satın al
tiktok beğeni satın al
sms onay
sms onay
perde modelleri
instagram takipçi satın al
takipçi satın al
tiktok jeton hilesi
pubg uc satın al
sultanbet
marsbahis
betboo
betboo
betboo
instagram takipçi satın al
ReplyDeleteucuz takipçi
takipçi satın al
https://takipcikenti.com
https://ucsatinal.org
instagram takipçi satın al
https://perdemodelleri.org
https://yazanadam.com
instagram takipçi satın al
balon perdeler
petek üstü perde
mutfak tül modelleri
kısa perde modelleri
fon perde modelleri
tül perde modelleri
https://atakanmedya.com
https://fatihmedya.com
https://smmpaketleri.com
https://takipcialdim.com
https://yazanadam.com
yasaklı sitelere giriş
aşk kitapları
yabancı şarkılar
sigorta sorgula
https://cozumlec.com
word indir ücretsiz
tiktok jeton hilesi
rastgele görüntülü sohbet
erkek spor ayakkabı
fitness moves
gym workouts
https://marsbahiscasino.org
http://4mcafee.com
http://paydayloansonlineare.com
takipçi satın al
ReplyDeletetakipçi satın al
takipçi satın al
smm panel
ReplyDeletesmm panel
faturalı hatta kredi
faturalı hatta kredi
instagram takipçi satın al
binance komisyon indirimi
binance indirim kodu
instagram takipçi satın al
tiktok jeton hilesi
seo fiyatları
ReplyDeletesaç ekimi
dedektör
instagram takipçi satın al
ankara evden eve nakliyat
fantezi iç giyim
sosyal medya yönetimi
mobil ödeme bozdurma
kripto para nasıl alınır
instagram beğeni satın al
ReplyDeleteyurtdışı kargo
seo fiyatları
saç ekimi
dedektör
fantazi iç giyim
sosyal medya yönetimi
farmasi üyelik
mobil ödeme bozdurma
bitcoin nasıl alınır
ReplyDeletetiktok jeton hilesi
youtube abone satın al
gate io güvenilir mi
referans kimliği nedir
tiktok takipçi satın al
bitcoin nasıl alınır
mobil ödeme bozdurma
mobil ödeme bozdurma
MMORPG
ReplyDeleteİNSTAGRAM TAKİPÇİ SATİN AL
tiktok jeton hilesi
Tiktok jeton hilesi
Sac Ekim Antalya
Instagram takipci satin al
İnstagram Takipçi Satın Al
mt2 pvp serverler
İnstagram Takipçi Satin Al
Smm panel
ReplyDeletesmm panel
iş ilanları
İnstagram Takipçi Satın Al
hirdavatciburada.com
beyazesyateknikservisi.com.tr
servis
tiktok jeton hilesi
Success Write content success. Thanks.
ReplyDeletecanlı slot siteleri
kralbet
betturkey
kıbrıs bahis siteleri
betpark
deneme bonusu
canlı poker siteleri