Find Domain Name Using T-SQL | SansSQL

Monday, November 17, 2008

Find Domain Name Using T-SQL

DECLARE @Domain varchar(100), @key varchar(100)

SET @key = 'SYSTEM\ControlSet001\Services\Tcpip\Parameters\'
EXEC master..xp_regread @rootkey='HKEY_LOCAL_MACHINE', @key=@key,@value_name='Domain',@value=@Domain OUTPUT
SELECT 'Server Name: '+@@servername + ' Domain Name:'+convert(varchar(100),@Domain)

Alternative ways,
1. SELECT DEFAULT_DOMAIN()
2. EXEC Master.dbo.xp_LoginConfig 'Default Domain'

78 comments:

Anonymous said...

Worked for me. Thank you.
(Nice site)

Paul Goldy said...

Thanks Sandesh. Very helpful SQL.

Paul Goldy said...

Thanks Sandesh. Very helpful SQL.

ArdentAj said...

When I tried this query it is throwing up Access Denied error.I think DBA haven't granted access for registry variables.

So is there any another way I can get Full computer name

Sandesh Segu said...

You can try either of the below queries

SELECT DEFAULT_DOMAIN()

EXEC Master.dbo.xp_LoginConfig 'Default Domain'

mtom said...

I do trust all of the ideas you’ve introduced for your post. They’re very convincing and will definitely work. Still, the posts are very short for beginners. May you please prolong them a bit from next time? Thank you for the post. Premium Domains

MtomSEO said...

Gnarly article mate, keep the good work, just shared this with ma friendz website design company

MtomSEO said...

I’m really impressed with your writing skills as well as with the layout on your blog. Is this a paid theme or did you customize it yourself? Either way keep up the excellent quality writing, it is rare to see a great blog like this one these days.. top web design companies

Anonymous said...

just couldn’t leave your web site before suggesting that I really loved the standard information a person provide for your visitors? Is gonna be again ceaselessly to check up on new posts web design

jacob olivia said...

Hi there! Do you use Twitter? I’d like to follow you if that would be ok. I’m undoubtedly enjoying your blog and look forward to new posts. web designer

khanabaaz said...

I totally understand what you have explained. Actually, I browsed throughout your several other content articles and I do believe you are absolutely correct. Congrats with this particular blog. ipad psd

Unknown said...

Hey i’m for the first time here. I came across this board and I find It seriously helpful & it helped me out much. I hope to give something back and aid others as you aided me. android phone template

relxindo said...

I like this website very much, Its a very nice post to read and find information. naveed ahmed poetry

Mark weins said...

Loving the information on this site, you have done outstanding job on the content . webflow design agency

Stream Line said...

Subsequently, after spending many hours on the internet at past We’ve uncovered anyone that certainly does know what they are discussing thank you very much wonderful blog post webflow experts

Unknown said...

I am impressed with this website , rattling I am a fan . webflow developers

Unknown said...

wonderful post. Ne’er knew this, regards for letting me know. webflow company

Hetuwa Duminda said...

I like this website because so much useful material on here : D. web developer company

mtom said...

After study several of the blog articles for your internet site now, and i also genuinely such as your strategy for blogging. I bookmarked it to my bookmark internet site list and are checking back soon. Pls take a look at my web page in addition and tell me what you believe. nba중계



----------------------------------------------------------------------------------------------------------------------------


Wow, superb blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is magnificent, as well as the content! mlb중계

sdexter said...

After study a few of the blog posts on your website now, and I truly like your way of blogging. I bookmarked it to my bookmark website list and will be checking back soon. Pls check out my web site as well and let me know what you think. ui/ux design agency

sdexter said...

Thank you for an additional great post. Exactly where else could anybody get that kind of facts in this kind of a ideal way of writing? I have a presentation next week, and I’m around the appear for this kind of data. ui ux design

seo said...

I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. renewing a domain name

Anonymous said...

I think I have never seen such blogs ever before that has complete things with all details which I want. So kindly update this ever for us. 2000 company names

Huongkv said...

Aivivu chuyên vé máy bay, tham khảo

vé máy bay đi Mỹ giá bao nhiêu

giá vé máy bay từ mỹ về việt nam tháng 12

lich bay tu duc ve viet nam

chuyến bay từ nga về việt nam hôm nay

mua vé máy bay từ anh về việt nam

chuyến bay từ Paris về Hà Nội

khách sạn cách ly

chuyến bay chuyên gia trung quốc

Anonymous said...

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates. visit this site

Anonymous said...

Actually I read it yesterday but I had some thoughts about it and today I wanted to read it again because it is very well written. go there

yousuf said...

i have a brother that is autistic and we love him so much and gave all of our support on him., how much data does netflix use

Jone Martin said...

Some developers had a face for suggesting the domain. Now they can get domain names easily. Moreover, In CA, peoples are busy in their busy life, They do have not time for cleaning, So I will provide them Cleaning Services in Sacramento CA. I want to relieve them through my service.

Sabreezz Home Inspection said...

T-SQL is very helpful for finding the best domain name. I like your post. You deliver the best solution. Further, The garage door repair Kennesaw present the outstanding work.

Jone Martin said...

Birthday Party in Dubai | Website Link | Website Link

benstoke said...

Today every business need a right place for web hosting to own web site. We hosting a place where you easily promote your own cheap website hosting with affordable cost. In fact, our hosting services very reliable for your requirement.

yousuf said...

After study a number of the content on your own web site now, and i truly much like your means of blogging. I bookmarked it to my bookmark site list and are checking back soon. Pls consider my internet site at the same time and let me know what you consider. educationspike

yousuf said...

There is noticeably big money to learn about this. I assume you have made certain nice points in functions also. cyber techyt

yousuf said...

hello, i came in to learn about this topic, thanks alot. will put this site into my bookmarks. unique auto mag

ASAF said...

I’m sure we have a trouble with your blog working with Firefox internet browser. RGray agency

ASAF said...

Cool blog. Maybe i can help you in writing fresh content, are you interested ? ico marketing agency

SEO said...

I really enjoy the article. Awesome. เล่นคาสิโนสดไม่ผ่านเอเย่นต์บนมือถือ

SEO said...

Thanks a lot for the post.Really looking forward to read more. Awesome. ทางเข้าสล็อต 50 บาทฝากไว1วิ

SEO said...

Wow, great blog.Thanks Again. Great. ทางเข้าPG SLOT 50 บาท 2022

jackman10 said...

Now, if you want to catch your friends' attention with your new holster, make sure that you choose the best design and style. Buy firearms Online

SEO said...

Im obliged for the blog.Thanks Again. Much obliged. ´ºËŽÄÄÑeÙI £¬

yousuf said...

I believe, to make the agents with references to: generic people will want a feeling of responsibility; middle-level workforce have each of those feelings of obligations but probably self-motivated; and additionally middle management of one’s businesses important might be the acknowledgement concerning numbers, as well as corporation obtain together with the advancement of employment center. crpf in pay slip

jackman10 said...

As you can see, there are myriad opportunities in the modeling world. However, it is hard work. Like most other things in life, there is no guarantee of success. It depends on your looks, luck, demeanor, personality, hard work, perseverance, and a burning desire to succeed, among other things. Celina Landari

markpapi said...

But that could change in the future Ottenere facile patente categoria BE a Cesena
Acquista patente BE gratuito Pesaro
ottenere patente BE rilasciata a leccese

jackman10 said...

Of course, even if an athlete takes steroids, if he doesn't take action or have the right mindset - he's not going to win. BEST LEGAL ANABOLIC STEROIDS FOR SALE

SEO said...

Im thankful for the article post.Really looking forward to read more. Much obliged. buy instagram likes

SEO said...

Great, thanks for sharing this blog post.Really looking forward to read more. Will read on... smm cheap panel

SEO said...

I value the blog article.Really looking forward to read more. Really Great. เล่นมวยพักยก

SEO said...

Looking forward to reading more. Great article post.Really thank you! Much obliged. แทงบอลออนไลน์

markpapi said...


servizi e forniture a qualsiasi titolo Acquista la CQC a Syracuse
Acquistare Trento CQC a europea
Compra online CQC a Forlì

SEO said...

Thanks so much for the article post.Much thanks again. Really Cool. BBIN เกมคาสิโน

SEO said...

Glad to see you’re on top of things. You sound like you understand what you’re talking about! Thanks and good luck! Have a nice day! how the Instagram algorithm works in 2022

SEO said...

A round of applause for your post.Much thanks again. Will read on... 918kiss

SEO said...

Great, thanks for sharing this article. Keep writing. cheap reseller panel

SEO said...

Great blog.Really looking forward to read more. Cool. smm cheap panel

SEO said...

Thank you for your blog post.Much thanks again. Really Cool. buy instagram likes

SEO said...

Fantastic article. Cool. メールレディ

SEO said...

I think this is a real great post.Really looking forward to read more. Awesome. spotify reseller panel

jackman10 said...

Youre so cool! I dont suppose Ive read anything like this just before. So nice to get somebody with some original thoughts on this subject. realy appreciate starting this up. this amazing site can be something that is required over the internet, someone if we do originality. helpful work for bringing new stuff for the world wide web! elf sex doll

jackman10 said...

gaming computers should have multiple cpu cores and a lot of memory to support those heavy graphics“ Immobilien Werlte

SEO said...

A big thank you for your article post.Thanks Again. Fantastic. a course in miracles

SEO said...

Say, you got a nice blog post.Really thank you! Really Great. situs slot online

SEO said...

I really liked your article.Thanks Again. Really Cool. เว็บเกมสล็อต

SEO said...

Thank you for your blog.Really thank you! Cool. how the Instagram algorithm works in 2022

SEO said...

Very neat blog article.Much thanks again. Cool. best smm panel

SEO said...

Great, thanks for sharing this blog article.Thanks Again. Cool. buy tiktok likes

jackman10 said...

I think this is one of the most vital information for me. And i’m glad reading your article. But wanna remark on some general things, The web site style is wonderful, the articles is really nice : D. Good job, cheers el mejor tarot del amor gratis

jackman10 said...

we always keep track of our family tree because it is exciting to know the family tree- تزويد متابعين انستاجرام

SEO said...

I am so grateful for your blog. Really Great. Slot Gacor

SEO said...

Im grateful for the article post.Really looking forward to read more. Fantastic. 오션파라다이스 릴게임

SEO said...

A big thank you for your blog post.Really thank you! buy spotify followers

SEO said...
This comment has been removed by the author.
SEO said...

A round of applause for your blog.Really thank you! Fantastic. Sharepoint employee onboarding software

VFMSEO said...

Say, you got a nice blog.Much thanks again. Really Great. The hidden wiki link

VFMSEO said...

Major thanks for the post. Want more. 虛擬貨幣介紹

Micheal Jackson said...

Site going prior to uncovering to you that find hollistic doctor near me
I really esteemed the top quality data you present to your guests? Will be back again conflictingly to pick what is happening with new posts.

rebeka said...

وب سایت فایل برو پی دی اف کتاب اعمال حقوقی قرارداد – ایقاع ناصر کاتوزیان را در 244 صفحه را برای شما دوستان آماده کرده است. در این کتاب پروفسور دکتر فرزانه ناصر کاتوزیان برای درس حقوق مدنی در رشته حقوق در مقطع کارشناسی به تبیین و تدوین رویه های حقوقی شامل قراردادها و قراردادها بر اساس عناوین شورای عالی انقلاب فرهنگی پرداخته است و به گفته خودش این کتاب شش تایی است. بخش حقوق مدنی دارای خلاصه و مقدمه است. مطالعه این کتاب برای دانشجویان رشته حقوق به شدت توصیه می شود و محتوای آن می تواند زمینه ساز درک عمیق حقوق شهروندی به ویژه حقوق مدنی 3، 6، 7 و حتی 4 باشد.با سایت فایل برو همراه باشید.

قواعد عمومی قراردادها کاتوزیان جلد ۱ pdf

قدیمی ترین سایت شرط بندی said...

megashareبا دقت و تجربه، مجموعه‌ ای از سایت‌ های معتبر پیش‌ بینی فارسی را گردآوری کرده تا شما بتوانید با اطمینان کامل، بهترین سایت‌ های شرط‌ بندی ایرانی را انتخاب کنید.

بهترین سایت های شرط بندی ایرانی

Post a Comment

Ads