Monday, December 10, 2007

Youtube and SQL Server

A friend of mine is creating few computer educational videos to post on Youtube, its kind of cool. There are many free video sites which can be used to educate users. If we check Google there are many online searches for education videos specially related to computers and helping others is always a good thing.

Sunday, December 2, 2007

Real Estate Search Engine Optimization

Another good page to learn about real estate search engine optimization, the one page foucs only on real estate services. Many sites are doing it on side or not providing enough information to do it by your self.

Visit it online real estate search engine optimization its on squidoo

If you wana learn more about SEO than there are some other sites as well to learn about search engine optimization.

Saturday, December 1, 2007

VMWare Training

Can we really use VMWare ESX server for database hosting ? I am personally not very sure so, starting the training to find out by my self. Many of my clients are using 8 way processing and as per my knowledge Virtual server only support 4 processor now the database which require optimization on 8 way processing how it will perform on 4 way processing. I will find out.

Saturday, November 17, 2007

Real Estate SEO - Real Estate Search Engine Optimization

Recently i needed a company to do my website search engine optimization, a real estate related website. I ofcourse i started my research online with keywords as real estate search engine optimization, real estate marketing and real estate seo to see who comes on top. The company which can come on top of results i had feeling they can bring my site on first page too, but that was not the case i had bad experience spent few thousand dollars and months but no results.

The next i found website4me.com real estate seo a old company famous for web templates not on first page for many keywords but excuse was too busy to work on there own website. Any way i again thought to give them a try because of 100% money back guarantee and after 2 months my site first started poping up on 4th page then 2nd and now on first acctually at 8th search result. Very impressive the art of search engine promotion.

I liked Florida Search Engine Optimization by http://www.website4me.com/ Try them for few months, results were very good.

Wednesday, August 22, 2007

Check if file exists using sql



-- using the scripting object
declare @Path varchar(128) ,
@FileName varchar(128)
select @Path = 'C:\' ,
@FileName = 'myfile.txt'
declare @objFSys int
declare @i int
declare @File varchar(1000)
select @File = @Path + @FileName
exec sp_OACreate 'Scripting.FileSystemObject', @objFSys out
exec sp_OAMethod @objFSys, 'FileExists', @i out, @File
if @i = 1
print 'exists'
else
print 'not exists'
exec sp_OADestroy @objFSys


-- using xp_cmdshell
declare @Path varchar(128) ,
@FileName varchar(128)
select @Path = 'C:\' ,
@FileName = 'myfile.txt'
declare @cmd varchar(1000)
create table #a(s varchar(1000))
select @cmd = 'dir /B ' + @Path + @FileName
insert #a exec master..xp_cmdshell @cmd
if exists (select * from #a where s = @FileName)
print 'exists'
else
print 'not exists'
drop table #a


-- using xp_fileexists
declare @Path varchar(128) ,
@FileName varchar(128)
select @Path = 'C:\' ,
@FileName = 'myfile.txt'
declare @i int
declare @File varchar(1000)
select @File = @Path + @FileName
exec master..xp_fileexist @File, @i out
if @i = 1
print 'exists'
else
print 'not exists'

Friday, August 10, 2007

Service Oriented Architecture - SOA Definition

Easy to the point Definition:

The Service Oriented Architecture (SOA) is a design philosophy which defines how a solution should be build.

SOA design approach allow organizations with multiple technologies and platforms to build solutions which are re-useable and accessible across all systems without rewriting of code. All business technologies and functions are treated as services, these services are build to last for long time but service configurations are build for change. This approach creates a loosely-coupled systems which can be changed without spending more money. A loosely coupled system allow business processes to change more quickly as they are not dependent on underlying IT infrastructure.

A service oriented application means writing a highly dynamic, collaborative, stable, dependable application. A application which can act as service to all other business processes/systems without rewriting. The service should not be written for any specific system it should be consumable by any system. The service should use standard protocols (SOAP, XML) to exchange messages between each other. The service should be re-useable, work independently and must be manageable.
Web Services, WSDL, Remote Scripting are common examples of SOA.

Kill SQL Server connections by username

You can use following SQL Script to kill connections by a single user, make sure you set the username in @UName variable.

SET NOCOUNT ON
DECLARE @UName varchar(50)
DECLARE @spidstr varchar(8000)
DECLARE @ConnKilled smallint
SET @ConnKilled=0
SET @spidstr = ''
Set @UName = 'USERNAME'
SELECT @spidstr=coalesce(@spidstr,',' )+'kill '+convert(varchar, spid)+ '; '
FROM master..sysprocesses WHERE loginame=@UName
IF LEN(@spidstr) > 0
BEGIN
EXEC(@spidstr)
SELECT @ConnKilled = COUNT(1)
FROM master..sysprocesses WHERE loginame=@UName
END