[HELP] How to access SSMS on CentOS 7?

Results 1 to 5 of 5
  1. #1
    █║▌║▌║TheMerc iful║▌║▌║█ 4pLay is offline
    True MemberRank
    Jan 2005 Join Date
    DXBLocation
    1,425Posts

    Support [HELP] How to access SSMS on CentOS 7?

    [HELP] How to access SSMS on CentOS 7?
    need some help, just came back from a long slumber and got stup!d with setting up.

    http://forum.ragezone.com/f460/cento...r-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?

    Quote Originally Posted by AzureSensei View Post

    [/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.



    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..."


    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]




    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.



    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:
    Spoiler:

    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 [Account] FROM DISK = N'/var/opt/mssql/backup/Account.bak' 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.
    Spoiler:

    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!


    - 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]
    L.P.: "God save us everyone, When we burn inside the fires of a thousand suns, For the sins of our hand, the sins of our tongue,.. The sins of our father, the sins of our young."
    SARCASM: Because Beating The SHIT! Out People Is Illegal...


  2. #2
    Trying to be developer ^^ Dens666 is offline
    True MemberRank
    Jul 2010 Join Date
    PolandLocation
    1,076Posts

    Re: [HELP] How to access SSMS on CentOS 7?

    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.
    https://docs.microsoft.com/en-us/sql...l-server-ver15

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

  3. #3
    █║▌║▌║TheMerc iful║▌║▌║█ 4pLay is offline
    True MemberRank
    Jan 2005 Join Date
    DXBLocation
    1,425Posts

    Re: [HELP] How to access SSMS on CentOS 7?

    Quote Originally Posted by Dens666 View Post
    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.
    https://docs.microsoft.com/en-us/sql...l-server-ver15

    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.

    - - - Updated - - -

    Quote Originally Posted by Dens666 View Post
    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.
    https://docs.microsoft.com/en-us/sql...l-server-ver15

    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.

    - - - Updated - - -

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



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



    - - - Updated - - -

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



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

    asus fn spacebar
    L.P.: "God save us everyone, When we burn inside the fires of a thousand suns, For the sins of our hand, the sins of our tongue,.. The sins of our father, the sins of our young."
    SARCASM: Because Beating The SHIT! Out People Is Illegal...

  4. #4
    Registered markmarilag27 is offline
    MemberRank
    Nov 2020 Join Date
    PHLocation
    13Posts

    Re: [HELP] How to access SSMS on CentOS 7?

    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 https://docs.microsoft.com/en-us/sql...l-server-ver15

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

  5. #5
    █║▌║▌║TheMerc iful║▌║▌║█ 4pLay is offline
    True MemberRank
    Jan 2005 Join Date
    DXBLocation
    1,425Posts

    Re: [HELP] How to access SSMS on CentOS 7?

    Quote Originally Posted by Dens666 View Post
    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.
    https://docs.microsoft.com/en-us/sql...l-server-ver15

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


    Quote Originally Posted by markmarilag27 View Post
    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 https://docs.microsoft.com/en-us/sql...l-server-ver15

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

    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!

    - - - Updated - - -

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



    thank you!

    god bless!

    - - - Updated - - -

    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.
    L.P.: "God save us everyone, When we burn inside the fires of a thousand suns, For the sins of our hand, the sins of our tongue,.. The sins of our father, the sins of our young."
    SARCASM: Because Beating The SHIT! Out People Is Illegal...



Advertisement