Don't wanna be here? Send us removal request.
Text
C#: Can we define an abstract class with only parameterized constructor. If no, then what will happen and if yes then what steps you need to do this in order to use abstract class functionality?
Hi Friends,
Hope, you are doing fine.
Wish you all a very Happy New Year, 2018!
During an interview, an interviewer asked me the below question and due to my curiosity and to verify my given answer, I had implemented this and check its behaviour.
The question was as below:
"Can we define an abstract class with only parameterized constructor. If no, then what will happen and if yes, then what…
View On WordPress
#C Interview Question related to OOPS#Can we define an abstract class with only parameterized constructor?#Error: &039;.&039; does not contain a constructor that takes 0 arguments
0 notes
Text
PowerShell Script: Use of While..Loop{} in powershell by showing how to open Nth instances of a chrome browser.
PowerShell Script: Use of While..Loop{} in powershell by showing how to open Nth instances of a chrome browser.
Hi Friends,
Hope, you are doing fine!
Today, we will see that how can we use while loop in PowerShell script. We will be open Nth number of instances of CHROME browser via PowerShell script.
Please see the below code:
$i=0; $limit=10; while($i -ne $limit){ Start-Process "chrome.exe" "http://www.microsoft.com"; $i++; }
View On WordPress
#How to open nth instances of a browser (Chrome) using powershell?#PowerShell Scripts#While Loop Demo in PowerShell Script
0 notes
Text
Send Email POC using PowerShell script
Send Email POC using PowerShell script
Hi Friends,
Hope, you are doing fine, while reading this post!
Today, I will share some useful code snippet which helps in sending an email using PowerShell script.
Steps:
Open an instance of Windows PowerShell ISE
Type the below code:
Change the values as per your records within the below code before running the same.
Code-snippet:
$Username = "[email protected]" $Password=…
View On WordPress
#How to send an Email with PowerShell Script?#PowerShell Scripts#Send Email POC using PowerShell script
0 notes
Text
T-SQL: Find if "xp_cmdshell" is configured on your SQL Server instance
T-SQL: Find if “xp_cmdshell” is configured on your SQL Server instance
Hi Friends,
How are you doing?
Today, we will see how to check if the “xp_cmdshell” is already configured on your SQL Server instance or not. We can check the other configurations as well using the same T-SQL.
What is “xp_cmdshell”?
“xp_cmdshell” allow us to run windows commands by using SQL Server, but we need to enable this!
We can check if this configuration is already configured on this…
View On WordPress
#Check if "xp_cmdshell" is enabled?#MS SQL Server#sys.configurations#T-SQL Scripts#T-SQL to find if "xp_cmdshell" is configured on your SQL Server instance
0 notes
Text
T-SQL: Find the location of data and log files of the databases within a SQL Server instance.
T-SQL: Find the location of data and log files of the databases within a SQL Server instance.
Hi Friends,
Hope, you are doing fine!
Today, please find below the T-SQL script tip to find the location of the data & log files available within a SQL Server instance. The script is as below:
T-SQL:
SELECT name AS NameOfFile, physical_name AS FileLocation FROM sys.master_files
Snapshot:
Happy Coding :)
View On WordPress
#Find the location of data and log files of the databases within a SQL Server instance#MS SQL Server#sys.master_files#T-SQL Scripts
0 notes
Text
T-SQL to find I/O usage stats by databases within the SQL Server instance
T-SQL to find I/O usage stats by databases within the SQL Server instance
Hi Friends,
Hope, you are doing fine!
Today, we will see how to extract the I/O statistics for data and log files within a SQL Server instance, with the help of dynamic management view (DMV) named as (“sys.dm_io_virtual_file_stats“).
T-SQL Script:
-- T-SQL to find I/O usage stats by databases within -- the SQL Server instance (Database level IO usage stats) SELECT DB_NAME(database_id) AS…
View On WordPress
#Database level IO usage stats using DMVs#DMVs#MS SQL Server#sys.dm_io_virtual_file_stats()#T-SQL Scripts#T-SQL to find I/O usage stats by databases within the SQL Server instance
0 notes
Text
T-SQL: Find the currently running queries in sql server
T-SQL: Find the currently running queries in sql server
Hi Friends,
Hope, you are doing fine!
Please find below the T-SQL script to find the T-SQL batches/queries/statements, which is/are still running as on current time on a SQL Server instance!
T-SQL Script:
SELECT queryRequest.session_id, queryRequest.start_time, queryStatement.text FROM sys.dm_exec_requests queryRequest CROSS APPLY sys.dm_exec_sql_text(queryRequest.sql_handle) queryStatement GO;…
View On WordPress
#DMVs#Dynamic Management Views#Find the currently running queries in sql server#sys.dm_exec_requests#sys.dm_exec_sql_text#T-SQL Scripts
0 notes
Text
T-SQL inbuilt function to retrieve all the supported collations within SQL Server
T-SQL inbuilt function to retrieve all the supported collations within SQL Server
Hi Friends,
Hope, you are doing fine!
Today, we will see the demo of T-SQL in-built TVF (Table Valued Function) function “fn_helpcollations()” which help us to retrieve all the supported collations within SQL Server.
Please refer the below link for your reference:
https://msdn.microsoft.com/en-us/library/ms187963.aspx
Syntax:
fn_helpcollations()
T-SQL:
SELECT * FROM fn_helpcollations()
Snapshot:
View On WordPress
#Built-In Functions (Transact-SQL)#fn_helpcollations()#MS SQL Server#Retrieve a list of all the supported collations#T-SQL inbuilt function to retrieve all the supported collations within SQL Server
0 notes
Text
Tooltip Demo using jQuery and Asp.Net
Tooltip Demo using jQuery and Asp.Net
Hi Friends,
Hope, you are doing fine!
Today, we will see how to implement a tooltip on some controls using jQuery without using any jQuery plugin.
I know this is very simple, but can be helpful to someone who is looking the similar code snippet. Hence, today I am going to post the same so that we all can take the reference of the same and if someone has the better solutions, then I will really…
View On WordPress
0 notes
Text
T-SQL Fun: Guess your age based on two parameters
T-SQL Fun: Guess your age based on two parameters
Hi Friends,
Hope, you are doing fine! Today is the last day of 2016 and I hope that this year brought a lot of happiness and good lessons to all of our life. I wish you all a very happy and prosperous new year 2017 in advance!
Today, I will share a T-SQL for fun to demo a trick to find your age, based on two parameters. I know that this could be also done directly in T-SQL using many date’s…
View On WordPress
0 notes
Text
Find all available Dynamic Management Views (DMVs) and Dynamic Management Inline Functions (DMIFs) using T-SQL in SQL Server
Find all available Dynamic Management Views (DMVs) and Dynamic Management Inline Functions (DMIFs) using T-SQL in SQL Server
Hi Friends,
Hope, you are doing fine!
Please find below the T-SQL script to find all available Dynamic Management Views (DMVs) and Dynamic Management Inline Functions (DMIFs) using T-SQL in SQL Server Instance.
Actually, this script is the answer of one of the random question asked by my friend that “How many Dynamic Management Views (DMVs) available in SQL Server ?”
T-SQL Script:
-- 1st Way (By…
View On WordPress
#DMVs#Find all available Dynamic Management Views (DMV) and Dynamic Management Inline Functions (DMIF) using T-SQL in SQL Server Instance#Find all DMV And DMIF with TSQL#MS SQL Server#T-SQL#T-SQL Scripts
0 notes
Text
MS SQL Server - Checklist to be followed by DBA on daily basis
Hi Friends,
Hope, you are doing fine!
Although I do not have any exposure as a DBA profile in my professional career, but still I had learnt something by seeing the various professionals during my past organisations and would like to share the below consolidated few points as a “Check-List” that may make DBA’s day-to-day life easier & happy:
Check System Event Logs and SQL Server Error Logs for…
View On WordPress
#Daily Tasks to be followed by SQL Server DBA#DBA&039;s Daily Checklist#MS SQL Server DBA Daily Tasks
0 notes
Text
T-SQL to read JSON formatted data in MS SQL SERVER 2016
Hi Friends,
How are doing today?
Well, today I will demonstrate you “how to convert json data / document back to sql server tabular formatted data“. You may have already gone through my last post “JSON SUPPORT in MS SQL SERVER 2016“. If not, then you can check this link first to get some idea first!
To read a JSON formatted data / document, we will be using OPENJSON()function. The syntax of the…
View On WordPress
#MS SQL Server#MS SQL Server 2016&039;s New Features#OPENJSON() in T-SQL#Read JSON formatted data in MS SQL SERVER 2016
0 notes
Text
"JSON Support": One of the new features introduced in MS SQL Server 2016
“JSON Support”: One of the new features introduced in MS SQL Server 2016
Hello friends,
Hope, you are doing fine while reading this post!
MS SQL Server 2016 has introduced one of the coolest feature in this version. Now, we can also process the sql data into json format and also read / process json data/files back to sql server tables.
Before moving ahead, it is assumed that you know what JSON is. If not, then let me make you understand on a high level.
WHAT IS JSON?
View On WordPress
#FOR JSON#FOR JSON AUTO#FOR JSON PATH#JSON Support in SQL SERVER 2016#MS SQL Server#MS SQL Server 2016&039;s New Features
0 notes
Text
SQL Server 2016's new in-built function (i.e. SPLIT_STRING()) to split the string into rows using delimiter
SQL Server 2016’s new in-built function (i.e. SPLIT_STRING()) to split the string into rows using delimiter
Hi Friends,
Hope, you are doing fine!
Today, I found the SQL Server 2016 new in-built function (SPLIT_STRING()) which will make the developer’s life more easier, when it comes to split the string into rows using some delimiter.
Earlier to MS SQL Server 2016 version, we were using either XML Path() clause to split the string or to define some custom user-defined function to achieve this task.
You…
View On WordPress
0 notes
Text
T-SQL Fun: T-SQL to print FLOYD's TRIANGLE
T-SQL Fun: T-SQL to print FLOYD’s TRIANGLE
Hi Friends,
Hope, you are doing fine while reading this post! I know that this is a very simple puzzle but thought why not to implement this using T-SQL which may be helpful to some of the freshers!
Let’s start now!
Problem:
——————————————————————– T-SQL Fun: Write a T-SQL batch to print “Floyd’s Triangle”: ——————————————————————– 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Note:If you don’t know about the…
View On WordPress
0 notes
Text
Powershell script: Extract all the files of a particular extensions from a folder recursively
Powershell script: Extract all the files of a particular extensions from a folder recursively
Hi Friends,
Hope, you are doing while reading this post!
I am writing this post after almost more than two months. Today, I have been asked suddenly to extract the list of all the files with a particular extension (let’s say *.dll files) within a specified folder location and also search the entire folder including sub-folders in it.
There could be many alternates to achieve this like VBA macro,…
View On WordPress
0 notes