Create the Server Key and Certificate Signing Request Start off by creating the 1024 rsa private key. sudo openssl genrsa -des3 -out /etc/nginx/conf.d/i90runner.key 1024 sudo openssl req -new -key /etc/nginx/conf.d/i90runner.key -out /etc/nginx/conf.d/i90runner.csr Remove the Passphrase sudo cp /etc/nginx/conf.d/i90runner.key /etc/nginx/conf.d/i90runner.key.org sudo openssl rsa -in /etc/nginx/conf.d/i90runner.key.org -out …
xp_cmdshell command to Add User
Add user to Admin Group through SQL Server Its absolutely bad practice to turn on xp_cmdshell without comprehensive security audit and security testing. By default this feature is turned off. If you end up having the permission to execute xp_cmdshell, you can do all kind …
Connect to SQL Server When SA or Service Account Credentials not Available
Connect to SQL Server When SA Account or Service Account Credentials not Available : I recently inherited the SQL Serer which was running under a user account who left the company and no one knows the password for sa account. My task was to fix …
Move SQL Server Database to Different Location
Move SQL Server Database to Different Location : There are several way to do this but I find this option being simple.Sometimes we face the issue with Drive being full. It happens when we have Database on C Drive and we usually don’t allocate much …
SQL Server Waits and Queues
SQL Server Waits and Queues : I watched Paul Randall Videos on Wait Types and which inspired me to write a simple post on wait types on logical way. We all have written queries, TSQL statements to perform CRUD ( Create, Read, Update , Delete …
Nginx Config for Perma Links
NGINX Config Change to enable Permalink changes : By default WordPress links are configured similar to ” https://ramblingsofraju.com/?p=123 “. If you need to change this URL to be something SEO friendly and other than default URL which points to the ID , you can choose …
SQL Join Diagram and Query
SQL Join Diagram and Query Create TableA and TableB and Populate Data CREATE TABLE TableA ( ID INT IDENTITY(1, 1) , [Key] NVARCHAR(255) , Value NVARCHAR(4000) , CreatedDateTime DATETIME2 DEFAULT GETUTCDATE() , CreatedBy NVARCHAR(50) DEFAULT CURRENT_USER , Status TINYINT DEFAULT 1 ); CREATE TABLE TableB …
Run SQL Scripts using PowerShell
Run SQL Scripts using PowerShell We all have the need to run SQL Scripts against Multiple Servers on Daily Basis. Sometimes, Its cumbersome to manually run the scripts against the server using Management Studio. This powershell Script comes handy to run multiple scripts against specified …
Common SQL Tasks I Do and Scripts
Common SQL Tasks I Do and Scripts Restore a database from Backup : RESTORE FILELISTONLY FROM DISK = ‘\\FileShare\Database\Database.bak’ RESTORE DATABASE SmarterTrack FROM DISK = ‘\\FileShare\Database\Database.bak’ WITH REPLACE , MOVE ‘SmarterTrackModel’ TO ‘G:\SQLServer\MSSQL10_50.DEV2008R2\MSSQL\DATA\SmarterTrack.mdf’ , MOVE ‘SmarterTrackModel_log’ TO ‘G:\SQLServer\MSSQL10_50.DEV2008R2\MSSQL\DATA\SmarterTrack_log.ldf’ EXEC sp_helpdb ‘SmarterTrack’ Run Multiple SQL Files …
Common SQL Errors and Solutions
Error : Msg 7411, Level 16, State 1, Line 1 Server ‘DEVSQLDEV2008’ is not configured for RPC. Solution : exec sp_serveroption @server=’DEVSQLDEV2008′, @optname=’rpc’, @optvalue=’true’ exec sp_serveroption @server=’DEVSQLDEV2008′, @optname=’rpc out’, @optvalue=’true’ Error : 2014-09-11 16:14:23.410 Logon SSPI handshake failed with error code 0x8009030c while establishing a …