Databases page 1 of 4 for 32 posts

The procedure to change the request ID for ServiceDeskPlus MSP product (v10.5 and later) is outlined below. Navigate to the location of ServiceDeskPlus MSP installation and change into the pgsql\bin directory in a command prompt. C:\ManageEngine\ServiceDeskPlus-MSP\pgsql\bin> psql -U sdpadmin -p 65432 -d servicedesk -h 127.0.0.1 Enter the password sdp@123 Queries for the respective modules: REQUEST insert into workorder(workorderid,requesterid,createdtime,respondedtime,duebytime,completedtime,timespentonreq,isparent,is_catalog_template,fr_duetime,haschange,hascausedbychange,hasproblem,surveystatus,hasdraft,resolvedtime) Continue Reading...

ServiceDesk Plus MSP 10.5 Postgre SQL password

The latest release of ManageEngine ServiceDesk Plus MSP changes the default user and password of the Postgres SQL database. Previously, the command to connect to the database was: psql -U postgres -p 65432 -d servicedesk -h 127.0.0.1 The new change shows that there is a change in username and password as follows: psql -U sdpadmin -p 65432 -d servicedesk -h 127.0.0.1 Username: sdpadmin Password: sdp@123 Continue Reading...

WordPress SQLite to MySQL Migration Complete

Just finished migrating my website from SQLite to MySQL. What a rush. (lol) It was actually not as bad as I thought. A lot of sed, grep and other sorcery involved; especially in transforming of SQLite statements to MySQL. Some quick commands I used: sqlite techish.db .dump > production_2018-08-23.dump.sql I found that it used quotes for tables and column names, so I had to remove those first and foremost. sed -i '/INSERT INTO/,/VALUES (/s/"//g' production_2018-08-23.dump.sql Next Continue Reading...

400 Million Records in MySQL

So I'm trying to figure out a way to make searching a VARCHAR in MySQL fast when there are 400 million rows. I tried the UNIQUE approach using alter table names add unique(name(15)); in the table but I have some duplicates apparently, so now I'm trying a different method. I'm going to create multiple tables;  a-z, 0-9. Based on the input query such as SELECT * FROM name WHERE name='rich' I'll split that out and re-write the query such as SELECT * FROM r_name WHERE name='rich'. Continue Reading...

SQL2008R2 Licensing Quick Reference updated (PDF)

SQL2008R2_LicensingQuickReference-updated

SQL Server 2016 SP1 Edition Limit Changes

Microsoft made the following changes in their documentation (see screenshot above) to accurately reflect the memory limits on lower editions of SQL Server.

Edition Information:  https://www.microsoft.com/en-us/sql-server/sql-server-editions
Estimate Memory Requirements for Memory-Optimized Tables

Key Points

The limits for In-Memory OLTP data is per database.
The limits for Columnstore segment cache is per SQL Server instance across all the databases in the instance.

Example Scenario
A Continue Reading...

Change WordPress Password using MySQL

If the Forgot password option doesn't work for you (which it really should), then you can change the password of your self-hosted WordPress login. Check the contents of wp-config.php for the database login. Use that login information for MySQL login. define('DB_NAME', 'wpdatabase'); define('DB_USER', 'wpdbuser'); define('DB_PASSWORD', 'wpdbpassword'); Replacing DB_USER and DB_NAME from that command with the values from wp-config.php, enter the following command to connect to the database Continue Reading...

Calculate Date Differences in MySQL

There is a function in MySQL that will calculate the number of days between two given dates:  datediff Example mysql> select datediff('2014-06-09','2014-07-07'); +----------------------------------------------+ | datediff('2014-06-09','2014-07-07') | +----------------------------------------------+ | -28 | +----------------------------------------------+ 1 row in set (0.00 sec) Calculate Days Between Now and Specific Date mysql> select datediff(now(),'2014-07-01'); +------------------------------+ | Continue Reading...

MSSQL Find Last Date & Time Database Table Accessed

This is a T-SQL that will show all the last access date and time for Select, tables in a database.
Continue Reading...

MSSQL Server Uptime Using T-SQL

A sample T-SQL for determining uptime of a Microsoft SQL Server.
Continue Reading...