Wednesday, December 7, 2011

How do you run a 300mb+ MS SQL .sql file?

From the command prompt, start up sqlcmd:

sqlcmd -S <server> -i C:\<your file here>.sql -o
Just replace with the location of your SQL box and with the name of your script. Don't forget if you're using a SQL instance the syntax is:
Here is the list of all arguments you can pass sqlcmd:
Sqlcmd            [-U login id]          [-P password]
  [-S server]            [-H hostname]          [-E trusted connection]
  [-d use database name] [-l login timeout]     [-t query timeout] 
  [-h headers]           [-s colseparator]      [-w screen width]
  [-a packetsize]        [-e echo input]        [-I Enable Quoted Identifiers]
  [-c cmdend]            [-L[c] list servers[clean output]]
  [-q "cmdline query"]   [-Q "cmdline query" and exit] 
  [-m errorlevel]        [-V severitylevel]     [-W remove trailing spaces]
  [-u unicode output]    [-r[0|1] msgs to stderr]
  [-i inputfile]         [-o outputfile]        [-z new password]
  [-f  | i:[,o:]] [-Z new password and exit] 
  [-k[1|2] remove[replace] control characters]
  [-y variable length type display width]
  [-Y fixed length type display width]
  [-p[1] print statistics[colon format]]
  [-R use client regional setting]
  [-b On error batch abort]
  [-v var = "value"...]  [-A dedicated admin connection]
  [-X[1] disable commands, startup script, enviroment variables [and exit]]
  [-x disable variable substitution]
  [-? show syntax summary]

Saturday, October 8, 2011

How to Block Websites without using any Software


1.) Open “Run” from the start menu (or press WinKey + r). Just copy paste the following path and hit ENTER.
notepad %windir%\system32\drivers\etc\hosts
Alternately, go to C:\Windows\System32\Drivers\Etc and find the file “hosts”. Open that file in Notepad.
2.) When this hosts file is opened in Notepad, at the end of the file you will see something like “127.0.0.1 localhost”.
3.) Under “127.0.0.1 localhost” just add another website URL that you want to block.
For Example:-
127.0.0.1 localhost
127.0.0.2 www.kalpesh.biz
127.0.0.3 www.consumer-complaints.in
4.) Make sure every time you add another website, the last digit of the address 127.0.0.x should not be the same.

5.) Save the file and exit.
So, here you go. Restart your browser if it is opened and changes will take place immediately.
The good thing is that no message, no pop ups nothing will be displayed when someone tries to open a blocked website. Your browser will just fail to open those websites without any error messages.

Thursday, August 11, 2011

FireFox : Debugging Problem in Silverlight


Solution 1:

Manually attach the visual studio debugger to “plugin-container.exe”


Solution 2:

This involves changing Firefox’s config, and really should only be done to ease silverlight debugging until a proper fix is released.
  1. Type "about:config" into FF's address bar
  2. Accept the warning (if applicable)
  3. Search for the entry "dom.ipc.plugins.enabled.npctrl.dll"
  4. Change its value from "true" to "false" (double-click)
  5. Restart the browser
Thanks MisterGoodcat for this solution  More info