Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[HELP] How to access SSMS on CentOS 7?

█║▌║▌║TheMerc iful║▌║▌║█
Loyal Member
Joined
Jan 29, 2005
Messages
1,366
Reaction score
80
need some help, just came back from a long slumber and got stup!d with setting up.

http://forum.ragezone.com/f460/centos-7-repack-cabal-server-1144251-new/

[CentOS 7 Repack] Full Cabal Server Installation + CentOS SQL (Database) [Updated]

just like the tittle says, how to access SSMS on CentOS 7 for me to be able to restore db's?

[/B]
Database Restoration

1. Login to your installed database, right click on Database and select "New Query", then copy this:
Code:
CREATE DATABASE Account;
CREATE DATABASE Authentication;
CREATE DATABASE CabalCash;
CREATE DATABASE CabalGuild;
CREATE DATABASE EventData;
CREATE DATABASE NetcafeBilling;
CREATE DATABASE Server01;
and click "Run". It will create all databases you will require.

OMeauk6 - [HELP] How to access SSMS on CentOS 7? - RaGEZONE Forums


2. Once databases are created, and backups are uploaded to /var/opt/mssql/backup, right-click on database and follow these steps:
Step 1: "Account" database -> "Tasks" -> "Restore" -> "Database..."
jRJmxcH - [HELP] How to access SSMS on CentOS 7? - RaGEZONE Forums


Step 2: Select "Device" -> Click on 3 dots (in image marked as 2) -> Select "Add" -> Once window opens, click on "backup" and select Account.bak file -> Click "Ok"
[outcome will be like picture]


pOaio7L - [HELP] How to access SSMS on CentOS 7? - RaGEZONE Forums


Step 3: Select "Options" (1) -> Tick "Overwrite the existing database (WITH REPLACE) (2). If you have "Take tail-log backup before restore" -> DESELECT IT. It has to be as show in the image below -> Click "Ok" and wait till database restores.

nLBYbVw - [HELP] How to access SSMS on CentOS 7? - RaGEZONE Forums


Now repeat the STEPS ABOVE for all databases until they are fully restored.

Old method for 2017 MSSQL - reported problems - NOT ADVISED TO USE IT:
Once you have done all points in Database Installation part, follow these simple to restore your database using PuTTy Terminal, which is simple copy-paste + enter.

1. Download required repository for SQLCMD:
Code:
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repo
2. Run the following command to install it:
Code:
sudo yum install mssql-tools unixODBC-devel
3. Create a symlink using this command:
Code:
sudo ln -s /opt/mssql-tools/bin/* /usr/local/bin/
4. Using the following line in PuTTy terminal, you will create a database and restore it at the same time, without the need to login to SSMS Management and create everything there, as show in this sample:
Code:
sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [[COLOR=#ff0000][B]Account[/B][/COLOR]] FROM DISK = N'/var/opt/mssql/backup/[COLOR=#ff0000][B]Account.bak[/B][/COLOR]' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5"

Copy paste the following lines in the spoiler below to restore full database.
*Important: after each line, you will be prompted to input database password.
Code:
sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [Account] FROM DISK = N'/var/opt/mssql/backup/Account.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5"
Click Enter -> Input your database password -> Click Enter -> Done!
Code:
sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [Authentication] FROM DISK = N'/var/opt/mssql/backup/Authentication.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5"
Click Enter -> Input your database password -> Click Enter -> Done!
Code:
sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [CabalCash] FROM DISK = N'/var/opt/mssql/backup/CabalCash.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5"
Click Enter -> Input your database password -> Click Enter -> Done!
Code:
sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [CabalGuild] FROM DISK = N'/var/opt/mssql/backup/CabalGuild.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5"
Click Enter -> Input your database password -> Click Enter -> Done!
Code:
sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [EventData] FROM DISK = N'/var/opt/mssql/backup/EventData.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5"
Click Enter -> Input your database password -> Click Enter -> Done!
Code:
sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [NetCafeBilling] FROM DISK = N'/var/opt/mssql/backup/NetCafeBilling.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5"
Click Enter -> Input your database password -> Click Enter -> Done!
Code:
sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [Server01] FROM DISK = N'/var/opt/mssql/backup/Server01.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5"
Click Enter -> Input your database password -> Click Enter -> Done!

Database Location and Commands:

Location: /var/opt/mssql
Backups: /var/opt/mssql/backup
Command to restart database:
Code:
systemctl restart mssql-server

P.S. SQL has its own cmd, but it is not adviseable for novice user to use it, as SSMS does everything you need.

# Useful Tips #

- How to change default database username to my own?
Answer: Login to your Database -> Select "Security" (below "Databases") -> right-click user "sa" -> click "Rename" -> change it to whatever you like and hit "Enter" on your keyboard -> Done!
xJP69ZN - [HELP] How to access SSMS on CentOS 7? - RaGEZONE Forums


- How to change MSSQL default port (1433) into my custom one?
Answer:
- Firstly, add it into your firewall zone. If you will not add it before hand, you will block yourself out of the database.
- Then, run the following command in SSH terminal:
Code:
/opt/mssql/bin/mssql-conf set network.tcpport YOUR_PORT_HERE
- After that you will be prompted to restart MSSQL Server, so use the following:
Code:
systemctl restart mssql-server.service

[/SPOILER]


[/CENTER]
 

Attachments

You must be registered for see attachments list
Trying to be developer ^^
Loyal Member
Joined
Jul 21, 2010
Messages
1,072
Reaction score
360
Hello,

not sure what exactly your problem is.
You cannot access SSMS, SSMS is a application that you have to install.
It's not part of the database usualy.

Install it on your PC and then remotely connect to your database on linux.


You can always restore db's from commands, but indeed it's easier with SSMS.
 
Upvote 0
█║▌║▌║TheMerc iful║▌║▌║█
Loyal Member
Joined
Jan 29, 2005
Messages
1,366
Reaction score
80
Hello,

not sure what exactly your problem is.
You cannot access SSMS, SSMS is a application that you have to install.
It's not part of the database usualy.

Install it on your PC and then remotely connect to your database on linux.


You can always restore db's from commands, but indeed it's easier with SSMS.

I have already installed that on my local pc, I just don't know how? or what to use to log in on my SSMS have tried the IP and the root username and password of the VBOX machine, but it wont go through.

thank you so much for replying I am really lost here right now for I have not tried setting up a server like a very long time.



Hello,

not sure what exactly your problem is.
You cannot access SSMS, SSMS is a application that you have to install.
It's not part of the database usualy.

Install it on your PC and then remotely connect to your database on linux.


You can always restore db's from commands, but indeed it's easier with SSMS.

I have already installed that on my local pc, I just don't know how? or what to use to log in on my SSMS have tried the IP and the root username and password of the VBOX machine, but it wont go through.

thank you so much for replying I am really lost here right now for I have not tried setting up a server like a very long time.



I think?! I am successful on this part?!

4pLay - [HELP] How to access SSMS on CentOS 7? - RaGEZONE Forums


is this correct? or I'm doin' it wrong?! help!

4pLay - [HELP] How to access SSMS on CentOS 7? - RaGEZONE Forums




I think?! I am successful on this part?!



is this correct? or I'm doin' it wrong?! help!

 
Upvote 0
Newbie Spellweaver
Joined
Nov 5, 2020
Messages
19
Reaction score
5
I'm not sure if the user is root it should be sa assuming you did not add a user yet.

VM IP
sa
your password

and make sure you open the port 1433 in your VM and you can check the full guide

Also regarding the title "How to access SSMS on CentOS 7" I think it should be "How to access MSSQL Server on CentOS 7".
 
Upvote 0
█║▌║▌║TheMerc iful║▌║▌║█
Loyal Member
Joined
Jan 29, 2005
Messages
1,366
Reaction score
80
Hello,

not sure what exactly your problem is.
You cannot access SSMS, SSMS is a application that you have to install.
It's not part of the database usualy.

Install it on your PC and then remotely connect to your database on linux.


You can always restore db's from commands, but indeed it's easier with SSMS.



I'm not sure if the user is root it should be sa assuming you did not add a user yet.

VM IP
sa
your password

and make sure you open the port 1433 in your VM and you can check the full guide

Also regarding the title "How to access SSMS on CentOS 7" I think it should be "How to access MSSQL Server on CentOS 7".



Thank you so much!

I have successfully, connected locally through the SSMS and now my adventure continues...

still gonna need your help guys...

Again thank you!

God Bless!



once again I am coming to you guys for some help.



thank you!

god bless!



you just have got to do everything on the tut...





done with this part.

on to the next one!

hopefully, the gods of knowledge will bless me more of their knowledge.
 
Upvote 0
Back
Top