Rajanand Ilangovan

@rajanand

120 Points 1 Followers

52 Posts

0 Answers

Business Intelligence Developer.

Rajanand Ilangovan · 5 days ago

How to fix Log reader agent login failure in SQL Server replication?

Error: Log reader agent has failed with an error Login failed for user 'sql-user-account'. Solution: Right click on the publication name and open properties window. Go to Agent Security p...

Rajanand Ilangovan · 5 days ago

How to fix "This database is not enabled for publication" issue when the replication option is already enabled in SQL Server?

Error Msg 14013, Level 16, State 1, Procedure sp_MSrepl_addpublication, Line 188 This database is not enabled for publication. I have used the below script to enable the database for repli...

Rajanand Ilangovan · 5 days ago

How to fix SQL Server Integration Services could not be started issue?

Error: The request failed or the service didn't respond in a timely fashion consult the event log or other applicable error logs for details. Solution: Go to Administrative Tools and cl...

Rajanand Ilangovan · 2 weeks ago

List of indexes on a table with column details in SQL Server

List out all the indexes defined on a table and column details. USE test_db; GO SELECT OBJECT_NAME(i.object_id) AS table_name ,i.type_desc AS index_type ,i.<span class="h...

Rajanand Ilangovan · 2 weeks ago

How to get the TCP / IP Settings of a SQL Server?

This query gets tcp/ip settings of the SQL Server from registry. <span class="hljs-keyword">SELECT</span> registry_key, value_name, value_data <span class="h...

Rajanand Ilangovan · 3 weeks ago

How to find a SQL Server agent jobs last executed and next scheduled date time?

You can execute the below query to get the list of SQL Server agents jobs and when it was last executed and time it took to complete the job and when it is scheduled to run next. <span cl...

Rajanand Ilangovan · 1 month ago

How to rename a database without an error in SQL Server?

Problem Unable to rename the database in SQL Server. Msg 5030, Level 16, State 2, Line 17 The database could not be exclusively locked to perform the operation. Solution This error occur...

Rajanand Ilangovan · 1 month ago

How to fix "Can not find path" error in PowerShell?

Problem: When executing a SQL script file, I have got the below error in PowerShell. I was using PowerShell v5 in Windows 10. Short Error message: Get-ChildItem : Can not find path 'file pa...

Rajanand Ilangovan · 1 month ago

How to split a string into a list of values in SQL?

I have created a function to split a string based on the delimiter value and return the result as a single column of values in a table. <span class="hljs-keyword">CREATE</...

Rajanand Ilangovan · 1 month ago

How to check database restore history and backup file used for restore in SQL Server?

SELECT rs.destination_database_name, rs.restore_date, bs.backup_start_date, bs.backup_finish_date, bs.database_name <span class="hljs-keyword">a...

Rajanand Ilangovan · 1 month ago

How to generate numbers table in SQL?

Generate Number table with cross join and row_number function <span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">TABLE</span>...

Rajanand Ilangovan · 2 months ago

How to find customers who never placed an order in SQL?

Write a SQL query to find the list of customers who never placed an order. There are two tables. customers orders Sample data: <span class="hljs-keyword">USE</span>...

Rajanand Ilangovan · 2 months ago

How to split a string into a list of values

I have created a function to split a string based on the delimiter value and return the result as a single column of values in a table. <span class="hljs-keyword">CREATE</...

Rajanand Ilangovan · 2 months ago

How to search for a list of words contains in a string column?

To search whether the list of words contains in a column, you can implement it using a series of conditions with LIKE and OR operators. But to search for additional word, you need to add ano...

Rajanand Ilangovan · 2 months ago

How to undo the last git commit in local repository?

Undo last local commit but keep files changes. git <span class="hljs-keyword">reset</span> <span class="hljs-keyword">HEAD</span>~<span class=&...

Rajanand Ilangovan · 2 months ago

SQL Replication - Post Tracer Token error due to no active subscriptions

I was trying to get all the SQL Server replication's publication that has subscriptions. Then for each publication, post a tracer token thru cursor. I encountered the below error. Error: Ms...

Rajanand Ilangovan · 2 months ago

How to replace the first instance of the string in T-SQL?

You can use the combination of stuff, charindex and len function to replace the first occurrence of the string. <span class="hljs-keyword">declare</span> @database_nam...

Rajanand Ilangovan · 3 months ago

Table Variable in SQL Server

Table variable syntax:``` declare @my_table_variable table( id int, name varchar(50) ); select * from @my_table_variable; go 2. Table variable is a local variable with a special data type...

Rajanand Ilangovan · 3 months ago

How to enable SQL Server database for publication

Problem: I have configured the distributor and then trying to create a publication on the publication server using sp_addpublication stored procedures with respective parameters. I have got...

Rajanand Ilangovan · 4 months ago

What is the difference between stored procedure and function in SQL?

Stored procedure can call a function. But function can not call a stored procedure. Stored procedure can use temporary tables and table variables. Function can use table variable but not te...

Rajanand Ilangovan · 4 months ago

How to concatenate multiple rows into a single string in SQL?

Write a SQL query to concatenate multiple rows into a single string? <span class="hljs-keyword">USE</span> TestDB; GO <span class="hljs-keyword">DRO...

Rajanand Ilangovan · 4 months ago

How to get nth highest salary in SQL Server?

You have an employee table with employee details. You need to get 3rd highest salary get the employee details with 3rd highest salary. Here is the sample data from employees table. You ca...

Rajanand Ilangovan · 4 months ago

How to find out frequent credit card spender in SQL?

You have joined a bank as their data analyst and you have received the below requirement and need to provide an ad-hoc report to the management. There is an ETL job which loads the data into...

Rajanand Ilangovan · 4 months ago

How to de-group the data in SQL?

Write a SQL query to de-group the data and provide the output as below. Let us first create the test data to demo <span class="hljs-keyword">USE</span> TestDB; GO &...

Rajanand Ilangovan · 4 months ago

How to find which command has failed in SQL Server Replication?

To find out the list of replicated transaction, query the MSrepl_transactions table in distribution database. Copy the sequence number of the transaction (i.e., xact_seqno ) which entered th...

Rajanand Ilangovan · 4 months ago

How to check SQL Server Replication is installed in a Server?

When you setup a publication or subscription in a server where replication is not installed, you will get the below error. Msg 22001, Level 1, State 1Msg 21028, Level 16, State 1, Procedure...

Rajanand Ilangovan · 4 months ago

SQL Server Replication Queries

Replication Replication Monitor <span class="hljs-keyword">SELECT</span> publisher, publisher_db, publication_id, <span class="hljs-keyword">CASE&...

Rajanand Ilangovan · 4 months ago

Azure Data Factory - White Papers

Azure Data FactoryData Integration in the Cloud Azure Data Factory: SSIS in the Cloud Data Migration from on-premises relational Data Warehouse to Azure using Azure Data Factory Azur...

Rajanand Ilangovan · 4 months ago

How to get any object's definition in SQL Server?

Query <span class="hljs-keyword">USE</span> AdventureWorks2019; GO <span class="hljs-keyword">SELECT</span> object_name(object_id) <span cl...

Rajanand Ilangovan · 4 months ago

How to calculate total travel hours in SQL?

Question You are working for an airline company and you have received a dataset of Pilot's travel time between cities. You need to determine the reciprocal and find the total travel hours be...

Loading More Content