SQL Server (T-SQL) - handle the fail to access the database (Ubuntu users)
When you start with T-SQL probably you will get this error: The server principal "your-user" is not able to access the database "testDB" under the current security context.
That's how I solved this fail and that is just a question of the steps to follow to install t-sql in your machine.
What the sources that I used:
- install mssql using the terminal: computingforgeeks.com/how-to-install-ms-sql..
- changed the port to be able to access by dbeaver-ce: docs.microsoft.com/en-us/sql/linux/sql-serv..
- create user and give admin access: tableplus.com/blog/2018/10/how-to-create-us..
$ sqlcmd -S localhost,5500 -U SA
1> ALTER SERVER ROLE sysadmin ADD MEMBER username;
2> GO
1> exit
$ sqlcmd -S localhost,5500 -U username
1> CREATE DATABASE testDB;
2> GO
1> SELECT name FROM sys.databases;
2> GO
- download dbeaver community: dbeaver.io/download
- install dbeaver: askubuntu.com/questions/788197/graphical-ms..
If you follow this steps, now you can create database, import csv file and so on.