Friday, February 26, 2010

thumbnail

Could not load file or assembly Microsoft.SqlServer.Management.Sdk.Sfc

Another error of the day, When you try to create connection string from SQLDatasource or even want to bind existing connection string. You might see a Message box saying
Could not load file or assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
This error comes when you are trying to access SQL 2005 stuff from Visual Studio 2008

So go to the link and download the following stuff
•Microsoft SQL Server System CLR Types
•Microsoft SQL Server 2008 Management Objects
•Microsoft SQL Server 2008 Native Client

Tuesday, February 23, 2010

thumbnail

How to search all columns of all tables in a database for a keyword?

How to search all columns of all tables in a database for a keyword?

The output of this stored procedure contains two columns:

- 1) The table name and column name in which the search string was found
- 2) The actual content/value of the column (Only the first 3630 characters are displayed)

Here's a word of caution, before you go ahead and run this procedure. Though this procedure is quite quick on smaller databases, it could take hours to complete, on a large database with too many character columns and a huge number of rows. So, if you are trying to run it on a large database, be prepared to wait (I did use the locking hint NOLOCK to reduce any locking). It is efficient to use Full-Text search feature for free text searching, but it doesn't make sense for this type of ad-hoc requirements.

Create this procedure in the required database and here is how you run it:

--To search all columns of all tables in database for the keyword "Hello"
EXEC SearchAllTables 'Computer'
GO

Store procedure code

CREATE PROC SearchAllTables
(
@SearchStr nvarchar(100)
)
AS
BEGIN
CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))

SET NOCOUNT ON

DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)
SET @TableName = ''
SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')

WHILE @TableName IS NOT NULL
BEGIN
SET @ColumnName = ''
SET @TableName =
(
SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName
AND OBJECTPROPERTY(
OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
), 'IsMSShipped'
) = 0
)

WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)
BEGIN
SET @ColumnName =
(
SELECT MIN(QUOTENAME(COLUMN_NAME))
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = PARSENAME(@TableName, 2)
AND TABLE_NAME = PARSENAME(@TableName, 1)
AND DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')
AND QUOTENAME(COLUMN_NAME) > @ColumnName
)

IF @ColumnName IS NOT NULL
BEGIN
INSERT INTO #Results
EXEC
(
'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630)
FROM ' + @TableName + ' (NOLOCK) ' +
' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2
)
END
END
END

SELECT ColumnName, ColumnValue FROM #Results
END

Saturday, February 20, 2010

thumbnail

Search Engine Optimization

After navigating few sites and going through Aaron Matthew Wall’s book on SEO ‘SEO BOOK’ I learned few things about SEO.

Note: Google is targeted mainly in this article.

Parts of Search Engine:Every crawling search engine has the same basic parts

• a crawler
• an index (or catalog)
• search interface

Crawler:
It scours the web following links, updating pages, and adding new pages when it comes across them. Search engines have time of deep crawling and shallow crawling.

Note: We can get page crawled frequently if we get already frequently crawling page point to our page through a hyperlink.


Index:
The index is where the spider collected data is stored.

Example: When you search Google and it displays 1-10 out of 143,000 website it means that there are 143,000 web pages which either have the words in your keyword phrase on them, or have inbound links containing the words in the phrase.

Note: To see which pages of a site are indexed by google type
site:www.sitename.com

Search Interface:
The search algorithm and search interface are used to find the most relevant document in the index based on the user search.

Note: In most major search engines a portion of the relevancy calculations are stored ahead of time and some of them are calculated in real time.




Factors and Guidelines Influencing Page Ranking:
http://en.wikipedia.org/wiki/Search_engine_optimization + Google Guidelines + SEO BOOK

SEOs widely agree that the signals that influence a page's rankings include

1. Use keywords in the title tag.
2. Use appropriate domain name.
Tips:
a. Avoid long domain names
b. Avoid dashes in domain names. E.g. googleads.com is better than
google-ads.com
c. If site is hosted in UK then use .co.uk domain. Also buy the .com version of domain and redirect to .co.uk.
d. If possible use domain name with keywords in it.
e. Register your domain at ICANN accredited registrar.
f. Don’t go for free hosting.
g. Try hosting the site in country it targets e.g. host googleads.co.uk in United Kingdom.
Note: Dreamhost and Pair are recommended sites by SEO BOOK for hosting

3. Use keywords in links pointing to the page.
4. Use keywords appearing in visible text.
5. Keywords in Heading Tag H1, H2 and H3 Tags in webpage.
6. Use proper linking from one page to inner pages.
7. Try placing punch line at the top of page.
8. Have other relevant sites link to yours.
Note: This is most important and time consuming in SEO. For more details see Creating Inbound Links
9. Make sure all the sites that should know about your pages are aware your site is online.
10. Make a site with a clear hierarchy and text links. Every page should be reachable from at least one static text link.
11. Offer a site map to your users with links that point to the important parts of your site. If the site map is larger than 100 or so links, you may want to break the site map into separate pages.
12. Think about the words users would type to find your pages, and make sure that your site actually includes those words within it.
13. Try to use text instead of images to display important names, content, or links. The Google crawler doesn't recognize text contained in images.
14. Make sure that your TITLE and ALT tags are descriptive and accurate.
15. Check for broken links and correct HTML. Xenu Link Sluth is a free downloadable link checking program.
16. If you decide to use dynamic pages (i.e., the URL contains a "?" character), be aware that not every search engine spider crawls dynamic pages as well as static pages. It helps to keep the parameters short and the number of them few.
17. Keep the links on a given page to a reasonable number (fewer than 100).

There are many other signals that may affect a page's ranking, indicated in a number of patents held by various search engines, such as historical data. For more details see the
Nitty-Gritty section.

Note: Google, Yahoo, Microsoft and Ask.com do not disclose the algorithms they use to rank pages.


Getting Page in Search Engine Database:
http://en.wikipedia.org/wiki/Search_engine_optimization

• You can use Google’s AddUrl
• You can use Google Sitemaps and create and XML feed of sitemap to be submitted.
• A link to your page from already indexed site. (It can take a few days or even weeks from the acquisition of a link from such a site for all the main search engine spiders to begin indexing a new site, and there is usually not much that can be done to speed up this process). This is the best and recommended way.
• Using paid submission services. (Such services usually guarantee inclusion in the database, but does not guarantee specific ranking within the search results).

Note: Major search engines, by and large, do not require any extra effort to submit to, as they are capable of finding pages via links on other sites.


Blocking Page from Entering in Search Engine Database:http://en.wikipedia.org/wiki/Search_engine_optimization

Webmasters can instruct spiders not to crawl certain files or directories through the standard robots.txt file in the root directory of the domain. Additionally, a page can be explicitly excluded from a search engine's database by using a robots Meta tag.

Example:


Note: You can learn more about Robot.txt file by clicking here

Getting Inbound Links / Back LinksAn inbound links are ‘hyperlinks transiting domains’ or you can say simply ‘links into a page’ e.g. link from page A to page B will be an inbound link for page B. Search engines usually count this a vote to page B from page A


Who links to you and with what words is the #1 ranking criteria for competitive phrases in all major search engines

Note:
• To check backlinks to a site in google type
link:www.sitename.com
• To check backlinks to a site in Yahoo type
linkdomain:www.sitename.com
Tools:
• Digital Point [Look here for free tool which will track your Google position by keyword, PageRank, and number of backlinks]
• Rusty Brick [Tool that does Google backlink analysis]


Getting inbound links is most difficult and time consuming part of SEO. For this
1. You can submit your site to directories. Click here for list of directories.
o Writing articles about your topic and placing them on other websites can give you inbound links via the article signature. Click here for list of sites where you can submit your articles
2. Writing press releases can give you inbound links. You can submit a press release at
o PRWEB
o 24 7 Press Release
o Click 2 NEWS
o Free News Release
o Free Press Release
o I Newswire
o Media Syndicate
o PR Free
o PR Leap
o PR Web
o Web Wire
3. People interested in your site may eventually link to you without you asking.
4. You can participate in forums which provide signature links.
5. A somewhat recent move which has been exploited is posting comments directed toward your website in web logs.
6. Sponsor 501C organizations.
7. Place advertisements on relevant related sites.
8. Make some thing useful e.g. some software [if you are running software oriented site] and give it for free to download.
9. You can email the person at support. Consider sample email.
Sample Email:
hello
I have been browsing around photography sites for hours now and just ran across yours...its awesome (stroke the ego)
wow your picture of that dove, bla bla bla...bird photography is one of my bla bla bla (be specific & show you visited their site)
I took this pic or a flying mongoose here: (look we are the same)
I have already added a link to your site on my cool sites page
(/ If you feel a phone call is necessary then you may want to give them your number or call them up versus send an email.)
Your site visitors may well be interested in bla bla bla at my site bla bla (show them how linking to you benefits them)
If you like my site please consider linking to it however you like (let them know they have choices - don't come across as ordering them to do something)
Or with this code (make it easy for them)
I think my site matches well with the theme on this page
Either way thanks for reading this and keep posting the awesome photos (reminder ego stroke)

Thanks

Me
Me at
myemail.com
http://www.mywhateversite.com
my number


• The people who are subscribing to RSS feeds are also the most likely to be people who comment on the contents of the sites you want your page link on. If you can figure out a way to get these people to desire to give you their attention you quickly and cheaply reach the most influential voices.
Note:
1. Never ever link your site to Viagra, casino, drug, gambling and porn sites or other high margin off topic websites. In such case you may end up getting your site banned.
2. Don’t link to site that does not offer quality content.
3. Try not to link to sites on same hosted server and don’t try to create your own sites for linking purpose.

Tools for Inbound Links
• Hub Finder [tool looks for co occurring back links]
• Prog [Google PageRank display search tool]
• Rusty Brick’s [link analysis tool. Works with the Google API and offers C block IP and anchor text reporting. Since it works with the Google API it is somewhat slow, but it is free]
• Class C IP checker [checks for duplicate class C IP addresses from a list of domains. Links from sites which are on the same C block IP address may not carry as much weight as sites from different C block IP addresses.]
• PostTrades unique C block backlink checker [In the upper right corner of the PostTrades website is a tool which will tell you the number of unique C block IP addresses pointing links into your site. Tool works by looking that the IPs in the first 1000 backlinks in Yahoo!. If you have over 1000 backlinks then the tool may not provide accurate results]
• Unique Linking Domain Checker [returns links to all unique linking websites that link at your site]
• Unique C Block Backlinks Checker [allows you to quickly survey how competitive a market is by seeing how many C blocks are linking at competing websites]
• Optilink link analysis software [Optilink automates sorting competitotrs backlinks and displays the anchor text in links]
• SEO Elite [similar to Optilink, but also checks reciprocal link partners. Brad has been doing a good job of updating it and adding features to it. If you are torn between OptiLink and SEO Elite I would recommend buying SEO Elite, or trying them both and returning whichever one you do not like]
• PRWeb [free press releases. I often recommend purchasing one of their premium services though]
• Cooperative Ad Network [this essentially amounts to a huge link farm, but it is blended in with many sites that are well integrated into the web. Eventually it may somehow be filtered out or lessened in power, but currently it is rather powerful for MSN and Yahoo! (and to a lesser extent Google). I currently am not using this ad network on any of my permanent sites, but feel it is worth mentioning]
• LinkItForward [LinkItForward is similar to the Coop Ad Network in that it uses the power of many sites to help them all. Instead of reciprocating links with LinkItForward you link to some domains and for doing that get credits where others will link to your domain. I currently am not using LinkItForward on any of my sites, but feel it is worth mentioning]
• LinkExplore [LinkExplore helps you collect contact and linking details to trade links with people who have site details in the LinkExplore database. The LinkExplore database has over 10,000 entries and you can search by keyword and category. LinkExplore also allows you to collect data from the search engines similarly to how SEO Elite and OptiLink work. One of the benefits of LinkExplore over some of the other link analysis tools is that their database already has a number of people in it who are likely to want to trade links with similar related resources.]
• Arelis [link exchange software. It allows you to seek out link partners, their contact information, and email them. I would make sure I customized any email I sent out so as to avoid being accused of email spamming. Arelis also tracks your status with link exchange communications. Arelis also allows you to upload HTML pages with your link partners links on them, but I would not recommend using that feature on permanent sites, or ensure I removed any footprints left by software which is designed specifically for link exchanges. It lets you chose the base template to match your site, but you will want to make sure the coding matches up well also. When you exchange links it is a good idea to also link to related internal pages and quality resources that may not be linking back at your site. ()]
• Zeus [Zeus is a link exchange manager / directory software similar to Arelis. Both offer a free trial. I have not fully tested Zeus]
Keywords
Definition:
Keywords are typically two to five word phrases you expect people to search for to find your website.
Note:
• A note of caution is that you can not optimize a page for 20 different keywords. As you add more keywords to the mix, you lessen the keyword density and change the focus of the page. The page can start to sound robot created if you are optimized for too many terms.
• Avoid misspellings in keywords
• Most search engines treat hyphens as a space. E-mail is different than email. If a word is split in half by a hyphen then you should check to see which version is used more frequently and optimize for whatever versions are commonly searched for. If a hyphen is sometimes placed between two words then using either version (with or without a hyphen) will cause your page to rank better for both versions.
Finding Keywords:
• Words people would search for to find your product
• Problems your prospective customers may be trying to solve with your product or service (even if they do not know you exist)
• Keyword tags on competitors websites
• Visible page copy on competitors websites
• Related search suggestions on top search engines (such as Google or Yahoo!)
• Related term suggestion at smaller engines such as Gigablast and Vivisimo
• Keyword groupings via tools such as Google Sets
• Keyword suggestion tools (which are covered in the next section)

Tools:
Below is a list of tools, some generate keywords and some help in keyword generation process. Some also tell your ranking on Yahoo and Google for keywords.
• Overture Search Term Suggestion Tool [Free tool based on prior months Overture ad distribution. Please note the Overture tool combines singular and plural versions of a word and only can track those terms which already have ads in place. Since Overture makes money by selling ads and many automated bots search through their distribution network their results may run high (some highly competitive commercial terms are off by a factor greater than 10 fold).]
• DaveN Scrapper Tool [It queries Google Suggest]
• Google Suggest [Near the end of 2004 Google launched Google Suggest, which attempts to auto-complete search queries. The results are influenced by search popularity so you can use the tool to help you find many of your deeper keyword phrases after you find some of your broad keywords.]

• Google Keyword Sandbox [Free tool from Google AdWords. Offers likely synonyms to the word you type in, but does not approximate traffic. To approximate traffic you would need to set up a Google AdWords campaign and track the number of times your ad displays. Be careful in doing this because it can get rather expensive if you create random ads for the wrong words and / or bid highly for your keywords.]
• Google Sets [Shows groups of related keywords]
• Good Keywords [Good Keywords is free and offers some useful features. it saves you keyword searches and can be well worth the free download for doing preliminary keyword research.]
• The Google Toolbar [Good for highlighting keyword density and doing many things like giving you a quick glimpse of a cached copy of a page and its back links.
• WordTracker [WordTracker takes sampled data from a couple Meta search engines and projects future search rates for different words.]
• Keyword Discovery [Keyword Discovery is a similar product to WordTracker with a few more features and a deeper database]
• Ontology Tool [Finds related words using the Google ~ search.]
• Lexical Database Wordnet [a lexical keyword database for the English language.]
• Digital Point [Digital Point created a free tool which combines the Overture tool and the free version WordTracker tool.]
• Post Trades [Post Trades is a new SEO forum which has a free tool in the upper right corner which tells you how many unique linking domains are pointing links into a site. That tool will not tell you whether or not they are using keyword rich anchor text, but it is another good way to estimate how competitive a keyword is. The Post Trades tool only analyzes the first 1,000 backlinks in Yahoo!, so if your competitors have more than 1,000 backlinks it may not be accurate.]
• Yahoo! Search Rankings [Yahoo! Search Rankings is a way to quickly check where your site ranks for any given term in Yahoo!]
• Yahoo! Tracker [Tracks keyword rankings in Yahoo!]
• Top25Web Page Rank lookup [shows PageRank of any page you input]
Misc Article Submission Sites:• http://goarticles.com/
• http://ezinearticles.com/add_url.html
• http://amazines.com
• http://www.articlecity.com/
• http://bpubs.com/
• http://businessknowhow.com/
• http://www.certificate.net/wwio/ideas.shtml
• http://www.promotionworld.com/
• http://promotenewz.com/
• http://www.purplepages.ie
• http://www.stickysauce.com
• http://www.certificate.net
• http://www.freesticky.com
• http://www.bullmarketer.com
• Many more

Yahoo Announcement Groups• http://groups.yahoo.com/group/ArticlePublisher/
• http://groups.yahoo.com/group/Free_eContent/
• http://groups.yahoo.com/group/Free-Reprint-Articles/
• http://groups.yahoo.com/group/FreeWrites/
• http://groups.yahoo.com/group/freE-zinecontent/
• http://groups.yahoo.com/group/netwrite-publish-announce/
• http://groups.yahoo.com/group/publisher_network/
• http://groups.yahoo.com/group/ReprintArticles-Paradise/
• http://groups.yahoo.com/group/TheWriteArticles
• http://groups.yahoo.com/group/aainet/
• http://groups.yahoo.com/group/Free-Content/
• http://groups.yahoo.com/group/aabusiness/

More Article Submission Sites:• For more article submission sites click on Microsoft Excel Worksheet below

About me

simple one.