SQL Server Archives -

Category Archives: SQL Server

How to Enable SQL Server Authentication for your Local Server in SSMS

Posted On December 9, 2021 by Shruti Gupta Posted in Tagged in ,

SQL Server Authentication is used primarily used in Azure Services for accessing data, integration, etc. At start during Installation it is disabled by default. So, in this blog we will see how to enable SQL Server Authentication for your Local Server in SSMS. First open SQL Server Management Studio and Connect to Windows Authentication method which is default. In the Object Explorer, right-click the server and click Properties. On the Security page under Server authentication, select SQL Server and Windows Authentication mode and then click OK. In the Object Explorer, right click your Server and click Restart. Now, Expand the Security folder, right-click on the Logins folder and choose New Login. Enter the login name as “demo” or whatever you wish it to be, then select SQL Server authentication, and enter the Password and untick the Enforce password policy. Click the Server Roles page and enable the sysadmin role. Again Connect to the Data Base Engine, and Select Authentication method as SQL Server Authentication and enter Login details and Click Connect. Now the SQL Server is connected with SQL server authentication.

Share Story :

How to Import/Restore SQL Database (.bak Files) in SQL Server

Posted On December 9, 2021 by Shruti Gupta Posted in Tagged in ,

In this blog we will see how to import/restore SQL Database (.bak) file in SQL Server. If you have a new downloaded .bak file or the Backup of any other database in .bak file format then you can import/restore it in your SQL Server. Open SSMS and Connect to your SQL Server Expand the SQL Server, Right Click on the Database and choose Restore Database In the General settings, Select Device and then the three ellipsis. Click on Add to add the .bak file. Select the file location and then select the .bak file and click OK. Click OK and your Database will be restored.

Share Story :

How to set different connection colors in SSMS

Posted On June 21, 2021 by Jaison Menezes Posted in Tagged in ,

In Microsoft SQL Studio Management Server (SSMS) there is an interesting feature that helps users quickly determine which connection tab they are using currently this can be done by setting custom connection colors in SSMS for different SQL Server nodes. In this blog we are going to see how we can use this feature Open SSMS, and on the Connection to Server window, click the Options button to show advanced options In the Connection Properties Tab select the database from the dropdown on which you intend to apply custom colors on After selecting the database, click on use custom color checkbox and select the desired color. You can select any colors usually I prefer Red color for production databases and green for test databases. Click on Connect button. Restart SSMS As you can see the color green has been applied which means that green color is associated with that database. Thank you for reading my blog, hope it helped !!

Share Story :

Displaying Line Number in SSMS Query Editor

Sometimes while working on large SQL Queries we may face errors. SSMS tells us the line where the error has occurred after the faulty query gets executed but there is no line no. in the Query editor so it is tedious sometimes to fish out these errors. The solution to this issue would be adding line numbers in the query editor, by default this option is disabled. In this blog we will see how to enable line numbers in SSMS. From the toolbar click on tools, then select options. From the window that appears select the Text editor. Now from the text editor click on all languages and enable the line number option. Click on OK button. As you can see the corresponding line numbers are visible. Hope you found this article helpful! thanks for reading.

Share Story :

Use Web Browser along side SQL Query editor

Posted On April 22, 2021 by Jaison Menezes Posted in

Sometimes while writing SQL Queries we would feel the need to refer to the internet for logic, syntax etc. But constant switching between our web browser and SSMS would interrupt our flow while writing queries. This problem can be solved by using SSMS’s inbuilt web browser. It can be accessed pressing CTRL+ALT+R As you click or press the keys a tab with browser window opens as: You can go to any website or search for anything you want to. To boost productivity, using browser along side with queries helps greatly this can be done by tab groups, Horizontal tab group will arrange both query and browser tabs one above the other as shown. And vertical tab group will arrange them side by side. Either can be used as per convenience. Thank you for reading my blog hope it helped.

Share Story :

How to convert SQL table into Excel sheet and Excel sheet into a SQL Table

Introduction: Sometimes a user wants to analyze their SQL query results in Microsoft Excel or import existing Excel data sheets as tables in SQL in order to do various data transformations. In both scenarios we can achieve this goal as: Converting Data from SQL table to Excel sheet: Go to tools option on the toolbar on SSMS and select options. In the window that opens select Query Results. Select Results to Grid from the drop down. Check Include column headers when copying results from the checkbox and click on the ok button. Click on the intersection of first row and first column of the SQL Table to select the entire table and then copy it by pressing ctrl + C or by right clicking and selecting copy . Open a new excel sheet and just paste the contents after selecting the first cell. If some columns show values as ##### , just increase the column width. Converting Data from Excel sheet to SQL Table: Right click on the database where you want to import the excel sheet as table and go to tasks and select import data. Select Microsoft Excel as source from the dialog box Select the version of excel you want to convert into If the system gives error that microsoft.ace.oledb drivers are not found download it from Microsoft website based on what  driver version is required. Choose destination as SQL server Native client and enter the server name and credentials Select the sheet which you want to be converted into SQL as table. Click next Wait for the process to complete The new sheet is created as a table in SQL Conclusion: Thus we saw how we can convert SQL table into Excel sheet and vice versa Thank you very much for reading, hope you enjoyed the article!

Share Story :

SEARCH BLOGS:

[gravityform id="36" ajax="true"]

FOLLOW CLOUDFRONTS BLOG :