Showing posts with label microsoft. Show all posts
Showing posts with label microsoft. Show all posts

Tuesday, March 7, 2023

Allow MSSQL server to be accessed from a network | How To

 To allow MSSQL server to be accessed from a network, you need to perform the following steps:


Enable TCP/IP protocol on your MSSQL server:

Open SQL Server Configuration Manager

Expand SQL Server Network Configuration

Select "Protocols for MSSQLSERVER"

Right-click on "TCP/IP" and select "Enable"

Restart the MSSQL service for changes to take effect

Configure the Windows Firewall to allow incoming traffic on MSSQL port:


Open Windows Firewall with Advanced Security

Click on "Inbound Rules"

Click on "New Rule"

Select "Port" and click "Next"

Select "TCP" and enter the MSSQL port number (default is 1433)

Select "Allow the connection" and click "Next"

Select the appropriate network profile and click "Next"

Enter a name for the new rule and click "Finish"

Enable SQL Server Authentication:


Open SQL Server Management Studio

Right-click on the server instance and select "Properties"

Select "Security"

Under "Server Authentication", select "SQL Server and Windows Authentication mode"

Click "OK"

Create a login account for remote connections:


In SQL Server Management Studio, expand "Security"

Right-click on "Logins" and select "New Login"

Enter the login name and password for the new account

Under "Server Roles", select "sysadmin"

Click "OK"

After completing these steps, your MSSQL server should be accessible from other computers on the network using SQL Server Management Studio or other MSSQL client tools.


#MSSQL

#howto

#microsoft

#follow365

Monday, February 27, 2023

Microsoft SQL server tuning tips


1. Use the SQL Server Index Tuning Wizard: The Index Tuning Wizard is a tool that helps optimize query performance by suggesting indexes that you can create to improve the performance of your queries. 2. Use Query Store and Query Performance Insights: Query Store and Query Performance Insights are two new features of SQL Server that allow you to quickly identify and troubleshoot query performance issues. 3. Use good naming conventions: Use good naming conventions for your tables and columns to make it easier to read and understand your queries. 4. Ensure your query is using the right indexes: Make sure your query is using the right indexes to improve query performance. 5. Use query hints to override query optimization: Query hints are a way to override the query optimization process and force SQL Server to use a specific index or join type. 6. Use stored procedures instead of ad-hoc queries: Stored procedures can improve query performance by caching the query plan and reducing the amount of time it takes for the query to execute. 7. Monitor and troubleshoot long-running queries: Monitor long-running queries and troubleshoot them to improve performance. 8. Optimize your server hardware: Make sure your server hardware is optimized for the type of queries you are running. 9. Monitor and tune blocking: Monitor and tune blocking to prevent queries from being blocked. 10. Use the latest version of SQL Server: Always make sure you are running the latest version of SQL Server to take advantage of the latest performance enhancements.