Skip to main content

Fix: "Cannot connect to remote server" - login failed for user ''. the user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error 18452)

How to access to the local SQL Server through either SQL or Windows Authentication | Cannot connect to remote server" - login failed for user ''. the user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error 18452). 


In this post, let's learn how to connect the SQL Server available in different domain through Windows Authentication from Microsoft SQL Server Management Studio and that way we will learn how to fix the error "cannot connect to remote server", "login failed for user ''. the user is not associated with a trusted sql server connection. (Microsoft SQL Server, Error 18452).

We could connect to the local SQL Server through either SQL or Windows Authentication. Some times we may need to access the SQL Server that is hosted in the different domain, then a common approach could be using SQL login only, because local credentials would get fail with Windows authentication across the domains and there is no option to input the required credentials to access the external domain.


You may get this error when you try to connect,


=========================================================
Advertisement: Choosing .NET Core Worker Services OR Windows Services?

=========================================================



I was not able to find an appropriate solution form simple Googling, however, I found a solution from my research in MSDN documentation.

Connectivity can be achieved by using RUNAS command with below steps,

Step 1: Run the Command Prompt
Step 2: Execute below command with OTHERDOMAIN\USERID details

RUNAS /user:OTHERDOMAIN\USERID /netonly "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"

That’s it. Now you can connect the SQL Server that hosted in the different domain through Windows Authentication.

Happy Learning!

Comments

Anonymous said…
It is appropriate time to make some plans for the long run and it is time to be happy.
I have read this publish and if I may I desire to recommend
you some attention-grabbing things or tips.
Perhaps you could write subsequent articles regarding this article.
I desire to learn even more things about it!
My webpage > easy diets that work
Anonymous said…
cool work. I learned a whole lot, article even more inside the future.
appearing forward to hearing more.

Take a look at my web page ... network and computer security ()
Anonymous said…
It's great that you are getting thoughts from this paragraph as well as from our argument made at this
place.

Also visit my blog :: magento themes

Popular posts from this blog

Fix: "Cannot set a credential for principal 'sa' . (Microsoft SQL Server, Error: 15535)" and “User is not associated with a trusted sql server connection" Errors

Recently, I had happen to struck with the following errors when I tried to reset the SA password through the SQL Server 2008 R2 Express. " Cannot set a credential for principal 'sa' . (Microsoft SQL Server, Error: 15535) " and then, “ User is not associated with a trusted sql server connection " From my research I have found the solution and that perfectly worked in SQL management studio. Hence, I thought of sharing my findings with others. ========================================================= Advertisement: Choosing .NET Core Worker Services OR Windows Services? ========================================================= Steps to reset the password in SQL Server 2008 R2 Express and fix for the errors: Step 1. Go to SQL Server Instance -> Properties/Security tab and change the mode to SQL Server authentication mode. Step 2. Go to Security/Logins, then open 'sa' login properties,          a. Uncheck the "Enforce passwor...

How to Implement Lombok in IntelliJ for Java Projects: A Step-by-Step Guide

Lombok in IntelliJ for Java Projects Implementing Lombok in your Java project can streamline your code by reducing boilerplate. Follow these steps to set up Lombok in IntelliJ: Step 1 :  Ensure Java SDK Version. Ensure that your project is using Java 8 or higher.  You can check and set the Java SDK version in pom.xml: XML <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> Step 2 : Add Lombok Dependency to pom.xmlOpen the pom.xml file in your project. Add the following Lombok dependency inside the <dependencies> section: XML <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.24</version> <scope>provided</scope> </dependency> Step 3 : Download Lombok Plugin for IntelliJ IDEAGo to File > Settings (or press Ctrl+Alt+S). Navigate to Plugins. Search for Lombo...

How to create a GenAI Talking Avatar ChatBot using Streamlit and Anthropic Claude LLM Model

GenAI Talking Avatar ChatBot   using Streamlit and Anthropic Claude LLM Model GenAI-Talking-Avatar-Chatbot is a web application that allows users to interact with an AI-powered talking chatbot with a static avatar. The chatbot uses AWS Bedrock for generating responses and Google Text-to-Speech (gTTS) for voice output. The backend is built with FastAPI, and the frontend uses Streamlit for the user interface. Features API Backend (api.py) Provides an API endpoint to handle chat requests. Uses AWS Bedrock to generate AI responses in a specified JSON format. Ensures the responses include the message, avatar expression, and voice tone. Includes a health check endpoint to verify the API status. Chat UI (chat_frontend.py) Chat Interface: Provides a chat interface where users can input their queries and receive responses from the AI assistant. Avatar Display: Displays an avatar that changes expressions based on the AI assistant's responses and actions (e.g., thinking, speaking). AI Respons...