Category Archives: Support

Comparison Between Role of db_owner with Roles of db_datareader & db_datawriter in MS SQL Server

  1. db_owner role should only be given to the administrator who responsible for the database because this role can DROP the database
  2. db_datareader and db_datawriter is the minimum access that should be given to normal user to do the basic SELECT, UPDATE, INSERT and DELETE operation to the database
db_owner
db_datareader
db_datawriter
  1. Can perform all configuration and maintenance activities on the database, and can also drop the database in SQL Server
  2. Normal users should not be a member of this role.
  3. Some applications might require their user account to be a member of this role.
  1. Members of the db_datareader fixed database role can read all data from  all user tables.
  2. The db_datareader role gives implicit access to SELECT against all tables and views in a database.
  1. Members of the db_datawriter fixed database role can add, delete, or change data in all user tables.
  2. The db_datawriter role gives implicit access to INSERT, UPDATE, and DELETE against all tables and views in a database.

Source:

  1. https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles?view=sql-server-ver15
  2. https://www.mssqltips.com/sqlservertip/1900/understanding-sql-server-fixed-database-roles/

How to Configure MS SQL Server Express to Use Windows Authentication

  1. Create an user account on the computer that act as a server, the username and password must used exactly like the account used in client computer
  2. In SQL Server Management Studio:
    • Expand “Security” -> expand “Logins” -> “New Login
    • Click “General” -> select “Windows authentication” -> click “Search”
    • Type the account name that has been created on server computer, click “Check Names
    • Alternatively you can do this step by clicking “Advanced” button -> “Find Now” -> find the account name in the search results -> click “OK

    • Click “Server Roles” -> check for sysadmin
    • Click “User Mapping” -> choose database -> check for db_datareader and db_datawriter

Note: You do not need to enter the password as SQL Server will ask Windows to validate the user password. (source: https://www.virtual-dba.com/differences-windows-sql-server-authentication/)

How to View the Log of MS SQL Server Express to Check for Login Status

  1. You can choose what type of login activity that you want the SQL Server to log. By default, SQL Server will log the “Failed logins only” activity only. To choose the login activity, right-click at your “Server <instance name>” -> “Properties”. In Server Properties, click “Security” and choose the activity in Login auditing area:
    • None
    • Failed logins only
    • Successful logins only
    • Both failed and successful logins
  2. To view the MS SQL Server log files, expand “Management” -> expand “SQL Server Logs“, click any log date that you want to view:
  3. All the login activities can be viewed in the Log file summary area:

How to Configure Windows Server and MS SQL Server Express to Allow Control Panel of MobiGATE to Remotely Connect

SETTING WHAT ERROR WILL APPEAR IF THE SETTING IS NOT DONE
Windows Firewall: allow “SQL Server Windows NT – 64 Bit”

If firewall is not opened for SQL Sever then this error will appear:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error:40 – Could not open a connection to SQL Server)

SQL Server Configuration Manager:

  1. Enable Named Pipes and TCP/IP:
    – Go to SQL Server Network Configuration -> Protocols for <instance name> -> right click on Named Pipes and TCP/IP -> choose Enable
  2. Set port 1433 in TCP/IP Properties:
    – Go to SQL Server Network Configuration -> Protocols for <instance name> -> right-click on TCP/IP -> choose Properties
    – in IP Addresses tab -> scroll until the end until find IPAII -> set TCP Dynamic Ports to empty and TCP Port to 1433
If “Named Pipes” and “TCP/IP” are not enabled in MS SQL Server then this error will appear:

“A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error:40 – Could not open a connection to SQL Server) ”

If the SQL Server is using instance e.g. “./SQLEXPRESS”:

  1. In Windows Firewall, open port number 1434:
  2. In SQL Server Configuration Manager: Start “SQL Server Browser” in “SQL Server Configuration Manager”:
If TCP/UDP Port no. 1434 is not opened, then this error will appear:

“A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified) ”

Remote connection must be enabled to connect to databases remotely. Connect to SQL Server Instance in SSMS. Right click on SQL Server instance name in SSMS and choose Properties. You will get Server properties window. Click on Connections from left side pane and tick the check box on Allow remote connections to this server option from right side pane.

MORE INFORMATION

Running Multiple Instances of BlueStacks

  1. Open BlueStacks multi-instance manager. Click “New Instance“.
  2. Select which instance to create:
    Fresh instance – instance with the new Google account (used to run multiple applications with different Google account. e.g. running Whatsapps with two different numbers).
    Clone instance – instance with the same Google account. (used to run multiple applications with the same Google account. e.g. Running Whatsapp and Facebook at the same time).
  3. Click “Start” button to start that instance or create the shortcut to desktop and start via short cut as sometimes the instance cannot start directly from BlueStacks multi-instance manager.

 

Questions

  1. Can I run 2 instances of Bluestacks at the same time, 1 in “Big-Boss” account, another in “Office” account?
    •  No, only 1 user (either “Big-Boss” or “Office) can run multiple instances of Bluestacks.
  2. Can I run 2 instances Memu of at the same time, 1 in “Big-Boss” account, another in “Office” account?
    • The same Memu application cannot running on different Windows accounts.
    • But Memu can run on different windows account using 2 instances. It did work but both Memu instances running on 2 different google accounts.
    • However, for Whatsapp,  both Memu instances cannot use the same Whatsapp account.

 

How to Set-Up MOBITEK S80 SMS Modem with WinPower UPS software

Applies to:

MOBITEK® S80 for SMS Over 3G Network

STEPS

  1. Connect your laptop/desktop to UPS and MOBITEK S80 Modem to laptop/desktop. Open Winpower UPS software. Go to System menu -> Act as Administrator and enter the password. The default password is “Administrator“. This step is important in order to configure Winpower software setting.

    To change the administrator password (optional), go to System menu -> Modify Administrator Password and enter the new password for administrator.
  2. Go to System menu -> Auto Search Device to search for UPS device automatically.

    Wait for the UPS to be searched.

    When found, the UPS device will be shown in the list. Double-click on it to see the UPS device status.
  3. Go to Tools menu -> SMS Setting to configure the SMS notification for UPS events.
  4. In SMS Setting, set the Com Port for MOBITEK S80 Modem, the Baud Rate to “115200“, and the Format of phone number to “Without National Code“. Enter the phone number for the notification to be sent, click Add button and select the phone number in the list. After that select the abnormal event in the event list that you want to be notified for. Click Test button to test the SMS sent successfully or not. If successful, click OK button.

VB.Net MS SQL Connection String to Handle Windows Authentication and SQL Connection

The VB.Net code should be as follows:-

MSConn = New SqlConnection()
If sAUTHMODE = "WIN" Then
    MSConn.ConnectionString = "Data Source=" & sSERVER & ";Initial Catalog=" & sDATABASENAME & ";User ID=" & sUSERNAME & ";Password=" & sPASSWORD & ";Integrated Security=True" 
ElseIf sAUTHMODE = "SQL" Then
    MSConn.ConnectionString = "Data Source=" & sSERVER & ";Initial Catalog=" & sDATABASENAME & ";User ID=" & sUSERNAME & ";Password=" & sPASSWORD & ";Integrated Security=False"
End If

Otherwise, one of these error messages will appear:-

  • Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.
  • Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

How to Disable Just-In-Time Debugger

If you received this error message

“Just-In-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. In Visual Studio, Just-In-Time debugging can be enabled from Tools/Options/Debugging/Just-In-Time.

Check the documentation index for ‘Just-in-time debugging, errors’ for more information.”

Solution is available at https://docs.microsoft.com/en-us/visualstudio/debugger/debug-using-the-just-in-time-debugger?view=vs-2019