Securing You ASP Scripts for SQL Injection

Recently I got a client email that his site is affected by malware and Trojan virus. Google safe browsing tool and other firewall security gateway was blocking some of the site URLs.
Read More

 Admin User     Jun, 05 2017

Full Text Option Is Greyed Out in MSSql 2008

Today I was trying to setup fulltext indexing on one of my database table. I have finish with creating fulltext catelog and tried to right click on table to create fulltext index but option was greyed out and there is no way to create index. This is becuse Full-text index was diabled at database leve you can enable it by running below statement.   use [mydatabase name] go EXEC sp_fulltext_database 'enable'   That's it and refresh table group and option is enable now ...
Read More

 Admin User     Feb, 08 2017

SQL Server (Store Procedure) Mechanism Convert Empty String Date Parameter to Initial Date (1900-01-01)

It may you know about it but I would like to share this thing with you. We were working on one of project where we faced issue. we are storing data through sql server store procedure using date parameter. As per our logic, the date parameter has not date value it may be empty [INVALID] Whenever date parameter has empty string sql server store initial date(1900-01-01) in the date field. We checked our whole logic to find out how the initial date come if date parameter has an ...
Read More

 Bharat Patel     Feb, 08 2017

Sql Server Rank() v/s Dense_rank()

Some days before I was googling on sql server's system function and I got one site having sql server query puzzle. The site have very interesting puzzle. I got a puzzle during surfing and it is to find out second highest salary of each department and tie salary should also count. There are inbuilt functions in sql server to give rank as per result set. The Rank() function of sql server returns the position of value within a partition of a result set. Rank() function left ...
Read More

 Bharat Patel     Feb, 08 2017

Forward Engineering Visio 2007 Database Model to SQL Server

This is first ever I was trying for Visio Database model to design database without knowing that forward engineering doesn't support on Visio 2007. I googled it lot about this but doesn't find such direct option for forward engineering of Database model. After bit on searching I found that "Orthogonal Software Corporation" provide toolbox which let you export as xml of your database diagram and using xslt file (provided by Orthogonal Software Corportation) you can generate sql script.
Read More

 Admin User     Feb, 08 2017

SQL Server Query Performance Tuning

Try to avoid function (user defined or inbuild) in where condition of sql query as it is always overlook indexing created on tables and taking much longer time to execute in case of table having large number of rows (over million)Have a look below query. How to avoid date range condition? I hope it may be helpful to you ...
Read More

 Bharat Patel     Feb, 08 2017

SQL Query to List Out All Identity Column

Once I want to get the list of all tables which contains the identity column. After some googling finally I got the sql query which return all the tables which has identity column. It will also return column name, the Seed Values, Increment Values and Current Identity Column value of the table.
Read More

 Admin User     Feb, 08 2017

Anonymous Procedure to Measure Query Performance by Averaging

Following code can be used to measure query elapsed time by performing multiple runs of the same query and finding the average elapsed time of the query ...
Read More

 Admin User     Feb, 08 2017

Reset Identity Column Value

Easiest way to reset the identity column value in MSSQL is to use 'TRUNCATE TABLE' on the table.This will reset the identity column value.This will work only if the table has no references made by any child ...
Read More

 Admin User     Feb, 08 2017

SQL Server Get Table List from Column Name

Today, I wanted to list down all table from column name in sql server. Sql server stores all table, column, database or etc in it's own system table. So it's easy to fetch record from it. I have given example below how to list down table list from field name. Copy and paste below code and just pass column name in this query. I hope it is helpful for you and you may like it ...
Read More

 Bharat Patel     Feb, 08 2017

  • Showing 1 to 10 of 14