I would like to connect SQl server DB in VM using my local sql server management studio.
What should I need for server name ? Can I use my server Windows authentication for VM in my local ?Answer1:
Create an empty text file on your VM and give it extension .udl<br /> Doubleclick on it now you can set the properties easy from combobox<br /> Adjust the properties and click on "test connection" until it works
Now open the file in notepad and there you see a complete connection string.
Note that for SQL Server authentication you need to configure the protocol in SQL Server Configuration ManagerAnswer2:
When you are in Management studio on your local machine, you will need the hostname or IP address of the VM.<ul><li>For Windows Authentication, you will need an account on the local domain that both your workstation and the database VM are connected to. <ul><li>For SQL server authentication, you will need an account in the SQL Server instance.</li> </ul></li> </ul>
In both cases, security will need to be configured and associated with your account.
Are you on a domain, or is this just a private server?Answer3:
Use name of the VM where SQL server is running.<br /> And yes, you can use Windows authentication. Depending on your domain settings.
This will help you <a href="https://msdn.microsoft.com/en-us/library/aa337562(v=sql.105).aspx" rel="nofollow">How to: Create a SQL Server Login</a> It is not much difference from SQL login.<br /> And if you are in Administrators group on machine running SQL Server, then your login already should be included.
And if your machine with Management Studio and server with SQL Server are in different domains, then you will need to run Management Studio under different account
runas /netonly /user:domain\username "c:\path\ssms.exe"
See <a href="https://www.mssqltips.com/sqlservertip/3250/connect-to-sql-servers-in-another-domain-using-windows-authentication/" rel="nofollow">Connect to SQL Servers in another domain using Windows Authentication</a>