.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

To find windows domain name and username in sql server

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :Sql Server

Hi experts,

 Any one pls tel  me the query to find the current working domain name with username in sql server.



View Complete Post

More Related Resource Links

SOS: Cannot connect to SQL Server 2005 locally by Windows Authentication DOMAIN \ myname. But networ

Cannot connect to SQL Server 2005 locally by Windows Authentication DOMAIN \ myname. But network connection is successful.   But SQL Server Logins contain   BUILTIN \ Administrators, and                                                    BUILTIN \  Administrators contain DOMAIN \ Domain Admins, and                                                    DOMAIN \ Domain Admins contain DOMAIN \ myname.   Creating SQL Server Login with DOMAIN \ myname entail successful local connection.   Removing SQL Server Login with DOMAIN \ myname and creating SQL Server Login with DOMAIN \ Domain Admins do NOT entail successful connection. Cannot connect! System:   Windows Server 2008. Error 18456

Query to find the domain and username


Hi experts,

 Any one pls tel  me the query to find the current working domain name with username in sql server.



FAST Search Server 2010 Config Error - ValidationException 1034: Username or domain is incorrect.



I've seen other related threads and I've tried all the tricks in getting through the post-setup configuration, but I can't get by the "ValidationException 1034: Username or domain is incorrect." error message taken from the FAST psconfig log. I've tried both the wizard and the psconfig, but get the same results. I'm attempting to deploy the single server (stand-alone) on a single x64 box, under ws2008 SP2, w/SP2010, the server is also the domain controller, and i've been passing the FQDN to the post-setup script as described in the FAST deployment document (see log below):

Verbose [1] PostSetupUI - Displaying next panel :Enter the user name and password
Verbose [1] PostSetupUI - Displaying button set to the default settings
Verbose [1] PostSetupUI - Next button clicked
Verbose [1] PostSetupUI - Starting to process form data of panel :Enter the user name and password
Verbose [1] PostSetupUI - Collecting input parameters from the text input controllers.
Verbose [1] PostSetupUI - Collecting value:dev.devnet.com\fastuser of input parameter: userName
Verbose [1] PostSetupUI - Adding config parameter: userName for the next validation parameter batch
Verbose [1] PostSetupUI - Collecting value of input parameter: password
Verbose [1] PostSetupUI - Adding config parameter: password for the ne

Find URL/URI/Domain in server control and class library


hi Smile

I was develop a DLL file for our website
this DLL is main application in our website.

I want to make it for work on one website

like www.example.com

when copy to another website like www.ooutttgbhjj.com not work

How can i to do this?

Thank you :)

Which Domain Controller is SQL Server using for trusted windows authentication?


We are migrating from Windows Server 2003 domain controllers to Server 2008 Domain controllers.  I want to be able to know which domain controller a SQL server is using for authentication, so I can verify that the 2008 Domain Controllers are working, before we take down the 2003 domain controllers permanently.

I also read something about possibly setting a preferred DC?

Please advise



LDAP - Can't find server


Hey people,

I would like to get a persons name from their username - a common query on forums i know, but i haven't managed to get mine working yet and any help would be appreciated.

I currently have this code that I found here: http://www.vbforums.com/showthread.php?t=612655 (Thanks Chris128)

I have adapted it from VB into VB.net. The page renders but when i enter my username into the Username textBox and hit the submit button (Which calls IsUser) I just get "The specified domain either does not exist or could not be contacted." I have tried lots of other code but I always get this response...

If anyone can help by posting links to a tutorial or another post for code that they know works, i will give it a go.


Imports System.DirectoryServices

Partial Class UserInfo
    Inherits System.Web.UI.Page

    Private Function GetRealNameFromAd(ByVal UsernameToFind As String) As String
        Using searcher As New DirectorySearcher(New DirectoryEntry())
            searcher.PageSize = 1000
            searcher.SearchScope = SearchScope.Subtree
            searcher.Filter = "(&(samAccountType=805306368)(sAMAccountName=" & UsernameToFind & "))"
            Using Results A

Word Automation Issue in Windows Server 2008 Hosting



The problem I am posting here is that I was facing nearly 2 weeks around. Any body comes with this stuff please help.

Word Automation in sample ASP.NET(C#) application.

I am using Microsoft.Office.Inetrop.Word Assembly for automation. Here I am reading a XXX.dot template file and fill the contents with dynamic data.

When i am executing my code in localhost:someportnumber the automation is working fine and I could get expected result and when I am hosting in my inetmgr(Windows XP is my OS) it is also working fine.

But the problem is that when I am hosting in my production server(Windows Server 2008 Standard Edition) I am not able to perform automation and results in the following error.

Data: System.Collections.ListDictionaryInternal
Message: Word has encountered a problem.
Source: Microsoft Word

The code gets failed in the following line:

ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();

Document wordDoc = wordApp.Documents.Add(ref oTemplate, ref oFalse, ref oMissing, ref oMissing); // Error in this line

I cannot able to proceed further. Can anybody please help me in solving this issue?

Thank you.

With Regards,


No ASPNET User in Windows Server 2008?


I have been looking everywhere online regarding this, but have not found a clear answer.


I have an ASP.Net app running on Windows Server 2008, it's basically a reporting app using Crystal Reports. I have encountered a roadblock in regards to rendering some pages. When I run the app in Visual Studio(on the same 2008 machine) everything works perfectly. Yet when I publish it and run it live the reports will not display correctly, I get a message saying Failed to render page.


I looked this error up in the Crystal Reports website and the fixes they have there refer to giving the windows "aspnet" user full access rights to certain folders on the machine. I would be happy to do this, however there is no aspnet user in Windows Server 2008.


I installed the server and set its role to be Web Server. I also checked all the options regarding ASP.Net and IIS 6 compatibility. Yet there is no ASPNET username anywhere.


Did I set the server up wrong? or do I have to do something within ASP.Net to  create this user and then give it rights? 

Not working on Windows Server 2008




I had the CSS friendly adapters working great on our old server (windows server 2003 - 32bit) and now we have moved to a 64 bit environment and now I can not get the CSS friendly adapters to work.

We are using SharePoint 2007.

Is there another work thru for 64bit environment.

I notice windows server 2008 has a directory  C:\Windows\Microsoft.NET\Framework64 would I be using the browser file in this directory???

Please help!

{ End Bracket }: Customize Windows Home Server


Chris Gray discusses custom applications he's developed for Windows Home Server and explores applications for energy savings.

Chris Gray

MSDN Magazine July 2008

Built For Speed: Develop Turbocharged Apps For Windows Compute Cluster Server


This article explores the services provided by Compute Cluster Server 2003 and the tools provided by Visual Studio 2005 that will help you develop High-Perfomance Computing applications.

Rich Ciapala

MSDN Magazine April 2006

Windows Server 2003: Discover Improved System Info, New Kernel, Debugging, Security, and UI APIs


There's a lot to say about Windows Server 2003. First of all, it's the first operating system with built-in .NET Framework support, and it's the first 64-bit OS from Microsoft. But wait, there's more! There are lots of new features and APIs in this version as well. For instance, Windows Server 2003 features Hot Add Memory and a number of other arcane new tidbits. There are new APIs for handling threads, directories, and files, and new features like the low fragmentation heap for managing memory and system information. There's vectored exception handling and new UI APIs as well.OS internals expert Matt Pietrek takes a look at the additions he finds most interesting and useful so you'll have a good place to start when you dive into Windows Server 2003.

Matt Pietrek

MSDN Magazine June 2003

Security Briefs: Exploring S4U Kerberos Extensions in Windows Server 2003


Building Web sites that provide services external to the corporate firewall is tricky. Usually it's not desirable to grant corporate domain accounts to external clients, and from a purely practical standpoint Kerberos does not work well over the Internet due to the typical configuration of client-side firewalls.

Keith Brown

MSDN Magazine April 2003

How can Install Office 2007 on Windows server 2008 R2 64 bit machine in WSS 3.0

I have  64 bit machine  and Windows server 2008 R2 has installed. i have successfully install WSS 3.0  , but  when i tried to install  office 2007 ,  one  error  has  come  "OS is not compatible "  i thought  it was asking  for 64 bit office  2007   and i go through the  google and R&d find no 64 bit office is available ,  i have used   excel .dll in my custom code  so my problem is that   how can  install office 2007  on 64 bot OS 2008 r2  machine .  if anyone can help   me  , please let me know . thanks in advance

Office Sharepoint Server Search not working but Windows Server Search is.

I am having an annoying Issue with the Sharepoint 2007 Enterprise search functionality. I cannot get the Search Centre to work, the out of the box webparts crash the page except the Searchbox when the others are closed. The event viewer shows up numerous Errors (Office Sharepoint Server - EventID 7080) returns with and the same when trying to add a search related web part (e.g. core.results, federated etc). EventID 6398 - Timer is a regular as is 7080. Details below.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified).

Remote connections are connected, I am not 100% on the Instance name, (how would I go about checking this?)

Also I cannot access the link to SharedServices1 - Open Shared Services Admin site (not clickable), guess it's permissions but I seem to have full site permissions, I think I need SSP-Admin to make more edits to the Search, maybe this is related :s

Both Search Servers are runnig, I have tried everything I can think of to fix this and allow the Search Centre to work.

I am running Sharepoint 2007 on SQL Server 2008.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend