Pages

Google Analytics Alternative

Search This Blog

Tuesday, November 23, 2010

Sql StoredProcedure Optimization Tips

We will go over how to optimize Stored Procedure with making simple changes in the code. Please note there are many more other tips, which we will cover in future articles.
  • Include SET NOCOUNT ON statement: With every SELECT and DML statement, the SQL server returns a message that indicates the number of affected rows by that statement. This information is mostly helpful in debugging the code, but it is useless after that. By setting SET NOCOUNT ON, we can disable the feature of returning this extra information. For stored procedures that contain several statements or contain Transact-SQL loops, setting SET NOCOUNT to ON can provide a significant performance boost because network traffic is greatly reduced.

CREATE PROC dbo.ProcName
AS
SET NOCOUNT ON;
--Procedure code here
SELECT column1 FROM dbo.TblTable1
-- Reset SET NOCOUNT to OFF
SET NOCOUNT OFF;
GO 


Sunday, November 14, 2010

Command-line Building With csc.exe

Command-line Building With csc.exe

You can invoke the C# compiler by typing the name of its executable file (csc.exe) on the command line. If you use the Visual Studio Command Prompt (available as a shortcut on the start menu under Visual Studio Tools), all the necessary environment variables are set for you. Otherwise, you must adjust your path in order to enable csc.exe to be invoked from any subdirectory on your computer. If you do not use the Visual Studio Command Prompt, you must run vsvars32.bat to set the appropriate environment variables to support command line builds. For more information about vsvars32.bat, see How to: Set Environment Variables.


If you are working on a computer that only has the Windows Software Development Kit (SDK), you can use the C# compiler at the command line if you use the SDK Command Prompt, which is available from the Microsoft .NET Framework SDK menu option.

You can also use MSBuild to programmatically build C# programs. For more information

The csc.exe executable is usually located in the Microsoft.NET\Framework\ folder under the system directory. Its location may vary depending on the exact configuration on any individual computer. Multiple versions of this executable will be present on the computer if more than one version of the .NET Framework is installed on the computer. For more information about such installations, see Determining Which Version of the .NET Framework Is Installed.

Rules for Command-Line Syntax for the C# Compiler

________________________________________
The C# compiler uses the following rules when it interprets arguments given on the operating system command line:
• Arguments are delimited by white space, which is either a space or a tab.
• The caret character (^) is not recognized as an escape character or delimiter. The character is handled by the command-line parser in the operating system before it is passed to the argv array in the program.
• A string enclosed in double quotation marks ("string") is interpreted as a single argument, regardless of white space that is contained within. A quoted string can be embedded in an argument.
• A double quotation mark preceded by a backslash (\") is interpreted as a literal double quotation mark character (").
• Backslashes are interpreted literally, unless they immediately precede a double quotation mark.
• If an even number of backslashes is followed by a double quotation mark, one backslash is put in the argv array for every pair of backslashes, and the double quotation mark is interpreted as a string delimiter.
• If an odd number of backslashes is followed by a double quotation mark, one backslash is put in the argv array for every pair of backslashes, and the double quotation mark is "escaped" by the remaining backslash. This causes a literal double quotation mark (") to be added in argv

Sample Command Lines for the C# Compiler


________________________________________

• Compiles File.cs producing File.exe:
           csc File.cs
• Compiles File.cs producing File.dll:
          csc /target:library File.cs
• Compiles File.cs and creates My.exe:
          csc /out:My.exe File.cs
• Compiles all the C# files in the current directory, with optimizations on and defines the DEBUG symbol. The output is File2.exe:
          csc /define:DEBUG /optimize /out:File2.exe *.cs
• Compiles all the C# files in the current directory producing a debug version of File2.dll. No logo and no warnings are displayed:
          csc /target:library /out:File2.dll /warn:0 /nologo /debug *.cs
• Compiles all the C# files in the current directory to Something.xyz (a DLL):
          csc /target:library /out:Something.xyz *.cs

Differences Between C# Compiler and C++ Compiler Output

Differences Between C# Compiler and C++ Compiler Output
--------------------------------------------------------------------------------
There are no object (.obj) files created as a result of invoking the C# compiler; output files are created directly. As a result of this, the C# compiler does not need a linker.

Friday, November 12, 2010

how to enable instance using sp_configure

hi friends,
i find too many issues while attaching any database file in asp..net project
so for that use the below command for enable instance configuration in your sqlExpress

sp_configure  'user instances enabled', 1; RECONFIGURE

Wednesday, November 3, 2010

Computer on rent in Gandhinagar

sunrise computer
sec-24
Reference by Vikaram Sagar Candid computer
contact number
sivrambhai 9427055568,
nanjibhai 9408474313

P-3 on 400Rs.
P-4 on 600Rs.
Core 2 dual on 800



laxmi info
sec-21
Reference by Mr.Drumil Kanani (Niral's old room mate )
hareshbhai 9825332949
P-4 on 1200
P-3 on 800