SELECT spid, sp.[status], loginame [Login], hostname, blocked BlkBy, sd.name DBName, cmd...
Read More
Hi
get api call from windows application
HttpClient httpClient = new HttpClient(); HttpRequestMessage requestt = new HttpRequestMessage(); requestt.RequestUri = new Uri("https...
Read More
backup data
declare @path varchar(500)='F:\backup\db_'+cast(DATEPART(YEAR,GETDATE()) as nvarchar(1000))+'_'+cast(DATEPART(MONTH,GETDATE...
Read More
Convert excel Column to Comma Separated List using online
https://convert.town/column-to-comma-separated-list
Read More
start mongod when linux server restart
Create a MongoDB systemd Service Unit File: Use a text editor (e.g., nano, vim, or gedit) to create a systemd service unit file for MongoDB....
Read More
get detail process of spid
DBCC INPUTBUFFER (58)
Read More
sp_who with filters
SELECT spid, sp.[status], loginame [Login], hostname, blocked BlkBy, sd.name DBName, cmd...
Read More
get month name in previous day in c#
DateTime.Now.AddDays(-1).ToString("MMMM")
Read More
fetch orders in razorpay with multiple receipt numbers in c#
using System; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; using Newtonsoft.Json; class Program { ...
Read More
List Of Tables Having The Column
we have seen the methods to check if column exists in a specific table in the database USE {{ Database Name }} SELECT TABLE_SCHEMA, ...
Read More
How to calculate expiring voucher balances with partially used vouchers are using sql server
UPDATE Customers SET Balance = Balance - ( SELECT ISNULL(SUM(CASE WHEN ExpirationDate <= GETDATE() THEN Remain...
Read More
repalce of whitespace with + symbol in c#
using System; class Program { static void Main() { string input = "This is an example string with spaces"; ...
Read More
truncate in linq in c#
var originalString = "This is a long text."; var truncatedString = new string(originalString.Take(10).ToArray()); Console.WriteLi...
Read More
random letter generation with character limit in #
using System; using System.Text; class Program { static void Main () { string randomString = GenerateRandomLetter...
Read More
How to Fetch dynamic datatable?
DataSet sampleDataSet = new DataSet(); sampleDataSet.Locale = CultureInfo.InvariantCulture; ...
Read More
How to create dynamic datatable?
DataSet sampleDataSet = new DataSet(); sampleDataSet.Locale = CultureInfo.InvariantCulture; ...
Read More
Get logical reads and cpu usage and query detail in sql server
SELECT req.session_id , req.total_elapsed_time AS duration_ms , req.cpu_time AS cpu_time_ms , req.total_elapsed_time - req...
Read More
Get logical reads and cpu usage and query detail in sql server
SELECT req.session_id , req.total_elapsed_time AS duration_ms , req.cpu_time AS cpu_time_ms , req.total_elapsed_time - req...
Read More
Create a database backup query with dynamic names in sql server
declare @filenamedbbc varchar(200) set @filenamedbbc= 'DB' +replace(convert(varchar, getdate(),101),'/','') + repl...
Read More
Get list of table names and with rowscount in sql server
SELECT TOP 200 (SCHEMA_NAME(A.schema_id) + '.' + A.Name) AS TableName , SUM(B.rows) AS RecordCount FROM sys.objects A INNER J...
Read More
Get table names list and check whether is memory optimized
SELECT SCHEMA_NAME(Schema_id) SchemaName, name TableName, is_memory_optimized, durability_desc, create_date, modify_date FROM sys.tables GO
Read More
Subscribe to:
Posts (Atom)