Wednesday, May 27, 2009

LEN and Char in SQL

len in MS SQL will not count the space in the end.

Ex: select len(' ') will return 0
Ex: select len('a ') will only return 1


If char is defined in store procedure parameter, the space will fill in the end to the length of char.

ex: @comment char (100)
when null value passed in, @comment will equal to 100 space.

Wednesday, May 20, 2009

Disabled SQL Server Audit Login /Audit Logout

Audit Login -- network protocol: Named Pipes
set quoted_identifier on
set implicit_transactions off
set cursor_close_on_commit off
set ansi_warnings on

Audit Login -- network protocol: TCP/IP
set quoted_identifier on

Friday, May 15, 2009

Extended Virtual PC Disk Space

http://vmtoolkit.com/files/folders/converters/entry87.aspx

Wednesday, May 13, 2009

Install sharepoint server without active directory

If you plan to install SharePoint 2007 even without using Active Directory, you may do by creating the database tables manually and assigning the users in them to be used by SharePoint.

This post explains the steps for making this happen:

Now, here’s one of the reason why the SharePoint installation wizard has a checkbox prior to running the configuration wizard:

Right after installation, uncheck this checkbox, or if you did and were halted at the “Specify Configuration Database Settings” page, simply close the wizard. What we need to do now is to go to our SQL Management Studio (or SQL Enterprise Manager for SQL2K), and create four databases manually. Make sure these databases are created with the Latin1_General_CI_AS_KS_WS collation (for the curious, C = Case, A = Accent, K = Kana, W = width, and I/S for Insensitive/Sensitive). These four databases would be: the SharePoint Configuration, SharePoint Admin Contents, Shared Services, and Shared Services Search. Assign the SQL login that we are going to use for MOSS as the dbo for these four databases – let’s name them as “SharePoint_Config”, “SharePoint_AdminContent”, “SharedServices_DB” and “SharedServicesSearch_DB”.

Now fire up the command line console and use the following command (from the 12 hive* folder, “bin”):

*12 hive being the %programfiles%common filesblah blah blah12 – you get the idea.

PSConfig -cmd -configdb -create -server database_servername -database SharePoint_Config -user domain/username -password password
-dbuser sharepoint_login_username -dbpassword sharepoint_login_password -admincontentdatabase SharePoint_AdminContent

Monday, May 11, 2009

HTTP Request-Based Testing Does Not Test the UI

It is very important to keep in mind that a web test simulates the HTTP request traffic that is generated
when a user exercises your web site. It does not exercise any of the UI elements or JavaScript on
your pages. As such, it does not test the UI that your users see, but it does test the core functionality of
your system. Often with a web site the amount of functionality that is in the client UI is pretty minimal,
but it can be an issue if much of your site has script-heavy pages or uses AJAX.
This is good for a couple of reasons. It means that your tests are not affected by UI changes. UI-based
testing is often fragile because the UI changes more frequently than the underlying HTTP requests being
used. The other benefit is that UI tests cannot effectively be used for load testing. Having the web tests
not be UI-based means that when they are included in a load test, you can execute multiple instances of
the test at the same time, allowing simulating 100 users, for example, all executing the same web test on
a single computer.
But the drawback of using HTTP requests is that your UI and the scripts on the page do not get exercised.
This has two main effects that you need to watch out for: inability to properly test your UI and scripts
affecting your dynamic data.

WebTesting - Fiddler, Visual Studio 2008, MOSS

# Assuming this is the first time you have loaded up fiddler2 and are using Visual Studio 2008 with web testing tools installed. Testing tools is not a default install of Visual Studio 2008. I have the following installed in VS and think it's this:
"Microsoft Visual Studio Team System 2008 Test Edition"
# You have a "Archive Zip File" (.saz) that someone has recorded.
# Open the .saz file up in Fiddler2
"File > Load Archive..."
# Now save the file as a Visual Studio Web Test. First highlight all the lines in the Web Sessions pane of fiddler then click:
"File > Save > Session(s) > as Visual Studio Web Test"
# I have called the sample file "BlogTest.webtest"
# If you get the following error:
"One or more plugins returned an error, but the remaining plugins executed and the Web Test was written.

Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=8.0.0.0,... "image
# It is because the Fidder2 plugins are expecting Visual Studio 2005. To get around this:

* goto the Fiddler2 install folder
* open "fiddler.exe.config"
* paste the following code over the existing xml that's in the config file:





publicKeyToken="b03f5f7f11d50a3a"
culture="Neutral" />
newVersion="9.0.0.0"/>






Ref: http://iguanagears.blogspot.com/2008/07/webtesting-fiddler-visual-studio-2008.html