How to Install SQL Server on Red Hat- Linux

The document for - how to  Install SQL Server on Red Hat -Linux       Download

Last cluster failover sql script to find out

--Last cluster failover sql script to find out

CREATE TABLE #ErrorLog(
LogDate DATETIME,

ErrorSource NVARCHAR(MAX),

ErrorMessage NVARCHAR(MAX)

)
CREATE TABLE #NumberOfLogs(

ID INT PRIMARY KEY NOT NULL,

LogDate DATETIME NOT NULL,

LogFileSize bigint
)
 
INSERT INTO #NumberOfLogs(ID,LogDate,LogFileSize)

EXEC master.dbo.xp_enumerrorlogs

DECLARE @ErrorLogID INT

DECLARE cNumberOfLogs CURSOR FOR

SELECT ID

FROM #NumberOfLogs

OPEN cNumberOfLogs

FETCH NEXT FROM cNumberOfLogs INTO @ErrorLogID

WHILE @@FETCH_STATUS = 0

BEGIN

INSERT INTO #ErrorLog(LogDate,ErrorSource,ErrorMessage)

EXEC sp_readerrorlog @ErrorLogID, 1, 'NETBIOS'

INSERT INTO #ErrorLog(LogDate,ErrorSource,ErrorMessage)

EXEC sp_readerrorlog @ErrorLogID, 1, 'SQL Server is terminating'

FETCH NEXT FROM cNumberOfLogs INTO @ErrorLogID

END

CLOSE cNumberOfLogs

DEALLOCATE cNumberOfLogs

SELECT LogDate, ErrorMessage FROM #ErrorLog

DROP TABLE #ErrorLog

DROP TABLE #NumberOfLogs

MySQL database migration from one server to another server.

Migrating a MySQL database from one server to another is a common DBA task, whether for hardware upgrades, disaster recovery, or server consolidation. In this guide, we will walk through the process of migrating a database from Testmysql01 to Testmysql02 and updating the web application accordingly.

MySQL database migration from one server to another server.

Connect to Testmysql01 using ssh

Take a dump of Test_database database

[root@Testmysql01 ~]# mysqldump -u root -p Test_database  > /opt/Test_database.sql

Copy the Dump file to Testmysql02

[root@Testmysql01 ~]# scp /opt/Test_database.sql root@Testmysql02.domain.com:/opt

[root@Testmysql01 ~]# Exit

Connect to Testmysql02 using ssh

connect to MySQL

[root@Testmysql02~]# MySQL -u root -p

Create Database and grant permission for the user

MySQL> create database Test_database;

MySQL> GRANT ALL ON Test_database.* TO testuser@'%' IDENTIFIED BY 'password';

MySQL> quit

Import Dump to new database

[root@Testmysql02~]# MySQL -u root -p Test_DBA < /opt/Test_DBA.sql

[root@Testmysql02~]# Exit

Connect to webserver using RDP.

Navigate to C:\inetpub\Test_database\Test_dat
abase\config

Edit file config.php and change 'dbhost' => in the file to Testmysql02.domain.com.

verify 'dbuser' => and 'dbpassword' => is defined correctly.

restart the site from IIS manager

connect to Test_database  site and verify everything is working fine.

Upgrading SQL Server 2014 Standard to Enterprise Edition

Upgrade SQL Server 2014 Standard to Enterprise document..          Download

Upgrading SQL Server 2014 Standard Edition to Enterprise Edition can unlock advanced features such as online indexing, advanced high availability, and enhanced performance. This guide provides a structured approach to ensure a smooth and successful upgrade.

Prerequisites

Before proceeding with the upgrade, ensure the following:

  • Backup: Take full database and system backups.

  • Check Compatibility: Verify application compatibility with Enterprise Edition features.

  • Disk Space: Ensure sufficient storage for the upgrade.

  • License Key: Have a valid Enterprise Edition license key.

  • System Requirements: Confirm that the system meets Enterprise Edition hardware requirements.

  • User Notifications: Inform stakeholders about potential downtime.

Step-by-Step Upgrade Process

Step 1: Launch SQL Server Setup

  1. Log in to the SQL Server host with administrative privileges.

  2. Insert the SQL Server 2014 Enterprise installation media or mount the ISO file.

  3. Run setup.exe from the installation media.

Step 2: Select Edition Upgrade Option

  1. In the SQL Server Installation Center, select Maintenance.

  2. Click Edition Upgrade.

Step 3: Validate Installed Instance

  1. The Edition Upgrade wizard will detect installed instances.

  2. Select the instance of SQL Server 2014 Standard that you want to upgrade.

  3. Click Next.

Step 4: Enter the Enterprise Edition Product Key

  1. Enter your valid Enterprise Edition product key.

  2. Click Next.

Step 5: Accept the License Terms

  1. Read the License Agreement.

  2. Accept the terms and click Next.

Step 6: Perform Rule Checks

  1. The setup will run pre-upgrade checks.

  2. Resolve any reported issues before proceeding.

  3. Click Next once all checks pass.

Step 7: Upgrade the Edition

  1. Click Upgrade to initiate the process.

  2. Wait for the upgrade to complete.

  3. Once completed, click Close.

Post-Upgrade Steps

Step 8: Verify Upgrade Success

  1. Open SQL Server Management Studio (SSMS).

  2. Run the following query to check the new edition:

    SELECT SERVERPROPERTY('Edition') AS Edition;
  3. The output should display Enterprise Edition.

Step 9: Restart SQL Services

  1. Open SQL Server Configuration Manager.

  2. Restart the SQL Server services to apply changes.

Step 10: Validate Application and Database Performance

  1. Test critical applications for compatibility.

  2. Check for any performance degradation.

  3. Monitor error logs for potential issues.

Step 11: Enable Enterprise Features (Optional)

  • Online Indexing

  • Partitioning

  • Data Compression

  • Advanced High Availability (AlwaysOn)

Upgrading SQL Server 2014 Standard to Enterprise Edition provides enhanced performance, scalability, and availability. Following this step-by-step guide ensures a smooth transition while minimizing risks. Always test in a non-production environment before upgrading a live system.

Additional Resources

Have you recently performed an SQL Server upgrade? Share your experience in the comments below!