Auto Audit Column Wise Change Data Capture (CDC)
Change data capture is used to audit insert, update, and delete activity for table in SQL Server table. You can go through below link to understand more theoretical knowledge....
View ArticleSQL Server Scenario Based Interview Question
1. There’s a table with below dataWrite a query which will give below output.Query:declare@inputastable(...
View ArticleThe custom tool 'MSLinqToSQLGenerator' failed. Object reference not set to an...
Today, I come to this error in Visual studio 2010 when I tried to place procedures in LINQ. I also tried to run Custom tool by right click on *.dbml file but it’s not resolved.I found lots of solution...
View ArticleValidation of viewstate MAC failed. If this application is hosted by a Web...
Today, I got a mail from my client saying that I am getting below error if my session is idle for 1 minute and clicking on any link.I am using shared hosting provider to host my site. To fix that, I...
View ArticleScript to view Dependencies for Database in SQL Server
SQL Server is providing feature to view Dependencies in SQL Server. To view object dependencies, we are following below steps in SQL Server Management Studio.1. Right click the object and click...
View ArticleSQL Server Theoretical Interview Question
Theoretical Question:1. Is CDC asynchronous?Ans: Yes2. Is it possible to use having function without group by? Give exampleAns: YesQuery:declare @input as table( column_name varchar(100))insert...
View ArticleHow to prefix 0 to make same length string for column.
1. There’s a table with below data.Write a query which will give below output....
View ArticleUnable to make the session state request to the session state server. Please...
To fix above error, I followed below steps.1) Open Run Command and type “Services.msc”2) Right click on ASP.NET State Service and Start.
View ArticleSchedule Data Backup from Production to Development
OR Auto synchronize Data from Production to Development using Script Daily OR Refresh data from Production to Development Server.We mostly seen a situation where we want to synchronize data from...
View ArticleSchedule Database Backup using Windows Task Scheduler
You may have seen my last past about to Auto synchronize Data from Production to Development using Script Daily.On top of that, we also had requirement to schedule database backup one database is...
View ArticleMsg 40526, 'OPENXML' rowset provider not supported in this version of SQL Server
Today, I was trying to publish my database to Windows Azure SQL Database and found that OPENXML is not supported.There are many others Transact-SQL Statements which are also not supported. You can get...
View ArticleGet column header list from Excel using Open XML SDK 2.5
There are many applications which are using to insert, update and delete data in database using Excel file. In this type of requirement, we also seen requirement where we need to get column header list...
View ArticleHow to read data from excel (*.xlsx) file using Microsoft.ACE.OLEDB.12.0
In our last post, we have seen how to get column header list from Excel using Open XML SDK 2.5. You can refer below...
View ArticleSQL Server Scenario Based Interview Question for Date
1. How to get current month first date?Query:Declare@v_CurrentDatedate=getdate()-- Current DateSelect@v_CurrentDate-- Current month first dateSelect...
View ArticleCould not update the metadata that indicates database is enabled for Change...
Today, I came across below error when I was trying to enable CDC for database. I used below query to enable CDC on database.Query:UseAsifGoEXECsys.sp_cdc_enable_dbGoError: Could not update the metadata...
View ArticleHow to delete Team Project from Online Visual Studio
1) Login to online TFS account by accessing below link.www.youracount.visualstudio.com2) Click on Administer Account which is right side after your name.3) It will show all team projects for your...
View ArticleWrite t-sql code to get Square root of integer number without using SQRT...
Declare @v_ActualNumber INTDeclare @v_FinalSquareRootNumber INTDeclare @v_SquareRootNumber INTDeclare @v_ID INTSet @v_ActualNumber = 63297936Set @v_FinalSquareRootNumber = 1Set @v_ID =...
View ArticleWrite t-sql code to check if given number is Palindrome or not without using...
Declare @v_ActualNumber INT = 158919851Declare @v_ReverseNumber INT = 0Declare @v_TempNumber INTDeclare @v_Number INTSet @v_TempNumber = @v_ActualNumberWhile(@v_TempNumber > 0)Begin if...
View ArticleWrite t-sql code to generate Fibonacci series without using any inbuilt function
Declare @v_Number INT = 158919851Declare @v_First INT = 0Declare @v_Second INT = 1Declare @v_Temp INTPrint @v_FirstWhile(@v_Second < @v_Number)Begin Set @v_Temp = @v_First + @v_Second Set...
View ArticleWrite recursive t-sql code to get Square root of integer number without using...
Create Function [dbo].[fn_SQRT](@v_Number bigint,@v_ID bigint)Returns bigintasBeginIf (@v_Number != 1)Beginif (@v_Number%@v_ID = 0)BeginSet @v_Number = @v_Number/(@v_ID * @v_ID)return @v_ID *...
View Article
More Pages to Explore .....