.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

Query to find the domain and username

Posted By:      Posted Date: October 26, 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

To find windows domain name and username in sql server


Hi experts,

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



Find SQL Query when report is executed

Hi All, I am using SSRS 2008 R2 verison of reporting services. I have a report and the data source for this report is Oracle 10i, it takes around 2 mins to execute the report. I want to find out the query, which is sent by the reporting services to the Oracle. Is there a way to find it out. Please help me with this. Thanks Vineeshvineesh1701

Display Full Name in SharePoint instead of Domain\Username

My SharePoint 2010 server started displaying the users with the Domain\Username standard instead of using Full Name (as it did up to yesterday). This in all pages of the sites (persmission settings, document libraries, tasks, etc.) Does anybody knows how to force SharePoint to display users with the "full name" standard? Thank you.Plo

"The username is invalid. The account must be a valid domain account."

So I'm at the SharePoint Products Configuration Wizard, I put in the Database Server and name then put in the username and password. It just keeps saying this message after I hit the Next button! :   The username is invalid. The account must be a valid domain account.   What's wrong?

Please help me to find out distinct value from linq to sql query given.

profileuserDataContext db = new profileuserDataContext(); var Q = (from p in db.edufinals join RM in db.edufinals on p.UserName equals RM.UserName where p.name.StartsWith(srcval) select new { p.name, RM.ProfielID, RM.ProfielPic, RM.city }).OrderBy(x => x.name).Distinct().Take(10);//, p.Key.ProfielID, p.Key.ProfielPic, p.Key.city, p.Key.country foreach (var pg in Q.Distinct()) { Response.Write(pg.name); ..................................... .................................... } how to refine this query to get distinct "name" column? Please help me to find out exact value.

The specified user account "domain\username" is a local account. Local accounts should only be used

HI Im getting this error when trying to set a new Service account for my performance point services. SharePoint is installed in a single server enviroment. I can´t get a new service account configured and I think this is causing my server to run slowly. Any help would be highly appreciated thanks

Logon to SharePoint 2010 requires \. Why?

We've installed a fairly large number of small SharePoint 2007 environments. All of these have had their own Active Directory, specified to <domainname>.local. These have been accessible from Internet, and have simply had a external DNS pointingwww.<domain>.com to the server.  In these SharePoint 2007 environments we've used Windows Authentication, and logging on has simply been a procedure of specifying username and password. It has worked just fine. However, in our first SharePoint 2010 environment, we're encountering odd problems. We use here NTLM authentication, and  domain name is <domain>.local. The domain name used in Internet iswww.<domain>.com, which points to the SharePoint 2010 environments frontend server. We'd like to login to the SharePoint environment with simple <username> and password, but it fails. We have to explicitely specify <domain>\<username> and then password to login. Why doesn't this work, and is there any relatively easy way to fix this without disturbing the environment? From logon attempts using simply username, these events appear in the Security event log: Log Name: Security Source: Microsoft-Windows-Security-Auditing Date: 7.5.2010 13:15:01 Event ID: 4625 Task Category: Logon Level: Information Keywords: Audit Failure User: N/A Computer: <COMPUTER>.<

MDX Query - Find only new item that purchased in the last day or during the last week

Hi to all I whould like to write a MDX query to get new items that purchased in the last day and not purchased in the last 7 days or 30 days  , Also to find new items that purchased in the last 7 days and not purchased in the last 30 days , this is what i done until now CREATE   SET CURRENTCUBE.[FindNewWordIn_1_Day]   AS Filter   (nonempty([Keyword].[Keyword Name].members, ([Measures].[Count keyword],   NONEMPTY (Tail( Filter( [Time].[Date].MEMBERS ,   Not IsEmpty ([Measures].[Count keyword]) ), 1) ))) ,([Measures].[Count keyword], [Time].[Date].&[2010-09-10] )=0);   The value of [Time].[Date].&[2010-09-10] should be change to period that i want to check , ( 1 day, 7 day , 30 day)   the other one is lateset day with value NONEMPTY (Tail( Filter( [Time].[Date].MEMBERS , Not IsEmpty ([Measures].[Count keyword]) ), 1) with for you help ,   ofer  

Get system logged In Domain & username

Hi, I got a website with FBA authenication. I  want to get the client machine's domain & username. After lot of goggling I got the thing that if Enable annonymous is Check then it is not possible to get these things and would return "" whatever you try like HttpContext.Current.User.Identity.Name Request.LogonUserIdentity.Name Environment.UserDomainName.   Does anyone knows how to get the client's system domain & username.    

VWD 2010 and Linq to Sql: can't find a query model for...



I have added a linq to sql layer in my MVC 2 application.

This is the code I am using:

using (ProductPortalDataContext ctx = new ProductPortalDataContext())
                var Title = from aps in ProductPortal.Models.AppSettingsView
                            where aps.LanguageID = Lang
                            select aps.WebSiteTitle;

It says to be unable to find a quey model for AppSettings view and then says "where not found".

Tried googling, nothing came up. Tried searching here(first two pages) and nothing that seemed relevant popped up.

But the best of all, created a new ASP.NET applicatio, imported the model using Linq to SQL and it compiled!

No idea what I am doing wrong... hints?

(some time later...)

Ok, I tried adding a button and a label to the asp.net application j

display of username in "domain/user" instead of "surname givenname"



we have a Sharepoint server 2010 running and at the top right of the website the username is showing like domain\username.

The same thing in documentlibraries and lists.

How can I change this to "surname givenname"?


I have configured a userprofilsync with our Domaincontroller and all of our users can be found in the Sharepoint Central Admin User Profils section with the correct Name.



SPView query to find if the current user belongs to a Group


HI All,

I´m trying to write a query for a list view that should return all items if the current user belong to a group. If the user doesn´t belongs to this group, no items should be returned.

So far, I could find many equal examples about using the CAML Membership element in a comparison with an AssignetTo field. But not making a comparison between the current user and a specific Sharepoint Group.

Any suggestions, please?


Find User Password by Username Before Login


hi guys,

I have only username. and want to check and grab the password from the database. It is BEFORE LOGGING IN. so I don't think the build-in asp.net functions could be used, right?

thanks a lot!!

Obtain domain username without requiring authentication


I'm bangin' my head against the wall here.  I'm not even sure what I want to do is possible.

I have developed an ASP.NET app that will only be run on my local network (which incorporates a Windows Domain).  It's running on IIS 7.5.

I want to do this:

Dim username as string = Httpcontext.Current.User.Identity.Name

My problem is this: If I don't turn off Anonymous Authentication and ASP.NET Impersonation, I don't get the results I'm looking for.  (if Anonymous is allowed, I get an empty string returned for username, and if ASP.NET impersonation is allowed, then "username" is always whatever account is associated with impersonation, like "Network Service").  If I turn those off and then turn Windows Authentication on, it works, but only after a dialog box presents itself asking for the Windows Credentials.

What I'm trying to do is NOT require the users to log in.  Since they've already logged into the domain when they signed on their computer, I'd like to just allow them access to the ASP.NET application I've written, and identify who they are (based on their previous Windows login) using the line of code above.  I don't need them to re-authenticate, because they're already a

find situation about a query that it is executing now

Hi all. I am a c# programmer. I have a update query that it need 2 minutes for executing (for each reason). I don't want discuss about its performance. My question is: How can I find situation about a query that it is executing now and it has not executed completely yet. for example How can find my c# code how many records are affected by my query every 10 seconds while that query is executing? Is sql profiler says that to us?

How do find what query is being executed on specific session ID?



I have a SP which writes to a table all processes which are being executed when application decides to stop waiting for results of the query. It works very well but problem is that it does not dump all SPIDs but only some of them which are being executing for a long time. Common pattern that a lot of SPIDs will be blocked by single SPID which will not be part of the output which is being generated. How do I dump all SPIDs and what they are doing along with SP below?


 'blk object' = t1.resource_associated_entity_id,

 (SELECT SUBSTRING(text, t3.statement_start_offset/2 + 1,
 		(CASE WHEN t3.statement_end_offset = -1 
 			THEN LEN(CONVERT(nvarchar(

how to add search for available domain name and find information about specific one ?


Hello All , 

i have a task to add search for available domains and also to find some information about specific one

anyone has any background about how to do that or there is any web services that provide this functionality 

Thanks in advance

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