If you are a Windows administrator who has recently been tasked with administering a Linux-based Ubuntu server, you may find that utilizing Microsoft Powershell may help ease the transition into Linux, and allow you to be more productive. If you are a Linux administrator who is interested in exploring the options that Powershell provides, then this tutorial is for you as well.
Continue reading “Installing Microsoft Powershell on Ubuntu 18.04”Tag: Microsoft
How to Install Microsoft SQL on Linux
In this article, we will be discussing how to install Microsoft SQL or MSSQL on Linux. Microsoft SQL, colloquially referred to as MSSQL, is a relational database management system created by Microsoft. Open-source MySQL and PostgreSQL are typically synonymous with Linux distributions, but working with MSSQL on Linux is also supported. MSSQL offers some features that its open-source counterparts don’t, and depending on application requirements, it might be the right choice for an RDBMS. In this tutorial, we are going to walk through how to install MSSQL on CentOS 7 and Ubuntu 16.04.
Continue reading “How to Install Microsoft SQL on Linux”Finding Resource Usage Details in MSSQL
When running MSSQL or Microsoft SQL Server, we need to determine whether it is optimized or will it need more resources to achieve better performance. This article reviews what behaviors to look for, where to find them, and how to view signs of distress.
Continue reading “Finding Resource Usage Details in MSSQL”SQL Databases Migration with Command Line
SQL Database Migration with SSMS
- Moving to an entirely new server.
- Moving to a different instance of SQL.
- Creating a development server or going live to a production server.
- Restoring databases from a backup.
Moving SQL databases with the manual method can be very easy. It is the preferred process for transferring a few or smaller databases. To follow this part of the guide, you must have MSSQL, and Microsoft SQL Server Management Studio (SSMS) installed.
1. Begin by logging into the Source server (the server you are moving databases from or off of). You will want to open Microsoft SQL Server Management Studio by selecting Start > Microsoft SQL Server > Microsoft SQL Server Management Studio. 2.Log into the SQL server using Windows Authentication or SQL Authentication. 3. Expand the server(in our case SQL01), expand Databases, select the first database you want to move (pictured below).



You should now have a .bak file of all your databases on the source server. These database files need to be transferred to the destination server. There are numerous ways to move your data to the destination server; you can use USB, Robocopy or FTP. After copying a database you can store it on your destination server, for our example, we have stored it on the C drive in a folder named C:\dbbackups . 1. Open Microsoft SQL Server Management Studio. 2. Log in to the SQL server using Windows Authentication or SQL Authentication. 3. Expand the server and right click on Databases and select Restore Database. 4. The Restore Database screen looks very similar to the Back Up Database screen.Under Source, you will want to select Device instead of Database. Selecting Device allows you to restore directly from a file. Once you’ve chosen Device, click the browse icon […] 5. Select Add, then navigate to the folder in which your .bak files lives. (In this case, C:\dbbackups). 6. Select the first database .bak you would like to restore and click OK.

After importing your databases if you are unable to connect using your SQL login, you may receive the error ‘Login failed for user ‘example.’ (Microsoft SQL Server, Error: 18456).‘ Because the database is in the Traditional Login and User Model, logins are stored separately in the source server and credentials are not contained within the database itself. From this point on, the destination server can be configured to use the Contained Database User Model which keeps the logins in your database and out of the source server. Until then, we will have to move and interact with the users as part of the Traditional model. Continue below to proceed with the migration of your SQL users. Backing up and restoring the databases did move your SQL logins relation to the databases (your logins are still associated with the correct databases with the correct permissions) but the actual logins itself did not transfer to the new server. You can verify this by opening SSMS (SQL Server Management Studio) on the destination server and navigating to Server > Security > Logins. You will notice that any custom SQL logins you created on the previous server did not transfer over here, but if you go to Server > Databases > Your Database (AdventureWorks2012 in this case) > Security > Users you’ll see the correct login associated with the database. If you have one or two SQL users, you can just delete the user’s association to the database in Servers > Databases > AdventureWorks2012 > Security > Users, re-create the user in Server > Security > Logins and map it to the proper database. If you have many logins, you will have to follow an additional process outlined below. To migrate all SQL users, open a New Query window on the source server and run the following script: This script creates two stored procedures in the source database which helps with migrating these logins. Open a New Query window and run the following:
EXEC sp_help_revlogin
This query outputs a script that creates new logins for the destination server. Copy the output of this query and save it for later. You will need to run this on the destination server.
Once you’ve copied the output of this query, login to SSMS on the destination server and open a New Query window. Paste the contents from the previous script (it should have a series of lines that look similar to — Login: BUILTIN\Administrators
CREATE LOGIN [BUILTIN\Administrators] FROM WINDOWS WITH DEFAULT_DATABASE = [master]) and hit Execute.
You have now successfully imported all SQL logins and can now verify that the databases have been migrated to the destination server by using your previous credentials.
Views and stored procedures will migrate with the database if you are using the typical SQL Tape backups. Follow the instructions below if you need to migrate views and stored procedures independently.
- Open Microsoft SQL Management Studio on the Source server.
- Log in to your SQL server.
- Expand the server and as well as Databases.
- Right click on the name of your database and go to Tasks > Generate Scripts.
- Click Next.
- We will change Script entire database and all database objects to Select specific database objects and only check Views and Stored Procedures.
- Click Next, notice the Save to File option. Take note of the file path listed. In my case, it is C:\Users\Administrator\Documents\script.sql – The path of saved views and stored procedures.
- Click Next >> Next >>Finish, and select C:\Users\Administrator\Documents\script.sql and copy it to the destination server.
- Go to the destination server, open SSMS and log in to the SQL server.
- Go to File > Open > File or use the keyboard shortcut CTRL+O to open the SQL script. Select the file C:\Users\Administrator\Documents\script.sql to open it.
- You will see the script generated from the source server containing all views and stored procedures. Click Execute or use the keyboard shortcut F5 and run the script.
Installing SQL Express
MSSQL Express 2017 on a Dedicated Server
Microsoft SQL Server is a powerful database that is commonly used with ASP.NET and other website programming languages. However, licensing for MSSQL can be expensive and is sometimes prohibitive for smaller businesses and applications. Fortunately, Microsoft provides a free version of MSSQL server called MSSQL Express. Installing MSSQL Express on your dedicated server is quick and easy, especially with the new features included in MSSQL Express 2017. Continue reading “Installing SQL Express”How to Configure Cyberduck for Use with Storm Object Storage
- These instructions are intended specifically for configuring Cyberduck for use with Storm Object Storage.
- I’ll be working from a Microsoft Windows 8 desktop with Cyberduck already installed.