sql server 2008 windows authentication add user from another pc - windows-7

I want to connect to a database server on another computer (on the same network) using Windows 7. I have SQL Server 2008 r2 running on win 7 as a server, and the clients are PCs running Win 7 or XP.
When I want to add the user to the server computer, the server can't change the location to search the user because there's no other location available beside the server. What do I need to configure to get this done?
P.S. SQL authentication is not an option because I'm using filestream. Thanks!

You will have to use mixed mode authentication (also known as SQL Server Authentication) if you are not connected to a domain. You can find more details on TechNet: http://technet.microsoft.com/en-us/library/ms144284.aspx

FYI: Make sure your database Server Authentication is SQL Server and WindowsAuthentication mode and you SQL Server Management Studio.
To set up SQL Server and Widows Authentication Mode.
Connect to you SQL Server Instance
Right Click the go to properties
Choose Security on Select a Page Container
Then Choose SQL Server and Widows Authentication Mode on Server Authentication.
Click OK
Regards

Related

How can I run my project on client pc without installing SQL server on client pc

I have developed a c# windows application which uses SQL server 2012 database in Visual Studio 2015 which is running well on my pc.
I am to install this application on a number of computers without SQL server installed on it, but when I run the application, its gives me database connection error.
My question is, how can I create the setup file to be able to run the app on those clients pc without installing SQL server on all those computers. Please I need your help.
Thank you.
Am Emmanuel.
Use an Azure database and have the clients connect to that.
Have a look at https://azure.microsoft.com/en-us/services/sql-database/
Alter your application connection string and make sure you keep the connection string secret.
Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;User ID=mylogin#myserver;Password=myPassword;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True;
An important fact is that the clients need to allow communication via port 1433.
If this is not an option create an API application and query the database via that.
If you need a private database per client you can use a database file and connect to the file
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15
Update based on reply
You can create a pop-up on the application allowing the users to add valid settings and credentials when your appsettings.json is blank or "a test connect" to the database fails.

TFS could not connect to database. Login field

I am getting the following error. Cannot solve.New to TFS. Please help.
TF246017: Team Foundation Server could not connect to the database. Verify that the server that is hosting the database is operational, and that network problems are not blocking communication with the server.--> login failed. Login from untrusted domain and cannot be used with windows authentication.
If you open SQL Server Manager on your TFS Server application tier using "runas" to open it under the same credentials that you expect TFS to use you should be able to diagnose more:
1) install SQL Server Manager on TFS AppTier
2) right-click on the SQL Server Manager icon and select 'run-as' ( you may need to hold alt)
3) enter the TFS Service (refer to TFS Installation Guide) credentials to open
4) try to connect to your SQL Server
If you cant connect verify that SQL is installed where you think it is and that there are no firewall issues for the standard SQL ports.

Cannot connect to AWS EC2 instance in Visual Studio

I have an AWS server (MS SQL SERVER EXPRESS 2008 R2 with IIS), with an elastic IP of 54.214.8.111, security groups configured with HTTP, MS SQL and FTP, and I can connect to the remote virtual machine using the rdp file that amazon gives you in the console.
However when I try to connect via visual studio to test if the database is working, it gives me a "Login failed for user 'dbuser' error. I have a user called dbuser on my SQL Server (on the server side of course) with full access permissions etc. I also cannot connect to an ftp on the server, despite all guides and help doc. Something seems to be simply blocking my connection. I have tried the same thing on multiple computers.
Everything seems to be configured correctly except I suspect the server instance.
Can anyone help? PS I'm fairly new to web development, this is my first AWS EC2 server.
[UPDATE] I just tried to create a new instance in a different location, same thing, maybe I don't know how to configure the SQL Server on the EC2?
It appears that by default EC2 SQL instances have SQL authentication disabled.
In SQL Management Studio, connect as the built in Administrator account, then go to
Server Properties>Security>
Under Server Authentication, change to "SQL Server and Windows Authentication Mode"
Restart SQL
Your local accounts should now work
Try running in elevated mode (right click Visual studio and run as Administrator), solved some issues I was having recently.

How do I authenticate to a SQL Server database on a domain from a virtual machine off the domain?

I am supporting a .NET 4.0 (Visual Studio 2010) web application that authenticates to a SQL Server 2008 database which resides on my work intranet. The application authenticates to the database using windows authentication. Thats all fine and dandy if Im developing on my host, but I am developing on a virtual machine that is not on the work domain. Thus when the project build and runs, it throws a SqlClient.SqlException
"Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."
Short of developing on my host and abandoning the VM, what can I do to avoid this error and successfully authenticate to the database so I can build/run the web app? I am willing to store my credentials somewhere locally, though preferably not somewhere that would be under TFS source control (like the web.config) because I couldnt keep the file checked out since there are other developers on the project.
I have tried running Visual Studio as a different user (as the user on my work domain) but I get a "unknown user name or bad password" error.
Note, adding the Virtual Machine to the domain (or connecting to it via VPN) are not options. The VM must remain off the domain. Also note, the virtual machine is running on the computer that is on the domain, and the VM uses a shared connection. So it CAN access the intranet but it can't perform windows authentication to SQL Server.
You can run Visual Studio (or SQL Server Management Studio) as the user on the domain. The trick is, you have to use the “/netonly” option of the “runas” Windows tool, so that you can run as a domain user on a non-domain machine.
Namely, in a command prompt you run this command (filling in your own criteria):
runas /netonly /user:<Domain>\<User_Name> "<Your_Program.exe>"
Alternatively, you can create a shortcut on your desktop, and set this command as the shortcut target. Upon running the shortcut/command, you enter your credentials when prompted and visual studio (or whatever program you like) will run as the domain user.
Join the domain using vpn connection if possible. Vpn can connect you with specific domain credentials. Alternative would be connecting using SQL Server Authentication if SQL Server is configured with mixed authentication.
From what I understand, you have several options:
You could add a user account to the SQL db to allow password authentication
Have the VM join the domain
Create an SSH tunnel to the host SQL server port

AppFabric Installation Problem

Hoping someone else has already encountered this and has a solution...
I'm trying to install the AppFabric Beta 1 caching service, on a virtual Windows Server 2008 (CacheServer1). My cache configuration information will be held in a SQL Server database on a separate server (SQLServer). As AppFabric only supports Integrated Security for SQL Server, both servers are in the same domain, and I'm installing using an account that has db_owner rights to my VelocityConfig database.
When I run the AppFabric installer and get to entering the connection string for my SQL server, I put in the server name, but when I click the combo box to get the list of databases from the server, it thinks for a minute and then I get a timeout error.
Both servers can ping each other, and I've created a .UDL file on CacheServer1 under the same user, which can connect successfully to SQLServer and retrieve a list of databases.
Can anyone suggest what I need to do to get the installer to succeed?
The solution I found to this was to install the SQL 2008 Client Connectivity bits on CacheServer1, once this was installed I could get a list of databases. Still can't get AppFabric to install successfully but that's another problem for another question I think...
To ensure that there is no network/DNS issues, can you try the following:
1. Use IP address instead of hostname.
2. Are you able to connect to sql server via sql server mgmt studio running on CacheServer1?

Resources