MS SQL Server Windows Server 

Powershell script to check SQL service status and send email

In windows server we can create a PowerShell script to trigger an email on the basis of SQL service status. Solution Below The solution for checking the status of SQL Server service can be achieved by using the “Get-Service” cmdlet. In the below example we are using some common naming conventions of SQL server like MSSQL$, MSSQLSERVER, and SQL Server, etc. below code is to get the server status. Note: please check your SQL server name and replace them “MSSQLSERVER” in below code To send email we will use some…

Read More
MySql wordpress 

How to replace WordPress site URL in Database – updated 2021

There might be many possibilities when you want to change the WordPress site URL. Completely moving your site from one domain name to another. when we want o to add HTTPS instead of HTTP which is migrating sight from HTTP to HTTPS. when you want to add www. to your site. Solution 1: Using MySQL Update replace query Solution 2: Using WordPress Plugin “Search and Replace” There are many ways we can solve this Note: Before doing any of the following methods please back up your database once Solution one…

Read More
MS SQL Server MS SQL Server SQL 

How to set SQL Server Error Log File size

In my situation, SQL Server Error log file started overflowing after I enabled the Broker interface to my one of the Database, in this situation to solve log file growing in GBs I searched the web and me got many results in chunks, so by combining all the things solved my problem and same is listed below. How to Recycle SQL Server Error Log file without restarting SQL Server Service Recycle SQL Server ErrorLog File using DBCC ERRORLOG Command Recycle SQL Server Error Log File using SP_CYCLE_ERRORLOG System Stored Procedure…

Read More
MS SQL Server 

How to Auto Restart SQL SERVER when its crashed?

The possible reasons for SQL server crash are listed below 1 . What to do if the operating system crashed? For this, the solution is very simple. i. In PC start -> open Run,  type “services.msc“.       ii. In this find the SQL Services name (ex: SQL Server (MSSQLSERVER)) of the instance and then click Properties. iii. In properties window, select start type to Automatic as shown below 2. There could be situations where SQLServer is shutting down automatically due to a crash or an unexpected behaviour with SQL…

Read More
MS SQL Server MS SQL Server 

How to Fix SQL Server Error – Restore Operation Failed for Database Due to Insufficient Memory in the Resource Pool ‘Default’

one fine day when working with SQL server we faced this error. the error states like below ************************************************************************************************* Msg 41379, Level 16, State 0, Line 0 Restore operation failed for database ‘InMemoryDB’ due to insufficient memory in the resource pool ‘default’. Close other applications to increase the available memory, ensure that both SQL Server memory configuration and resource pool memory limits are correct and try again. See ‘http://go.microsoft.com/fwlink/?LinkID=507574’ for more information. Msg 3167, Level 16, State 1, Line 2 RESTORE could not start database ‘InMemoryDB’. Msg 3013, Level 16, State…

Read More
MS SQL Server MS SQL Server SQL 

How Start/Stop MS SQL Server Using .bat file in windows

If you are a stack developer who works on multiple platform for coding, might face this proble of starting and stoping the Sql Server, because if you want work in default port 80 for apache in php of any other, you have to stop the iis and SQL server to run apache in port 80 only, so while doing this to start/stop we use eather SQL Configuration manager/ windows services. so here we will tell you how to create a .bat file to start and stop all the sql services…

Read More
BackEnd Programming MS SQL Server 

Automatic Blocking of a particular IP Address

Web application security is a branch of Information Security that deals specifically with the security of websites, web applications and web services. At a high level, Web application security draws on the principles of application security but applies them specifically to Internet and Web systems. Websites and any network to which web servers are connected are prone to security risks . With the emergence of the web and app based applications on such a large scale, there arises an issue of security. To overcome such a situation, every application has a role…

Read More
MS SQL Server BackEnd Programming MS SQL Server 

Violation Of 1NF and how to deal with it

What is 1 NF? The first normal form (1NF) is one of the most violated rules while designing and developing a database.The First normal form (1NF) is a property of a relation in a relational database. A relation is in first normal form if and only if the domain of each attribute contains only atomic (indivisible) values, and the value of each attribute contains only a single value from that domain. The benefits of Normalization are: Greater overall database organization Reduction of redundant data Data consistency within the database A much…

Read More
MS SQL Server MS SQL Server SQL Windows Server 

How to configure SQL server to access it remotely

How to configure SQL server to access it remotely?, Actually this is not a big issue there are some straightforward steps to configure, but there might be a possibility of giving problem after configure using the same steps also. So go through the below steps carefully. To establish a successful remote connection is to set up ports through the Window Firewall. In SQL Server there are two types of instances. First is a default instance and the second is a named instance. To connect to the default instance of Database…

Read More
MS SQL Server BackEnd Programming MS SQL Server SQL 

Stored Procedure Vs Function in MS SQL Server

Stored Procedure: A set of SQL Queries which are used to perform a specific task. A stored procedure can improve the performance of a database. Function: A  set of SQL Queries which can be used to pass parameters into and return values from it. Difference: Sl.No Stored Procedure Function 1 Compiled only once Complies every time the function is invoked 2 Input and Output Parameters are permitted Only input parameters are permitted 3 Need not necessarily return a value A return value is necessary 4  A Function can be invoked…

Read More