Explore information related to database


PostgreSQL backup failed in Web help desk - Fix it Now ?


This article covers methods to resolve PostgreSQL database and fix PostgreSQL error. It may be necessary to create a backup and restore your Web Help Desk database.

This is how to back up and restore the Web Help Desk 12.x PostgreSQL embedded database. The process involves creating a backup from the web interface and restore using the embedded pgAdmin application on the Web Help Desk.

Read More



Allow remote access to phppgadmin - The easy way


This article covers how to Install, configure and enable remote access to phpPgAdmin. Here you will learn how to enable remote access to PostgreSQL server on a Plesk server.


To Access PhpPgAdmin On Linux And MacOS:

1. Open a new terminal window on your local system (for example, using “Finder -> Applications -> Utilities -> Terminal” in macOS or the Dash in Ubuntu).

2. Make sure that you have your SSH credentials (.pem key file) in hand.

3. un the following command to configure the SSH tunnel using the SSH key file. Remember to replace KEYFILE with the path to your private key and SERVER-IP with the public IP address or hostname of your server:

$ ssh -N -L 8888:127.0.0.1:80 -i KEYFILE bitnami@SERVER-IP

Remember that if you are redirecting HTTP requests to the HTTPS port, you must use destination port 443 instead of 80.

4. Access the phpPgAdmin console through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/phppgadmin.

5. Log in to phpPgAdmin by using the following credentials:

Username: postgres.
Password: application password.

Read More



mysqldump error 1146 table doesn't exist – Fix it Now ?


This article covers methods to resolve mysqldump: Got error: 1146: Table doesn't exist. To fix this error, you can simply save the database and dump it with innodb_force_recovery option. Most InnoDB corruptions are hardware-related. Corrupted page writes can be caused by power failures or bad memory. The issue also can be caused by using network-attached storage (NAS) and allocating InnoDB databases on it.

Read More



WHMCS error code 1013 - Fix it Now ?


This article covers WHMCS error code 1013. Basically, this error happens when the external_id entry is missing in psa.clients MySQL table. If the issue appears on WHMCS integrated with Plesk Multi Server, this database update should be done on the management node side.

Read More



cPanel Error: rpmdb open failed – Fix it Now ?


This article covers methods to resolve cPanel Error: rpmdb open failed. In conclusion, we run into the cPanel Error while updating yum on VPS with cPanel on it.

In order to resolve this issue you would want to attempt a rebuild of the RPM database using the following commands on the system:

$ mkdir /root/old_rpm_dbs/
$ mv /var/lib/rpm/__db* /root/old_rpm_dbs/
$ rpm --rebuilddb -vv
$ yum clean all

If that works well, the "yum update" command will now work properly on your machine.

Read More



WordPress Error Establishing a Database Connection: Fix this Vultr error


This article covers how to resolve Vultr database error. This condition can happen for a variety of reasons: low RAM or disk space, database corruption, plugin errors, misbehaving themes, incorrect password, MySQL errors, and more. 


To fix Vultr Error establishing a database connection (WordPress):

1. Free up some RAM or upgrade the VPS to have more RAM, around 1GB or so should work.

2. Create a cron job in /etc/crontab which checks on the status on the database and restarts it if the process dies. Have the job run every few minutes. If your site runs into heavy traffic, the cron job will restart the database and connections to Wordpress will work again.

3. Also, you could try tweaking the following variables in the "/etc/my.cnf" file:

innodb_buffer_pool_size
table_open_cache

4. You can try to rebuild Nginx PHP-FPM MariaDB.

5. You can restart mysql:

/etc/init.d/mysqld start

Read More



"Login disallowed for security reasons" phppgadmin error – Fix it Now ?


This article covers how to resolve "Login disallowed for security reasons" phppgadmin error. Basically, the "Login disallowed for security reasons" error can happen when extra login security is enabled in the phpPgAdmin configuration file.


To fix this issue, You will need to edit the phppgadmin config file from following directory /etc/phppgadmin/config.inc.php.

Finally modify the line $conf['extra_login_security'] = true; to $conf['extra_login_security'] = false;

Read More



Export config database in Nagios - How to do it ?


This article covers how to export config database in Nagios. Basically, Manual exports are useful when debugging configuration problems, including failures of Nagios XI to apply new configuration changes.

Read More



MySQLdump: Got error: 1044 when selecting the database - Fix it Now ?


This article covers methods to resolve MySQLdump: Got error: 1044 when selecting the database. 

When this error happens, you will get an error message such as this:

mysqldump: Got error: 1044: Access denied for user ‘root’@’localhost’ to database ‘information_schema’ when using LOCK TABLES


To fix this MySQLdump error: 

1. You can pass the –single-transaction option to mysqldump command:

$ mysqldump --single-transaction -u user -p DBNAME > backup.sql

2. Also, you can simply grant LOCK TABLES to your user:

$ mysql -u root -p

And type:

mysql> GRANT SELECT,LOCK TABLES ON DBNAME.* TO 'username'@'localhost';

Read More



MySQLdump: got error :1049 :unknown database - Fix it Now ?


This article covers the best method to fix the MySQL database error, "MySQLdump: got error :1049 :unknown database".

Generally, this error happens while performing cPanel backups and it simply indicates that the database does not exist in MySQL.


How to fix mysqldump unknown database when selecting the database?

In cases where this error occurs when you specify the password on the command line with -p flag and there is a space between -p and password.

For example, if you want to dump the database named wpdb using the user "root" and password "your-password".

Fix this error, by specifying the password with no space after -p switch as shown below:

mysqldump -u root -pyour-password wpdb > wpdb_backup.sql

Read More



PHPMyAdmin import database timeout - Fix it Now ?


This article covers methods to fix PHPMyAdmin import database timeout error. This error happens because of a huge file and the restoration process fails with timeout.


To resolve this error, 

1. Login to the server over SSH.

2. Create the file config.inc.php.

For Plesk Onyx and Plesk Obsidian below 18.0.30:

# cp -p /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/config.inc.php

For Plesk Obsidian 18.0.30 and above:

# cp -p /usr/local/psa/phpMyAdmin/libraries/config.default.php /usr/local/psa/phpMyAdmin/config.inc.php

3. Increase the value of $cfg['ExecTimeLimit'] in config.inc.php created on step 2:

$cfg['ExecTimeLimit'] = 3600;

4. Increase the settings in /etc/sw-cp-server/config to avoid '504 Gateway Timeout' error:

fastcgi_read_timeout 3600;
fastcgi_send_timeout 3600;

5. Restart sw-cp-server:

$ service sw-cp-server restart

Read More



Plesk error Unable to import the dump - Fix it Now ?


This article covers methods to fix database error in Plesk. 


To fix this Plesk database issue:

1. Start by Checking the version of your SQL server with:

# plesk db -Ne "select version()"

2. Make sure that collation mentioned in the error message is not available in MySQL server:

# plesk db -e "show collation" | grep uft8_general_ci

3. So you have to upgrade MariaDB to version 10.1 or 10.2 on the destination server.


How to upgrade Plesk MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.X on Linux?

By default, Ubuntu 20.04 is shipped with MariaDB 10.3.

1. For security reasons, create a database dump of all databases with the following command:

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --verbose --all-databases --routines --triggers > /tmp/all-databases.sql

2. Stop MariaDB:

$ service mariadb stop

3. Install repositories from Setting up MariaDB Repositories page:

# apt-get install software-properties-common
# apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
# add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.truenetwork.ru/mariadb/repo/10.4/ubuntu focal main'

4. Create a backup of all MySQL data:

$ cp -v -a /var/lib/mysql/ /var/lib/mysql_backup

5. Start an upgrade with the following command. Leave all fields empty when asked for a 'root' user password:

$ apt-get update
$ apt-get install mariadb-server

6. Start the MariaDB service:

# service mariadb start

7. Upgrade MySQL databases:

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

8. Restart mysql service:

$ service mariadb restart

9. Execute the following commands to update package version inside Plesk:

# plesk bin service_node --update local
# plesk sbin packagemng -sdf

Read More



Move Exchange Mailboxes to Another Database – How to perform it ?


This article covers how to move Exchange Mailboxes to Another Database.

Exchange administrator can move user mailboxes in the Active Directory forest from one database to another between Exchange servers, or between mailbox databases on the same server through the Exchange Admin Center web interface or PowerShell CLI.

To move the user or resource mailbox from one database to another, you need to create a move request (if migration occurs within the same Active Directory forest, this is called a local move request; if you want to move a mailbox between AD forests — this is a remote move request). 

To move the user mailbox the New-MoveRequest cmdlet is used.


The following two services process your move request to move mailboxes:

1. Exchange Mailbox Replication service (MRS)

2. Exchange Mailbox Replication Proxy


How to Create local move requests ?

You can create local move requests for:

1. A single mailbox.

2. Multiple mailboxes (also known as a batch move request).

3. Multiple mailboxes that you specify in a comma-separated value (CSV) file (also known as a migration batch).

Read More



WordPress error "Could Not Save Password Reset Key To Database" - Fix it Now ?


This article covers methods to resolve WordPress error "Could Not Save Password Reset Key To Database" which usually occurs when we try to login into our WordPress site.

As the database is part of the hosting space, you'll get that database error when you fill-up the entire available disk space of your account.
That can happen if you created several staging sites or uploaded too many large files like big images on your website.

A more common reason for this WordPress issue can be substantial backup files created by your backup plugin.

Backup files need a lot of space on your system, which can quickly fill up the entire available webspace.
1. So to fix this WordPress error, immediately log in to your website using an FTP client like the Filezilla program or the File Manager in your cPanel hosting dashboard.
2. Then go to the media folder wp-content/uploads and check there for large files which you can delete, for instance, backup files with the ending .*zip or large media files with the file extension *.tiff, *.png, or *.png.
3. You should never use the *.tiff format, though. This one uses a lot of disk space, so it's better to use *.jpg instead of that.
4. After, open your WordPress website, log in, or use the password reset function again.

To fix this WordPress error in cPanel:

1. You'll need to free up space on your server.
2. Log into the HostPapa Dashboard and click My cPanel.
3. Then select Files > cPanel File Manager.
4. Navigate to your WordPress root folder and select wp-content/uploads.
5. Search through your upload files to locate and delete large files that you may no longer need.
6. Click the Size link to sort the list by file size.
7. Take a look elsewhere on the server for files and folders you are happy to delete.
8. Once you've created some space on your server, you can attempt to log into WordPress once again.

Read More



Undefined index notice in Joomla - Fix it now ?


This article covers how to resolve Undefined index notice in Joomla. A notice, in PHP terms (PHP is the scripting language that powers Joomla), is more or less a complaint. For example, if you're using a deprecated function such as ereg_replace (by the way, we have had quite a few sites with the ereg_replace() is deprecated notice that we needed to fix) then PHP will complain with a notice.
A notice may also be displayed if you're trying to use questionable casting that PHP thinks will not return the result that you want (for example, if you try to forcefully cast an array into a string).

To fix this Joomla warning:

Change PHP's error reporting in the .htaccess file to hide all errors.
You can do that by adding the following code to your .htaccess file:

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on

The above code will ensure that no error whatsoever will be displayed on your website.

Note that if you have an Error Reporting setting in your configuration settings other than "Default", then this setting will override the error reporting defined in your .htaccess.
For example, if your Error Reporting is set to "Maximum", then the above code in your .htaccess file has no effect.


Read More



Manage Transaction Log File during Data Load - Do it Now


This article covers how to manage transaction log files in SQL Server for our customers. A transaction log is a file – integral part of every SQL Server database. It contains log records produced during the logging process in a SQL Server database.

The transaction log is the most important component of a SQL Server database when it comes to the disaster recovery – however, it must be uncorrupted.

The only way to truncate the log, so the space can be reused, is to perform a SQL transaction log backup. Therefore the most common reason for a transaction log file to have grown extremely large is because the database is in the FULL recovery model and LOG backups haven't been taken for a long time.


How do I stop a transaction log from filling up?

1. To keep the log from filling up again, schedule log backups frequently. 

2. When the recovery mode for a database is set to Full, then a transaction log backup job must be created in addition to backing up the database itself.


To fix a transaction log for a database is full:

1. Backing up the log.

2. Freeing disk space so that the log can automatically grow.

3. Moving the log file to a disk drive with sufficient space.

4. Increasing the size of a log file.

5. Adding a log file on a different disk.

Read More



SQL error 300 - Fix it Now


This article covers tips to resolve SQL error 300. The reason of the error is related with user permission on VIEW SERVER STATE. You can upgrade SQL Server Management studio with the same version like SQL Instance or higher. 


Also, To mitigate this error, give the following GRANT and the error message will disappear:

USE master
GO
GRANT VIEW SERVER STATE TO "LoginName"

Read More



Recover orphan innodb database from ibd file - How to perform this task


This article covers how to recover the orphan InnoDB database from the ibd file. 


Orphan InnoDB database incident mostly happened when:

1 – user accidentally remove ibdata1 file. (mostly in /var/lib/mysql/ibdata1).

2 – ibdata file courrupted.


To Recover Orphaned InnoDB Tables:

1. Restart the MySQL service to recreate ibdata1, then take a backup of your database folder.

2. Login to MySQL.

3. Create a dummy database with the same name. Then, create a dummy table with the same name as the corrupted one (don’t mind the table structure for now).

4. Stop the MySQL service, copy the .frm file from the backup you took to replace the .frm file.

5. Start MySQL and have a look at the structure of your table - it should now be in place! However, don’t get too happy yet.

6. Issue a SHOW CREATE TABLE statement and copy its contents, then create the table with them.

7. Stop MySQL, copy the .ibd file from the backup directory to /var/lib/database_name and replace the existing .ibd file from the dummy table.

8. Now it’s time for Percona’s tools to shine - download and install the Percona Data Recovery Tool for InnoDB , then run the following (here -o represents the full location of your ibdata1 file, -f represents the full location of your .ibd file, -d represents the database name and -t represents your table name):

ibdconnect -o /var/lib/mysql/ibdata1 -f /var/lib/mysql/database_name/table_name.ibd -d database_name -t table_name

9. Now, run a checksum check against InnoDB - make sure you get no error messages (you might need to run this tool several times):

innochecksum /var/lib/mysql/ibdata1

10. Finally, you should be good to go - simply start MySQL.

Read More



Event Data getting Stale in Nagios - Resolve it Now


This article covers methods to fix Event Data getting Stale in Nagios. Basically, you will see the causes for event data getting stale in Nagios. There is a known bug relating to event data in versions 2009R1.4B-2011R1.1.

This bug has been patched and will be available in releases later than the versions posted above, but if you're experiencing this error, and/or the nagios service is taking an excessively long time to start, you may have a corrupted mysql table that needs repair.


To fix this Nagios error:

1. Stop the following services:

$ service nagios stop
$ service ndo2db stop
$ service mysqld stop

2. Run the repair script for mysql tables:

/usr/local/nagiosxi/scripts/repairmysql.sh nagios

3. Unzip and copy the the following dbmaint file to /usr/local/nagiosxi/cron/. This will overwrite the previous version.

$ cd /tmp
$ wget http://assets.nagios.com/downloads/nagiosxi/patches/dbmaint.zip
$ unzip dbmaint.zip
$ chmod +x dbmaint.php
$ cp dbmaint.php /usr/local/nagiosxi/cron

Read More



Core Configuration Manager Displaying Issues in Nagios XI


This article covers how to resolve the issue with Nagios XI that stops displaying the core configuration manager or the components inside the core configuration manager.

If this is the case, When using Core Configuration Manager (CCM), the interface does not work as expected, it does not appear to display correctly and generally it feels like there is a bug. This issues is related to the web browsers implementation of JavaScript. If possible, use a browser that more closely implements the ECMAScript Language Specification.

A quick way to see if this is the problem is to see if you experience the same issue using another web browser.


To fix this Nagios configuration Problem:

1. In the event of the the Core Config Manager not visible or components missing from the page, this generally relates to a proxy and the following steps may resolve this issue:

pear config-set http_proxy http://proxy:port

2. Make sure to change proxy:port to match your proxy server, example:

pear config-set http_proxy http://192.168.44.20:8080

3. Then execute the following:

pear install HTML_Template_IT

 After performing these steps go back to CCM and see if it works.

Read More



Zabbix tries to connect to the wrong database - Fix it now


This article covers how to fix Zabbix error, when Zabbix tries to connect to the wrong database.

Basically, when Zabbix tries to connect to the wrong database, we can simply resolve it by restarting the service.

Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual machines (VMs) and cloud services. Zabbix provides monitoring metrics, among others network utilization, CPU load and disk space consumption.


How do I fix Zabbix server is not running?

Zabbix server error due to problems with the firewall.

1. As a root user, we check and confirm whether the firewall is allowing connection to Zabbix Server port which is 10051. 

2. If not, then we add the following rule in the configuration file /etc/sysconfig/iptables. 

3. Finally, restart the service in order to fix the error.


How to turn off Zabbix server?

To Stop the Service:

1. Use PuTTY to log in as user robomanager to the server where Zabbix is installed.

2. Run the following command to switch to user root: su - root.

3. Run the following command to stop the Zabbix service: systemctl stop zabbix_server.service.


To monitor my zabbix port:

1. In order to test your configuration, access the Monitoring menu and click on the Latest data option. 

2. Use the filter configuration to select the desired hostname. 

3. Click on the Apply button. 

4. You should be able to see the results of your TCP port monitoring using Zabbix.


Where is zabbix config located?

The Zabbix installation process created an Apache configuration file that contains these settings. 

It is located in the directory /etc/zabbix and is loaded automatically by Apache.


How does Zabbix proxy work?

Zabbix proxy is a process that may collect monitoring data from one or more monitored devices and send the information to the Zabbix server, essentially working on behalf of the server. 

All collected data is buffered locally and then transferred to the Zabbix server the proxy belongs to.


Zabbix Server supported DATABASE ENGINE:

Zabbix Server and Proxy support five database engines:

1. IBM DB2

2. MySQL

3. Oracle

4. PostgreSQL

5. SQLite

Read More



Unable to add MySQL database in Plesk Customer Panel - Fix it now


This article covers how to fix issues that make it unable to add MySQL database in Plesk customer panel.


To resolve Cannot add MySQL database in Plesk Customer Panel:

1. Log in to Plesk and apply one of the following:

2. Enable Database server selection directive in Service Plans > Default > Permissions > Show more available permissions and press Update & Sync.

3. Switch MySQL default database server from None to localhost:3306 in Service Plans > Default > Hosting Parameters > Default Database Server and press Update & Sync.


Note:  it is also applicable to cases when Amazon RDS extension is installed. 

If it is needed to provide customer with the ability to select Amazon server, enable "database server selection" option.


How do I add a database to my Plesk Panel?

How to Create a New Database or Database User in the Plesk Control Panel

1. Log into your Control Panel.

2. Click on Databases.

3. Click on the Add New Database icon.

4. Next to Database Name enter the name you want to use.

For Type, choose either Microsoft SQL Server or MySQL (DNN uses the Microsoft SQL Server.).

Read More



Unable to add MS SQL database in Plesk - Fix it now


This article covers how to fix the error, Unable to add MS SQL database in Plesk.

Basically, the number of MS SQL databases is limited for the webspace, subscriptions, or reseller's plan.


In Web Admin Edition:

1. Log in to Plesk.

2. Go to Tools & Settings > License Management and check if Microsoft SQL Server support enabled or not:

a. If no, then it is required to purchase the MSSQL support first for the subscription.

MSSQL support is included in the Power Pack and Developer Pack.

b. If yes, then proceed to step 3.

3. Run the command below to get the current limit of MSSQL databases for the required webspace:

C:\> plesk bin subscription_settings --info example.com | findstr max_mssql_db

max_mssql_db 30 MS SQL databases

4. Increase the number of MSSQL databases for the required webspace (use the "-1" to set to the Unlimited value):

C:\> plesk bin subscription_settings -u example.com -max_mssql_db 100

plesk bin subscription_settings -u example.com -max_mssql_db -1


In Web Pro and Web Host Editions:

1. Log in to Plesk.

2. Go to Subscriptions > example.com > Account > Resources.

3. Find the MS SQL databases number.

a. If it reached its limit, increase it of the following ways:

Go to Subscriptions > example.com > Customize > Resources page and increase the MS SQL databases limit (changes will affect only this subscription).

Go to Subscriptions > example.com > Service Plan: Default > Resources page and increase the MS SQL databases limit (changes will affect all subscriptions assigned to this service plan).

b. If it is not reached the limit, then this limit is set on the reseller's level as also. Follow to the next step.

4. Go to Subscriptions > example.com > Subscriber: John Doe > Provider: Jane Doe.

5. Click the Change Plan button to increase the MS SQL databases number for all resellers assigned to this service plan.

Click the Customize button to increase the MS SQL databases number only for this reseller.

6. Find the MS SQL databases number and increase it to the required value.

Read More



Add MySQL database in Websitepanel and fix common errors


This article covers add MySQL database in Websitepanel and fix a common errors related to this task.

A database interface allows you to create and manage the existing MySQL databases. If you are creating a PHP based application or any application that uses a database, then you will need to create a database and a database user to access this database.


To create a MySQL database in WebsitePanel:

1. Click on the plan you want to add a MySQL database to.

2. Then click Databases.

3. Click MySQL.

4. Click Create Database.

5. Enter a name for your database.

6. Click Save.

7. You can click on the database you just added to edit it.

8. You can view existing users or delete or backup the database.

9. Click Save when you are finished


Success! You can view your added databases and see how many allowed databases you've used.

Read More



MySQL crash – Causes Recovery and Prevention methods


This article covers methods to fix and prevent MySQL downtime. Basically, many issues such as resource limits, #database table errors, file system errors, and so on, can lead to a MySQL crash.


To fix MySQL errors in cPanel?

You can also restart the MySQL service from WHM.

1. Login to WHM.

2. Navigate to Restart Services.

3. Now you can restart the MySQL service by clicking the icon “SQL Server(MySQL)”.


To use mysqlcheck, follow these steps:

1. As the root user, type the following command: cd /var/lib/mysql.

2. Replace the database with the name of the database that you want to check.

3. Mysqlcheck checks the specified database and tables.


How do I know if MySQL is running?

We check the status with the service mysql status command. We use the mysqladmin tool to check if MySQL server is running. 

The -u option specifies the user which pings the server. 

The -p option is a password for the user.


What does repair table do MySQL?

REPAIR TABLE repairs a possibly corrupted table, for certain storage engines only. 

This statement requires SELECT and INSERT privileges for the table. Although normally you should never have to run REPAIR TABLE , if disaster strikes, this statement is very likely to get back all your data from a MyISAM table.


What causes MySQL #tables to crash?

The major cause of the database corruption is the lack of free disk space on the server.

Other possible causes of MySQL table crashes include operating system problems, power failures, hardware issues, unexpected MySQL server termination, data corruption due to external programs, and so on.


To access your #MySQL database in Linux, please follow these steps:

1. Log into your Linux web server via Secure Shell.

2. Open the MySQL client program on the server in the /usr/bin directory.

3. Type in the following syntax to access your database: $ mysql -h {hostname} -u username -p {databasename} Password: {your password}

Read More



Advantages of NoSQL Databases - Get to know them now


This article covers the advantages of NoSQL Databases. #SQL databases are vertically scalable, NoSQL databases are horizontally scalable. SQL databases are table based, while NoSQL databases are document, key-value, graph or wide-column stores. 

SQL #databases are better for multi-row transactions, #NoSQL are better for unstructured data like documents or JSON.

#MongoDB, CouchDB, CouchBase, Cassandra, HBase, Redis, Riak, Neo4J are the popular NoSQL databases examples.

The structure of many different forms of data is more easily handled and evolved with a NoSQL database. 

NoSQL databases are often better suited to storing and modeling structured, semi-structured, and unstructured data in one database.


Main purpose of NoSQL?

NoSQL Database is a non-relational Data Management System, that does not require a fixed schema. 

It avoids joins, and is easy to scale. 

The major purpose of using a NoSQL database is for distributed data stores with humongous data storage needs. 

NoSQL is used for Big data and real-time web apps.


Reasons to Use a NoSQL Database includes:

1. Storing large volumes of data without structure. A NoSQL database doesn't limit storable data types.

2. Using cloud computing and storage. Cloud-based storage is a great solution, but it requires data to be easily spread across multiple servers for scaling.

3. Rapid development.


Main types of NoSQL databases?

There are four big NoSQL types: 

1. Key-value store

2. Document store, 

3. Column-oriented database,

4. Graph database. 

Each type solves a problem that can't be solved with relational databases. 

Actual implementations are often combinations of these. 

OrientDB, for example, is a multi-model database, combining NoSQL types.

Read More



Benefits of Data Warehouse in Business Organization


This article covers the Advantages of Data Warehouse. 

#Data #warehousing improves the speed and efficiency of accessing different data sets and makes it easier for corporate decision-makers to derive insights that will guide the business and marketing strategies that set them apart from their competitors. Improve their bottom line.

Unlike a database, which is focused on users inputting data, a data warehouse is architected for decision-making, ad hoc queries and analytics. Thus, enabling queries to be performed without any impact to your company's operational database.


A data warehouse is a type of data management system that is designed to enable and support business intelligence (BI) activities, especially analytics. Data warehouses are solely intended to perform queries and analysis and often contain large amounts of historical data.


A data warehouse can help support business needs, such as the ability to consolidate financial results within a complex company that uses different software for different divisions.


Benefits of a Data Warehouse:

1. Delivers enhanced business intelligence.

2. Saves times.

3. Enhances data quality and consistency.

4. Generates a high Return on Investment (ROI).

5. Provides competitive advantage.

6. Improves the decision-making process.

7. Enables organizations to forecast with confidence.

8. Streamlines the flow of information.


The key characteristics of a data warehouse are as follows:

1. Some data is denormalized for simplification and to improve performance.

2. Large amounts of historical data are used.

3. Queries often retrieve large amounts of data.

4. Both planned and ad hoc queries are common.

5. The data load is controlled.


A data warehouse is subject oriented because it provides information around a subject rather than the organization's ongoing operations.


Data warehouses will help you make better, more informed decisions for many reasons, including: 

1. Improved business intelligence

2. When you integrate multiple sources, you make decisions based on ALL of your data. 

3. Timely access to data: Quickly access critical data in one centralized location.

Read More



Methods to secure database server - Best Practices


This article covers different methods to secure a Database Server. Database security helps: Company's block attacks, including ransomware and breached firewalls, which in turn keeps sensitive information safe. It Prevent malware or viral infections which can corrupt data, bring down a network, and spread to all end point devices.


SQL injection vulnerabilities occur when application code contains dynamic database queries which directly include user supplied input. 

This is a devastating form of attack and BSI Penetration Testers regularly find vulnerable applications that allow complete authentication bypass and extraction of the entire database.

SQL injection, also known as SQLI, is a common attack vector that uses malicious SQL code for backend database manipulation to access information that was not intended to be displayed. 

This information may include any number of items, including sensitive company data, user lists or private customer details.


Some known database security issues:

Security risks to database systems include,

1. Data corruption and/or loss caused by the entry of invalid data or commands

2. Mistakes in database or system administration processes, sabotage/criminal damage and so on.


There are numerous types of databases and many different ways to hack them, but most hackers will either try to crack the database root password or run a known database exploit. 

If you're comfortable with SQL statements and understand database basics, you can hack a database.


Practices for Database Security:

1. Protect Against Attacks With a Database Proxy.

2. Set Up Auditing and Robust Logging.

3. Practice Stringent User Account Management.

4. Keep Your Database Software and OS Up-to-Date.

5. Encrypt Sensitive Data in Your app, in Transit, and at Rest.

Read More



Importance of Database Testing


This article covers the importance of database testing. Database Testing is Important in software testing because it ensures data values and information received and stored into database are valid or not. Database testing helps to save data loss, saves aborted transaction data and no unauthorized access to the information.


A database is typically designed so that it is easy to store and access information. 

A good database is crucial to any company or organization. This is because the database stores all the pertinent details about the company such as employee records, transactional records, salary details and so on.


Why do we do database #testing?

Database Testing is a type of software testing that checks the schema, tables, triggers etc. of the database under test. 

It involves creating complex queries for performing the load or stress test on the database and check its responsiveness. 

It checks integrity and consistency of data.


Why do we need database security?

Safeguarding the data your company collects and manages is of utmost importance. Database security can guard against a compromise of your database, which can lead to financial loss, reputation damage, consumer confidence disintegration, brand erosion, and non-compliance of government and industry regulation.


#Database #Security Best Practices includes:

1. Separate database servers and web servers.

2. Use web application and database firewalls.

3. Secure database user access.

4. Regularly update your operating system and patches.

5. Audit and continuously monitor database activity.

6. Test your database security.

7. Encrypt data and backups.

Read More



Optimize Magento Database to improve site speed


This article covers how to perform Magento #speed #optimization using open-source software. Basically, #eCommerce customers expect a website to load within 2 seconds.

Magento is a resource-heavy ecommerce platform that requires the right set of resources and configurations for optimum performance. 

Even if you have a sound infrastructure, there is a chance that your Magento powered store might be slow.


Developers who are responsible for maintaining the Magento stores generally make sure that they incorporate the best Magento 2 performance optimization practices into the projects. 

As a result, ecommerce stores perform at peak efficiency 24/7.


To achieve high speed it's very essential for your online store.


Importance of having speed boost of your #Magento site:

1. To increase traffic at your website.

2. To gain a customer preference to buy from your site only.

3. Increase in conversion rate.

Read More



Delete Data in SQL using DELETE statement - How to use it


This article covers how to Delete Data in SQL using the DELETE statement. 

The SQL DELETE Query is used to delete the existing records from a table.

You can use the WHERE clause with a DELETE query to delete the selected rows, otherwise all the records would be deleted.


In Structured Query Language, more commonly known as SQL, the DELETE statement is one of the most powerful operations available to users. 

DELETE operations irreversibly delete one or more rows of data from a database table. 

Being such a fundamental aspect of data management, it's important for SQL users to understand how the DELETE statement works.


The basic syntax of the DELETE query with the WHERE clause is as follows:

DELETE FROM table_name
WHERE [condition];

You can combine N number of conditions using AND or OR operators.


Note: Be careful when deleting records in a table! Notice the WHERE clause in the DELETE statement. 

The WHERE clause specifies which record(s) should be deleted. If you omit the WHERE clause, all records in the table will be deleted!


To Delete All Records:

It is possible to delete all rows in a table without deleting the table. This means that the table structure, attributes, and indexes will be intact:

DELETE FROM table_name;


DROP is used to delete a whole database or just a table. The DROP statement destroys the objects like an existing database, table, index, or view. A DROP statement in SQL removes a component from a relational database management system (RDBMS).

Read More



Redis Slow Log - More about it


This article covers how Redis Slow Log works. Redis Slow #Log is one of the best tools to debug and trace the Redis database. 

The Redis Slow Log is a system to log queries that exceeded a specified execution time. 

The execution time does not include I/O operations like talking with the client, sending the reply and so forth, but just the time needed to actually execute the command (this is the only stage of command execution where the thread is blocked and can not serve other requests in the meantime).


You can configure the slow log with two parameters: 

1. slowlog-log-slower-than tells Redis what is the execution time, in microseconds, to exceed in order for the command to get logged. Note that a negative number disables the slow log, while a value of zero forces the logging of every command. 

2. slowlog-max-len is the length of the slow log. The minimum value is zero. When a new command is logged and the slow log is already at its maximum length, the oldest one is removed from the queue of logged commands in order to make space.


Redis Slow Log configuration can be done by editing redis.conf or while the server is running using the CONFIG GET and CONFIG SET commands.

Available since 2.2.12.

This #command is used in order to read and reset the Redis slow queries log.


Redis slow log overview

The #Redis Slow Log is a system to log queries that exceeded a specified execution time. 

Slowlog, as its name, is used to record commands whose execution time exceeds limitation (a little slow).

The execution time does not include I/O operations like talking with the client, sending the reply and so forth, but just the time needed to actually execute the command (this is the only stage of command execution where the thread is blocked and can not serve other requests in the meantime).

The Redis SLOWLOG is used to help identify queries which are taking too long to execute.


You can configure the slow log with two parameters:

slowlog-log-slower-than tells Redis what is the execution time, in microseconds, to exceed in order for the command to get logged. Note that a negative number disables the slow log, while a value of zero forces the logging of every command. slowlog-max-len is the length of the slow log. The minimum value is zero. When a new command is logged and the slow log is already at its maximum length, the oldest one is removed from the queue of logged commands in order to make space.


The configuration can be done by editing redis.conf or while the server is running using the CONFIG GET and CONFIG SET commands.

Read More



MongoDB failed to load list of databases - Fix it now


This article covers how to resolve the error 'MongoDB failed to load the list of databases' can occur due to various reasons that include failed database user/password authentication, outdated Robo 3T version, and so on.

The error 'MongoDB failed to load the list of databases' means that you can't connect if there are no databases to list. 


To fix the error 'MongoDB failed to load the list of databases':

1. You can fix this issue with 1.2 connecting to a new mongo 4.2.

It's fixed when using robo3t version 1.3, which supports newer version of mongo.

2. You can create a database and a collection for it. 

Once you create a database and a collection, it works.

3. You will need to upgrade mongodb to the last version, so you can to connect in your local database.

Read More



Difference between BACPAC and DACPAC - More insight


This article covers more information about BACPAC and DACPAC and the difference between BACPAC and DACPAC.
A BACPAC file is a ZIP file with an extension of BACPAC containing the metadata and data from the #database. A BACPAC file can be stored in Azure Blob storage or in local storage in an on-premises location and later imported back into Azure SQL Database, Azure SQL Managed Instance, or a SQL Server instance.
DACPAC = Data Tier AppliCation Package. DACPAC is a single file which contains database model i.e. all files represent database objects. It's a binary representation of database project compatible with SSDT. The name comes from an extension of these files.
Once you extract the contents of the #DACPAC file, you'll see there are four different XML files within it.
These XML files do not contain any data from the database.
The database is scripted out only with the model information.

To import from a #BACPAC file into a new single database using the Azure portal:
1. Open the appropriate server page and then, on the toolbar, select Import database.
2. Select the storage account and the container for the BACPAC file and then select the BACPAC file from which to import.

Data tier controls the servers where the information is stored;
1. It runs a relational database management system on a database server or a mainframe and contains the computer data storage logic.
2. The data tier keeps data independent from application servers or processing logic and improves scalability and performance.

To import a .BAK file into #SQL Server:
1. Open #SSMS and click on Connect.
2. First let us go with Bak File importing.
3. Check the Device Button and Click on it.
4. Click on Add Button, choose the Appropriate bak file and then click on Ok.

Read More



MongoDB error network is unreachable - Fix it now


This article covers methods to resolve the error 'MongoDB error network is unreachable' which can occur due to many reasons that include network issues, if the mongo server is not started, and so on.

To resolve this #MongoDB #error:
1. On Ubuntu server, to open mongo shell run:

$ mongo

2. Inside mongo shell, type following command to create new a admin user.

> use admin;
> db.createUser({user:"admin", pwd:"password", roles:[{ role: "root", db: "admin" }]});

3. By default mongodb is configured to allow connections only from localhost(IP 127.0.0.1).
We need to allow remote connections from any ip address. The following change should only be done in your development server. Open up etc/mongod.conf file and do the following change.

# network interfaces
net:
port: 27017
bindIp: 0.0.0.0   #default value is 127.0.0.1


Also in the same mongod.conf file uncomment security option and add authorization option as shown below:

security:
authorization: enabled    


4. Save and exit the mongod.conf file and restart mongodb server:

$ sudo servcie mongod restart

Read More



Plesk Panel Database issues


This article covers the different #Plesk database errors. The main reason for database issues in Plesk is the misconfiguration of the PSA database.
Plesk employs the native functionality of database management tools for checking and repairing databases.
For example, for #MySQL databases it uses the mysqlcheck utility.

To check and repair a #database:
1. Go to Websites & Domains > Databases > Check and Repair in a database tools pane.
2. If problems are found, click the link See Details and Resolve.
3. The list of tables and corresponding problems will open.
For MySQL databases, you can choose the tables that you would like to repair.
For Microsoft SQL databases, you can repair an entire database only.
Click Repair Selected (for MySQL) or Repair (for Microsoft SQL).

Read More



Migrate database from MySQL to PostgreSQL using pgLoader


This article covers how to migrate a database using pgLoader with a single #command.
PostgreSQL, also known as “Postgres,” is an open-source relational database management system (RDBMS).
It has seen a drastic growth in popularity in recent years, with many developers and companies migrating their data to Postgres from other database solutions.
The prospect of migrating a database can be intimidating, especially when migrating from one database management system to another.

Facts about pgLoader:
1. pgLoader is an open-source #database migration tool that aims to simplify the process of migrating to #PostgreSQL.
2. It supports #migrations from several file types and RBDMSs — including #MySQL and SQLite — to PostgreSQL.
3. #pgLoader is a flexible tool that can perform a database migration in a single command.
4. With a few configuration tweaks, it can migrate an entire database from one physical machine to another using a secure SSL/TLS connection.

Read More



AWS error establishing a database connection


AWS error establishing a database connection happens as a result of different reasons that include corrupt MySQL, webserver down, bot hitting the server load, and so on.

AWS Error establishing a database connection means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server.

This could mean your host's database server is down.

Are you sure you have the correct username and password?

Are you sure that you have typed the correct hostname?

Are you sure that the database server is running?

The inability to connect to an Amazon RDS DB instance can have a number of root causes. The wrong DNS name or endpoint was used to connect to the DB instance. 

The Multi-AZ DB instance failed over, and the secondary DB instance uses a subnet or route table that doesn't allow inbound connections.

Read More



Zabbix Postgres vs MySQL


This article will help you give you more informations about #Zabbix Postgres vs MySQL and the criteria to choose between them. 

PostgreSQL is an Object Relational #Database Management System (#ORDBMS) whereas MySQL is a community driven DBMS system. PostgreSQL support modern applications feature like #JSON, XML etc. while MySQL only supports JSON.

PostgreSQL supports Materialized Views whereas #MySQL doesn't supports Materialized Views.

#PostgreSQL is known to be faster while handling massive data sets, complicated queries, and read-write operations. 

Meanwhile, MySQL is known to be faster with read-only commands.

Advantages Of Using MySQL:

1. It's Easy To Use.

2. Support Is Readily Available Whenever Necessary.

3. It's Open-Source.

4. It's Incredibly Inexpensive.

5. It's An Industry Standard.

6. It's Got A Few Stability Issues.

7. It Suffers From Relatively Poor Performance Scaling.

Read More



Galera cluster asynchronous replication


This article will guide you on steps to perform Galera cluster asynchronous replication for #MySQL.  Galera Cluster for MySQL is a true Multi-Master Cluster based on synchronous replication. It's an easy-to-use, high-availability solution, which provides high system up-time, no data loss and scalability for future growth.

To do you get a Galera Cluster:

1. Create a #Cloud Server. First, log in to your Cloud Server via an SSH tool such as putty.

2. Install #MariaDB Server on All Servers.

3. Configure Each Server in the #Cluster.

4. Initialize the Galera Cluster.

5. Test Galera Cluster #Replication.

Read More



Joomla error displaying the error page


This article will guide you on steps to resolve #Joomla #error displaying the error page which occurs due to trouble in the configuration file or a corrupt #database.

After you have determined the correct database settings, you are ready to update the configuration.php file. 

To do this, follow these steps:

1. In the FILES section of the cPanel home screen, click File Manager:

2. Navigate to the directory where Joomla is installed.

3. Right-click the configuration.php file, and then click Edit.

4. Locate the $db variable, and then replace the value with the name of the Joomla database that you obtained in the previous procedure. 

For example, if your database name is username_joom123, modify the text as follows:

public $db = 'username_joom123';

5. Locate the $user variable, and then replace the value with the database username that you obtained in the previous procedure. For example, if your database username is username_joomuser, modify the text as follows:

public $user = 'username_joomuser';

6. Locate the $password variable, and then replace the value with the database user's password. For example, if your database user's password is example_password, modify the text as follows:

public $password = 

7. Locate the $dbprefix variable, and then replace the value with the database table prefix that you obtained in the previous procedure. 

For example, if the database table prefix is jos_, modify the text as follows:

public $dbprefix = 'jos_';

8. irm that the $host variable is set to localhost as follows:

public $host = 'localhost';

9. Click Save Changes.

10. Use your web browser to go to the Joomla site's URL. The site should load.

Read More



DNN reset host password in database


This article will guide you on how to perform DNN reset host passwords in the database easily. 

Forgot DNN host password? 

1. DNN host account is the superuser or administrator of DotNetNuke websites. 

2. If you lost host or admin password for DNN site, you do not need to create a new DNN site again unless it is new installation. 

3. By the way, it is easy to create a new one if not yet. 

4. Do not miss out this guide to set up DNN website. 

5. DNN site has the password retrieval system which can help you recover password for non-superuser accounts. 

Read More



Wildcards in SQL Server


This article will guide to use #Wildcards in #SQL server. Also you will learn how to use and escape wildcards SQL-based databases. 

To use a wildcard character within a pattern: Open your #query in Design view. In the Criteria row of the field that you want to use, type the #operator Like in front of your criteria. Replace one or more characters in the criteria with a wildcard character.

i. The wildcard is an advanced search technique that can be used to maximize your search results in library databases. 

ii. Wildcards are used in search terms to represent one or more other characters. 

iii. The two most commonly used wildcards are: An asterisk (*) may be used to specify any number of #characters.

Read More



psql to restore a text dump How to do it


This article will guide you on steps to perform  text dump restoration. Basically, psql restores a text dump in the same file format.

You can backup a single table, a #schema, or a complete database. Select the name of the backup source in the #pgAdmin tree control, right click to open the context menu, and select Backup… to open the #Backup dialog. 

The name of the object selected will appear in the dialog title bar.

In #PostgreSQL, you can restore a database in two ways:

i. Using psql to restore plain #SQL script file generated by pg_dump and pg_dumpall tools.

ii. Using pg_restore to restore tar file and directory format created by the pg_dump tool.


To Restore Postgres Database:

1. Restore a postgres database. $ psql -U erp -d erp_devel -f mydb.sql.

2. Backup a local postgres database and restore to remote server using single command: $ pg_dump dbname | psql -h hostname dbname.

3. Restore all the postgres databases.

4. Restore a single postgres table.

Read More



Plesk MSSQL remote connection


This article will guide you on how to enable and resolve #MSSQL related #errors. MSSQL remote connection is disabled in #Plesk servers by default.

To enable remote connections to MS SQL server:

1. Connect to the server via RDP.

2. Press the Start button, go to Microsoft SQL Server XXXX (where XXXX is the MSSQL version) and click the SQL Server XXX Configuration Manager.

3. Open the SQL Server Configuration Manager (Local) > #SQL Server Network Configuration menu and click the Protocols for MSSQLSERVERXXXX (where XXXX is the MSSQL version).

4. Make sure that the TCP/IP protocol has the Enabled status

5. Double-click the TCP/IP protocol, go to the IP Addresses tab and scroll down to the IPAll section.

6. Specify 1433 in the TCP Port field (or another port if 1433 is used by another MS SQL Server) and press the OK button:

Note: the specified port, e.g, 1433, must be opened in the firewall.

Read More



Executing queries from the MySQL Command Line


This article will guide you on how to run queries from the 3MySQL command line. The MySQL #Command Line Tool is a useful way to run #queries from the command line. It’s easy to run select queries and display the results in either a horizontal or vertical format, and the queries run are kept in a history file which you can navigate through. 

If you don't want to run a particular query after all you can use the c command to clear it.

The most common way to get a list of the MySQL #databases is by using the mysql client to connect to the MySQL server and run the SHOW DATABASES command. If you haven't set a password for your MySQL user you can omit the -p switch.

To Connect to a MySQL Database:

1. Click Services tab.

2. Expand the Drivers node from the Database Explorer.

3. Enter User Name and Password.

4. Click OK to accept the credentials.

5. Click OK to accept the default schema.

6. Right-click the MySQL Database #URL in the Services window.

Read More



ISPConfig 500 internal server error


This article will guide you on different ways to resolve #ISPConfig 500 internal server #error and also you will learn about some factors that triggers this error such as exceeded MaxRequest value or PHP-fpm issue. 

The HyperText Transfer Protocol (#HTTP) #500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. Usually, this indicates the server cannot find a better 5xx error code to response.

The 500 internal server error runs on every page of your site when there's a problem with the server or file system that's powering your site. 

The cause most likely occurs in the root directory, where your WordPress files are, but it can also be caused by a problem on your host's server.

To Resolve 500 Internal Server Error:

1. Debugging the Issue. The first step is to make sense of the situation and try to make sense of the error.

2. Check if the Admin Works.

3. Revert Recent Changes.

4. Audit Your #Plugins/Extensions/Modules.

5. Check File Permissions.

6. Increase PHP #Memory Limit.

Read More



Restore a database in Alwayson Availability Group


This article will guide you on steps to restore a #database in alwayson availability group.

If you receive an #error that the database is in use, try to set the user to single user mode: USE master; GO ALTER DATABASE Database_name SET SINGLE_USER WITH ROLLBACK IMMEDIATE; Then try the restore with #recovery command again. Also, make sure you are on the latest service pack or cumulative update.

Creating a #SQL #Server AlwaysOn Availability Group.

Open SQL Server Management Studio and connect to the SQL Server instance. Expand the AlwaysOn High Availability folder in the Object Explorer. Right-click on the Availability Groups folder and select the New Availability Group Wizard.

To Restore a Database in a SQL Server AlwaysOn Availability Group:

1. Make the secondary server from which the backups were taken the primary server.

2. Remove the database to be restored from the AlwaysOn Availability Group.

3. Restore the database.

4. Add the database back into the Always Availability Group.

Read More



Configure Reporting Services in SQL Server


The article will guide you on the steps to follow to configure #reporting services after renaming the #SQL server. Also , you will learn how to rename the SQL server instance. 

To Configure #Report Server After Renaming SQL Server #Instance:

1. Go to #Database Setup page. 

2. Enter SQL Server name in Server Name and then click Connect. 

3. If Reporting Services is configured using the server name, you must update the database connection information whenever the server name is changed.

To change the service account for SQL Server Reporting Services:

i. Open Reporting Services Configuration Manager, and then connect to the instance of SQL Server Reporting Services.

ii. Click #Microsoft service Identity on the left pane.

iii. Change the account and the password in the Account text box and the Password text box, and then click Apply.

Read More



RoundCube CONNECTION FAILED Database Error


This article will guide you on the different methods to fix Database Error: Connection Failed error shows up due to database errors or #PHP #errors. 

Establishing a Database Connection #Error basically means that for some reason or another the PHP code was unable to connect to your #MySQL database to retrieve the information it needs to fully build that page. That's why the error is always shown on a blank page because there is no information about your site as it is not connected to your database.

Establishing a Database Connection Error Occur due to:

1. Incorrect Login Credentials.

2. Corrupt #Database

Read More



New files of configuration for Apache error in Plesk


This article will guide you on methods to fix the Plesk error : new files of configuration for Apache.
The causes of this Plesk error:
1. Mailman package is not installed.
2. Database related error.
3. PHP memory issue.
To fix this Plesk issue:
Mailman package is not installed
When you try to reconfigure the domain, you will get the following error.
# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
No valid mailman bindir detected
So, in this case it is clear that the issue is causing because the mailman package is missing.
To fix the issue, you can follow the steps mentioned below.
a) Download and install the mailman package from  http://autoinstall.plesk.com
b) After that remove all entries from the ‘Configurations’ table of the ‘psa’ database.
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e"delete from Configurations"
c) Remove all ‘Include’ records from configuration files and all content from the directory below:
# sed -i /Include/d /usr/local/psa/admin/conf/ip_vhosts_bootstrap.conf&& sed -i /Include/d /usr/local/psa/admin/conf/vhosts_bootstrap.conf&& sed -i /include/d /usr/local/psa/admin/conf/nginx_vhosts_bootstrap.conf&& sed -i /Include/d /usr/local/psa/admin/conf/webmail_horde_bootstrap.conf&& sed -i /Include/d /usr/local/psa/admin/conf/webmail_atmail_bootstrap.conf&& sed -i /Include/d /etc/httpd/conf.d/zz010_psa_httpd.conf&& rm -f /usr/local/psa/admin/conf/generated/*
d) Now you can reconfigure and that will fix the issues.
/usr/local/psa/admin/bin/httpdmng --reconfigure-all
This will resolve the error.

Read More



Database version or build from backup file


This article will guide you on how to determine the database #version or build from a #backup file.
To know what #SQL version a #database is:
The first is by using either Enterprise Manager or SQL Server Management Studio and right clicking on the instance name and selecting Properties. In the general section you will see information such as on the following screenshots. The "Product version" or "Version" gives you a number of the version that is installed.
In order to find the SQL Server version from a bak file:
1. Here is the output returned by the RESTORE HEADERONLY statement. Here you will see a DatabaseVersion column that contains the value.
2. That's how you find out from which version of SQL Server a given backup file came.

Read More



Improve SQL Server Bulk Data Import Performance


This article will guide you improve #bulk #data #import #performance. The BULK INSERT command is much faster than bcp or the data pump to perform text file import operations, however, the BULK INSERT statement cannot bulk copy data from #SQL Server to a data file. Use the bcp utility instead of DTS when you need to export data from the SQL Server table into a text file.
To Speed up SQL Bulk Insert with #transactions:
1. Declare the variables that store the number of desired items ( @items ), the size of the chunks( @chunk_size ) and the counter of the number of executed inserts( @counter )
2. Open the first transaction and initialize the while loop.

Read More



Steps to create SQL server alias


Steps for Deleting an alias using SQL Server Configuration Manager ?
#SQL aliases are used to give a table, or a column in a table, a temporary name. Aliases are often used to make column names more readable. An alias only exists for the duration of the query.
To find my SQL Server #alias name:
Expand SQL Native client #configuration, and you can find a subfolder Alias. By default, we do not have any alias defined for the SQL Server #instance. In the screenshot, we can see it does not see any items for the Alias. Right-click on Aliases and click on New Alias.
1. Take SQL Server Configuration Manager and go to SQL Server Native #Client Configuration, then click Aliases.
2. We can right-click the alias that we want to delete, and then click Delete.
3. A warning will pop up, we can click on Yes to remove the alias. This removes the SQL Server alias.

Read More



Orphaned users in SQL Server


This article will help you to identify #Orphaned #Windows #Logins and Groups in #SQL Server.
To Resolve an Orphaned User:
To map an orphaned user to a login which already exists in master, execute the ALTER USER #statement in the user database, specifying the login name.
ALTER USER <user_name> WITH Login = <login_name>; When you recreate a missing login, the user can access the database using the password provided.
To fix orphaned users for all databases in SQL Server:
1. Login with same name as user exists – generate ALTER LOGIN to map the user to the login.
2. No login with same name exists – generate DROP USER to delete the orphan user.
3. Orphan user is [dbo] – change the database owner to SA (or whatever SA was renamed to).

Read More



Auto shrink feature in SQL server


This article will guide you on how to enable and disable AutoShrink #database property. Basically, it is not recommended to enable the AutoShrink database property as it can cause many issues in the #SQL Server.
Auto Shrink is database property that allow SQL Server to automatically shrink database files if its value set to ON/True. Shrinking a database is not a good practice because it is very expensive operation in terms of I/O, CPU usage, locking and #transaction log generation.
Users can enable and disable database auto shrink option using SSMS and T-SQL both ways.
To turn on auto shrink in SQL Server:
1. Activating the database auto shrink by using #SSMS:
2. Enable database auto shrink using T-SQL:
3. Database >> #Reports >> Standard Reports >> Disk Usage.
4. Check free space for the database files:
5. Shrink database file:

Read More



Share Data between Docker Containers


This article will guide you on steps to share #data between #docker #containers. To mount a data volume to a container add the --mount flag to the docker run #command. It adds the volume to the specified container, where it stores the data produced inside the virtual 3environment.

From the Docker #host, as Docker Volumes: Volumes are stored in an area of the host filesystem that's managed by Docker. Bind mounts can map to any folder in the host filesystem, so access can't be controlled from a Docker process and can pose a security risk as a container could access sensitive OS folders.

A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.

To copy from Docker to local container:

1. First, set the #path in your localhost to where the file is stored.

2. Next set the path in your docker container to where you want to store the file inside your docker container.

3. Then copy the file which you want to store in your docker container with the help of CP command.

Read More



Install InfluxDB on CentOS 7


This article will guide you on steps to Install #InfluxDB on #CentOS 7. You can Turn any InfluxData #instance into a production-ready cluster that can run anywhere. Easily create and share a comprehensive monitoring solution.

InfluxDB is similar to a #SQL #database, but different in many ways. Relational databases can handle time series data, but are not optimized for common time series workloads. InfluxDB is designed to #store large volumes of time series data and quickly perform real-time analysis on that data.

The local InfluxDB configuration file is located here: Linux: /etc/influxdb/influxdb. conf. macOS: /usr/local/etc/influxdb.

To Install InfluxDB:

Option 1 : Download the InfluxDB archive via the browser.

Option 2 : Adding the #repositories to your package manager.

i – Start your InfluxDB service.

ii – Configure your InfluxDB instance.

iii – Test your InfluxDB instance.

iv – #Download InfluxDB 2.0 archive from the website.

Read More



Instant File Initialization in SQL server


This article will guide you on how to enable Instant File Initialization (#IFI) in #SQL Server. 

Disk space reservation without initialization is called Instant File Initialization. 

To enable #database instant file initialization:

1. First, go to Start Menu and run secpol.msc to bring up Local #Security #Policy.

2. Expand the Local Policies Folder.

3. Click on User Rights Assignment.

4. Go to the Perform Volume Maintenance Tasks option and double click it.

5. Add your SQL Server Service account, and click OK.

6. Restart your SQL Server services (MUST DO).


Read More



Steps to Back Up And Restore Nagios System


This article will guide you on how to perform #Backup and #Restore of the #Nagios System are important aspects of the #administration and #maintenance of the #system. 

Backups are an important aspect of administration and maintenance of your system. They can easily facilitate the #migration of a Nagios XI #installation between a virtual server and physical server, and the design of a fail-over or #disaster #recovery instance of Nagios XI.

There are three main types of backup: full, incremental, and differential:

1. #Full backup. As the name suggests, this refers to the process of copying everything that is considered important and that must not be lost.

2. #Incremental backup. 

3. #Differential backup.

Read More



How to create bacpac file from SQL server


This article will guide you on how to export an existing #database into a #BACPAC file is through #SSMS. A bacpac is a dacpac + data, while a dacpac only contains the schema of the database.

To create a Bacpac file:

a. To #export a database using the Azure portal, open the page for your database and click Export on the toolbar.

b. Specify the BACPAC filename, select an existing Azure storage account and container for the export, and then provide the appropriate credentials for access to the source database.

c. Click OK.

To import from a BACPAC file into a new single database using the Azure portal:

1. Open the appropriate server page.

2. On the toolbar, select Import database. 

3. Select the storage account and the container for the BACPAC file and then select the BACPAC file from which to import.

Read More



How to modify MSSQL Database Autogrowth Configuration


This article will guide you on how #MSSQL Database Autogrowth Configuration works. Therefore do not rely on the default #SQL Server Data and Log file Autogrowth value and must always set it to more realistic values depending upon the usage of the database.

To see data file growth in SQL #Server:

1. Connect to a SQL instance and right-click on a database for which we want to get details of Auto Growth and Shrink Events. 

2. It opens the disk usage report of the specified #database. 

3. In this #disk usage report, we get the details of the data file and log file space usage.

To Change default database location via SQL Server Management Studio:

i. Right Click on Server and Select "Properties".

ii. In the "Server Properties" dialog box, navigate to "Database Settings" tab and data/log files location under "Database default locations" group. 

iii. Click on "OK" to apply changes.

Read More



Create a DigitalOcean Space and API Key


This article will guide you on the steps to create #DigitalOcean #Space and #API Key. You will also see the #server #URL, bucket name (or Space name), access key, and secret. With this information you can connect most any S3-compatible client or library to your new DigitalOcean Space!

Read More



Steps to install MySQL in Docker Container


This article will guide you on the steps to install and configure #MySQL in #Docker #container. MySQL is a well-known open-source relational #database management system and one of the most popular web server solutions. It stores and structures data in a meaningful manner, ensuring easy accessibility. Setting up a database in Docker is simply building a container based on a MySQL #image. 

To Set Up & Configure a MySQL Docker Container:

1. Running a MySQL Docker Container.

2. Installing a MySQL Docker Container.

i. Pull the MySQL Docker Image.

ii. Deploy the MySQL Container.

iii. Connect to the MySQL Docker Container.

3. Configure MySQL Container. Manage #Data Storage.

4. Start, Stop, and Restart MySQL Container.

5. Delete MySQL Container.

Read More



Last Restore Time of SQL server database


This article will guide you on how to collect #database restoration #history. The #SQL server database last restore time can be found using the system table in 'msdb'.
We get the following database #restoration history in my environment.
i. restore_date: It shows the database restoration #date.
ii. destination_database_name: We can get the destination database name using this #column.
iii. user_name: it gives user name that performed the restoration for that particular database.

Read More



How to install WordPress using One-Click Install on DigitalOcean


This article will guide you on the process to install #WordPress by using One-Click Install feature on DigitalOcean.
#DigitalOcean is a cloud hosting provider headquartered in New York City with data centers across the globe. Its seamless connectivity allows users to deploy and scale multiple web applications simultaneously without any lag. DigitalOcean offers private virtual Linux OS-powered machines called  ‘droplets’.

Read More



Working with Database Configuration in Laravel


This article will guide you on steps to set up #development and testing databases for Laravel by using database migrations and #seeders. Database migration means moving your data from one platform to another. To run #laravel migrations, first you have to configure your #database connection, and then you use Artisan, Laravel's #command line interface, to install the migrations table and run, revert, create. This command causes #Artisan to create a special table in your database to keep track of what #migrations have already been executed.

Read More



How to configure Redis as PHP Session Handler on Ubuntu 14 04


This article will guide you on the steps to configure Redis as a #PHP Session Handler.  #Redis is a powerful and fast key-value storage service. It can also be used as a #session handler for PHP, enabling scalable PHP #environments. Redis server can be used as a session handler for a PHP application running on Ubuntu and it is a data structure server. 

All of the data is stored in #RAM, so the speed of this system is phenomenal, often performing even better than #Memcached.

Redis is much more than a cache. But unlike a cache, Redis lets you operate on the values. There are 5 data types in Redis - Strings, Sets, Hash, Lists and Sorted Sets. Each data type exposes various #operations.

Read More



Installation and Configuration of ClamAV


This article will guide you on the steps to install #Clam #AntiVirus which is an open-source #antivirus tool to detect many types of #malicious #software, including #viruses. 

Read More



How To Connect to a Redis Database Different ways to do it


This article will guide you on the steps to connect to a #Redis #database using different commands like redis-cli using #commands.

Running redis-cli followed by a command name and its arguments will send this command to the Redis instance running on localhost at port 6379. You can change the host and #port used by redis-cli, just try the --help option to check the usage information.

Read More



SQL server error 1101


This article will guide on the steps to resolve #SQL SERVER ERROR "1101 : Could not allocate a new page for database because of insufficient #disk space in filegroup".

You can make sure there is enough Hard Disk space where #database files are stored on #server and Turn on AUTOGROW for file #groups.

Read More



Types of SQL server backups


This article will guide you on the different types of SQL Server backups and how to use them to run #SQL Server #backups to safeguard our #databases from user #errors, media failure, #hardware failure, and so on.

A full database backup backs up the whole database. This includes part of the #transaction #log so that the full database can be recovered after a full database backup is restored.

Read More



Backup, Restore and Migrate a MongoDB database on CentOS 8


MongoDB is highly scalable, using shards. Horizontal scalability is a big plus in most #NoSQL databases. MongoDB is no exception. It is also highly reliable due to its replica sets, and the data is replicated in more nodes asynchronously.

This article will guide you on the steps to perform #backup, #restore and #migrate a #MongoDB #database on #CentOS 8.

Read More



Recovering Zimbra LDAP database from backup


This article will guide you through the right steps to restore LDAP database from backup.

Read More



Steps to sync two Apache web servers


This article will guide you on how to setup syncing Apache web servers which involves a number of procedures such as installation and configuration of LSyncD, setting up Apache Configuration Replication, and so on.

Read More



Implementing SQL Constraints within Transactions


This guide will show you how SQL is can be used to defer constraints thin a transaction. If implemented correctly, the terminated transaction does not create any data that violates a constraint available to other transactions.

Read More



Recovering a database from suspect mode in SQL


This article will guide you through the process of repairing  a database which is in Suspect mode in SQL by performing consistency check on database in emergency mode and executing ALLOW DATA LOSS in single user mode.

Read More



MongoDB remote access configuration for Ubuntu


This article will guide you through the steps you can take to configure remote access for MongoDB on Ubuntu 18.04.

Read More



Using phpMyAdmin to manage Databases


With phpMyAdmin, the administration of the database is made easy by its user friendly interface.

Read More



how to solve cURL error 60 SSL certificate problem


How to fix cURL error 60 ssl certificate problem which occurs when cURL cannot find any valid certificate to communicate securely over https.

Read More



ioncube installation in Directadmin control panel


Steps taken to get ioncube loader installed in a Directadmin control panel.

Read More



Solution to Nagios access forbidden error 403


Most efficient way to fix Nagios access forbidden error 403.

Read More



Solve SQL server error 7416


Most sql users discover that the logins which they used before suddenly develops server error 7416.

Read More



Solve phpMyAdmin Timeout error 1440 session


We have dealt with numerous cases of MySQL and phpMyAdmin Errors and support request from our customers regarding Databases related errors as part of our Linux Support Services.

Read More



How to fix Horde Fatal Error


Fatal Error in Horde Webmail is experienced by most users when they are about logging into their Email.

Read More



Fix CodeIgniter Error 404


An #Error 404 is very common and we have seen our customers complain about it in their #CodeIgniter application website. This error means that there is a an incorrect configuration in the server files. Errors in the .htaccess file as well as the application routes.php file can cause this.

Read More



Easy fix to SQL error 5023


From time to time, we do receive SQL related server bugs queries of which one of it was "SQL error 5023".

This SQL error is very catastrophic and it tends to disrupt the SQL server when it is trying to start up.


To fix SQL Server Error 1225:

1. Click WindowsKey + R and enter services. msc.

2. Once Services opens scroll down and locate service SQL Server.

3. Highlight the service and click START.

4. Wait for the service to start and retry to connect to your MSSQL instance.

Read More




For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com






Focus on your business, not your servers.

Click Here to Learn More