Posts

Showing posts from 2023

Install-dbaInstance,dbatools

Image
The below piece of code from dbatools PowerShell module will insall SQL Server installation. Install-DbaInstance ` -SqlInstance RAMESH\UAT ` -Version "2016" ` -InstanceName "UAT" ` -SaCredential "sa" ` -Feature Default ,Tools ` -InstancePath "D:\RAMESH_UAT\DATA" ` -DataPath "D:\RAMESH_UAT\DATA" ` -LogPath "G:\RAMESH_UAT\LOG" ` -TempPath "D:\RAMESH_UAT\TEMPDB" ` -BackupPath "D:\RAMESH_UAT\BACKUP" ` -AdminAccount "RAMESH\HI" ` -Port 1433 ` -ProductID "13.0" ` -EngineCredential "RAMESH\HI" ` -AuthenticationMode Mixed ` -Authentication Default ` -AgentCredential "RAMESH\HI" ` -SaveConfiguration "D:\RAMESH_UAT\BACKUP" ` -Verbose ` -Path "D:\SoftWares_NEVERDELETE\SQLServer\SQLServer2016Enterprise\SQL_Server_2016_Enterprise x64" ` -Debug

OSTRESS

Image
 "OSTRESS" is one of the RML Utilities ( RML Utilities or RML Utils ) with which we can estimate the load on the pressure. However I am not going to explain this feature in detail just adding the command how to run it. Before we run the below command we need to download RML Utilities and can start working with it. Here I am explaining about OSTRESS. You need to run this in the "CMD" not in PowerShell. 1) Install RML Utilities 2) Chnage teh directory(CD) to that path or folder  where you install RML utilities. 3) -n30--> 100000 Connections parallelly run the same query 100000 times which mean one connection will run 100000 queries, here the query is same.

How to download script or modules from GitHUB.

Image
The last portion will shows us the user or author name and module for instance see the image below. git clone https : //github.com/Stephanevg/PSHTML.git

How to make server not go into LOCK mode continuously

Image
If we make the changes below in " gpedit.msc " from run command. The system will NOT GO into lock mode. The below changes I made it in Windows Server 2012 R2. 1) Go to run command and pass value as "gpedit.msc" and follow the path below. 2) Computer Configuration-->Administrative Templates-->System-->Power Management-->Video and Display Setting-->Turn off the display(plugged in) and make the change below. Invoke-Command ` -ComputerName SERVERA.RAMESHTECH.COM,SERVERB.RAMESHTECH.COM,SERVERC.RAMESHTECH.COM ` -ScriptBlock {powercfg /change monitor-timeout-ac 0 powercfg /change monitor-timeout-dc 0 powercfg /change standby-timeout-ac 0 powercfg /change standby-timeout-dc 0 } -Verbose

How to create an SQL Server Alias name and how to connect it from another SQL Server which is on another Windows Server

Image
  I have two sql server nodes NODE1 and NODE2 and I am creating an alias for NODE2 default sql server instance and want to give an alias name as myNode2. Follow the procedure below. 1) Connect NODE2 windows server and open SQL Server Configuration Manager and go to "SQL Native Client 11.0 Configuration" and under which you can find "aliases" Right click and new alias and the below window will pop up. Provide the values as below for the parameters and click on apply and after that ok. Alias Name: myNode2 Port No: 1433 Server : NODE2 Now you could see the value like below from SQL Server Configuration Manager. Try to create the same from "SQL Server Network Configuration(32Bit)" and "SQL NativeClient 11.0 Configuration" side too.  Then only you connect from SQL Server Management side by providing the alias name.  Please notice below image. Now try to connect to the myNode2 alias name which indirectly routing to NODE2 sql server default instance f...

Wait on the Database Engine recovery handle failed. Check the SQL Server lof for potential causes.

Image
  I got the error below when I try to install SQL Server 2019 Evaluation Edition on Windows 11 client machine and with only single C drive . There are no other drives except C drive. And the below Powershell commands fix the issue. New - ItemProperty - Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" - Name "ForcedPhysicalSectorSizeInBytes" - PropertyType MultiString - Force - Value "* 4095" Get - ItemProperty - Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" - Name "ForcedPhysicalSectorSizeInBytes" And the image looks like below. After making above changes, Uninstall existing SQL Server instance and restart Windows Client machine(Operating System 11) and again install SQL Server from the scratch and try to connect. This time it should connect now.

Error : Your host does not meet minimum requirements to run VMware workstation with hyper-v or device/credential guard enabled (76918)

Image
Recently I have installed Docker in my Windows 10 pro system. Before that I also have VMWare Work station installed in my machine too. After couple of days working on Docker I have un installed it and start work on VMware Work station. At that time I got the error below when I try to open already installed VM in VMWare work station.  1) I already removed the feature Hyper-V from "Turn Windows feature On/Off" from my system. Bu even after that we are able to see the same error. Then I open command prompt in run the below commands which fix the issue and allow to run VM smoothly. The commands are below: I have already run this so I could see "The Operation completed successfully". If you would have run you may see in the beginning that you could see the " hypervisorlaunchtype AUTO ".  When you run "bcdedit /set hypervisorlaunchtype off". The status of  hypervisorlaunchtype would change to OFF from AUTO.   Please find the observations below. bcdedit...

Configuring SQL Server Reporting Services(SSRS) on Always On Availability Groups(AOAG)

Image
I am configured SSRS on Always on Environment. Here I have NODE1 and NODE2 servers, NODE1 is primary replica and NODE2 is secondary replica. I have installed SSRS on both the nodes after downloading setup file from the internet. The below images will explain about how to configure things from "SSRS Configuration Manager". Images below are self explanatory.