Skip to content

Commit ff26541

Browse files
author
PRMerger6
authored
Merge pull request #3672 from rothja/cuversionchecking
Instructions on how to check your configured repository
2 parents decf4cd + e5d469d commit ff26541

1 file changed

Lines changed: 37 additions & 5 deletions

File tree

docs/linux/sql-server-linux-setup.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,18 @@ To rollback or downgrade SQL Server to a previous release, use the following ste
9191
> [!IMPORTANT]
9292
> Downgrade is only supported between RTM, RC2, and RC1 at this time.
9393
94+
## <a id="versioncheck"></a> Check installed SQL Server version
95+
96+
To verify your current version and edition of SQL Server on Linux, use the following procedure:
97+
98+
1. If not already installed, install the [SQL Server command-line tools](sql-server-linux-setup-tools.md).
99+
100+
1. Use **sqlcmd** to run a Transact-SQL command that displays your SQL Server version and edition.
101+
102+
```bash
103+
sqlcmd -S localhost -U SA -Q 'select @@VERSION'
104+
```
105+
94106
## <a id="uninstall"></a> Uninstall SQL Server
95107

96108
To remove the **mssql-server** package on Linux, use one of the following commands based on your platform:
@@ -121,6 +133,22 @@ There are two main types of repositories for each distribution:
121133

122134
Each CU and GDR release contains the full SQL Server package and all previous updates for that repository. Updating from a GDR release to a CU release is supported by changing your configured repository for SQL Server. You can also [downgrade](#rollback) to any release within your major version (ex: 2017). Updating from a CU release to a GDR release is not supported.
123135

136+
### Check your configured repository
137+
138+
If you want to verify what repository is configured, use the following platform-dependent techniques.
139+
140+
| Platform | Procedure |
141+
|-----|-----|
142+
| RHEL | 1. View the files in the **/etc/yum.repos.d** directory: `sudo ls /etc/yum.repos.d`<br/>2. Look for a file that configures the SQL Server directory, such as **mssql-server.repo**.<br/>3. Print out the contents of the file: `sudo cat /etc/yum.repos.d/mssql-server.repo`<br/>4. The **name** property is the configured repository.|
143+
| SLES | 1. Run the following command: `sudo zypper info mssql-server`<br/>2. The **Repository** property is the configured repository. |
144+
| Ubuntu | 1. Run the following command: `sudo cat /etc/apt/sources.list`<br/>2. Examine the package URL for mssql-server. |
145+
146+
The end of the repository URL confirms the repository type:
147+
148+
- **mssql-server**: preview repository.
149+
- **mssql-server-2017**: CU repository.
150+
- **mssql-server-2017-gdr**: GDR repository.
151+
124152
### Change the source repository
125153

126154
To configure the CU or GDR repositories, use the following steps:
@@ -130,11 +158,15 @@ To configure the CU or GDR repositories, use the following steps:
130158
131159
1. If necessary, remove the previously configured repository.
132160

133-
| Platform | Repository removal command |
134-
|-----|-----|
135-
| RHEL | `sudo rm -rf /etc/yum.repos.d/mssql-server.repo` |
136-
| SLES | `sudo zypper removerepo 'packages-microsoft-com-mssql-server'` |
137-
| Ubuntu | `sudo add-apt-repository -r 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server xenial main'` |
161+
| Platform | Repository | Repository removal command |
162+
|---|---|---|
163+
| RHEL | **All** | `sudo rm -rf /etc/yum.repos.d/mssql-server.repo` |
164+
| SLES | **CTP** | `sudo zypper removerepo 'packages-microsoft-com-mssql-server'` |
165+
| | **CU** | `sudo zypper removerepo 'packages-microsoft-com-mssql-server-2017'` |
166+
| | **GDR** | `sudo zypper removerepo 'packages-microsoft-com-mssql-server-2017-gdr'`|
167+
| Ubuntu | **CTP** | `sudo add-apt-repository -r 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server xenial main'`
168+
| | **CU** | `sudo add-apt-repository -r 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server-2017 xenial main'` |
169+
| | **GDR** | `sudo add-apt-repository -r 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server-2017-gdr xenial main'` |
138170

139171
1. For **Ubuntu only**, import the public repository GPG keys.
140172

0 commit comments

Comments
 (0)