Tuesday, December 7, 2010

Open .jar files with java on double click

If you have installed only the java SE JDK you will not be able to open .jar file by just double clicking it. You can set the executable file my selecting “open with” option on the shortcut menu item. You need to create a .cmd file in the java bin folder ex: “D:\Program Files\Java\jdk1.6.0_21\bin” as java.cmd edit the file in notepad and add the below commands

javaw.exe -jar %1
exit

select java.cmd file as the always open with for .jar file.

Tuesday, November 23, 2010

Extract files from a MSI package

Usually it is possible to use ones favorite compression utility to treat a Microsoft Installer Package (MSI) like it was a normal archive. Though sometimes it doesn't work, but then one can use the Windows Installer Tool (Msiexec.exe) to extract the files from the MSI package. It can open a MSI package in "Administrator" installation mode, where it can extract the files without performing the install.

Runs setup where one can select where to extract the files without actually installing the application:

Msiexec /a mypackage.msi

Extracts the files to the specified location without user interaction:

msiexec /a mypackage.msi /qb TARGETDIR="C:\MyFolder"

Note this can also be useful in case an MSI package has been configured to block install, when used on certain versions of Microsoft Windows.

Could not load file or assembly 'Microsoft.SqlServer.BatchParser'

Sirs:

I've seen several posts on this forum about this issue, and several have been resolved, but I'm not seeing the answer.

On my Windows 7 machine with SQL Server 2008 R2, I have a Visual Studio 2010 project that uses SQL SMO.

The app runs fine on my machine, but when I publish to another server, I get Could not load file or assembly 'Microsoft.SqlServer.BatchParserClient'

If I go to http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

and install Microsoft SQL Server 2008 Native Client , Microsoft SQL Server System CLR Types , and Microsoft SQL Server 2008 Management Objects I stop getting the error.

It seems to me that I should just be able to properly reference what I need and deploy my project...

So- how do I deploy my project without needing these installs?

In you project you need to include all the dll of Microsoft SQL Server 2008 Management Objects and ( Microsoft SQL Server System CLR Types not sure if it is required ) but you still need to install the Microsoft SQL Server 2008 Native Client on the system where the application is going to be installed.

Friday, February 6, 2009

Managing Unix environment variables

Managing Unix environment variables

in UNIX system we are not able to use the (AT the Rate) @ character. in any command..

so to connect to to slqplus the connection string cannot be passed
EX:

sqlplus system/oracle@ConnectioString

to over come this issue we need to set the environment varible TWO_TASK or ORACLE_SID

TWO_TASK=ConnectioString

or

ORACLE_SID=DatabaseName (first 8 character) (SID)

then we can use as

sqlplus system/oracle

find below more information from

http://www.orafaq.com/faq/managing_unix_environment_variables


Submitted by admin on Sat, 2004-08-07 07:18 To check what environment variables are set for your user, enter:

env | grep -e ORA -e TNS -e SQL

NOTE: Use /usr/xpg4/bin/grep instead of grep on Solaris.

Here are a few basic ORACLE environment variables. More environment variables,
can be found in the Oracle for Unix Installations Guides.

LD_LIBRARY_PATH - Path to library files. Eg: /usr/lib:/usr/openwin/lib:$ORACLE_HOME/lib:/usr/games/lib

ORACLE_BASE - Full path name to the base directory for all versions of Oracle products.


ORACLE_HOME - Full path name to the version of ORACLE you are currently using. ORACLE_HOME is normally found beneath ORACLE_BASE in the directory tree. This variable is used to find executable programs and message files.


ORACLE_SID - ORACLE Server system identifier (SID) or instance name. The database name is used as ORACLE_SID. This is required for all ORACLE products and is set by the coraenv script.


ORACLE_PATH - Defines the path names to locate files. If ORACLE_PATH is set, the application searches the directories specified by $ORACLE_PATH first, then the current directory. If ORACLE_PATH is not set, then the application uses the current directory. This variable is used by SQL*Plus, Forms and Menu.


ORACLE_TERM - Defines a terminal definition. If not set, it defaults to the value of your TERM environment variable. Used by all character mode products.


ORAENV_ASK This will not ask for ORACLE_SID, it will take it as it is specified. This variable is normally set to "NO" before oraenv is invoked from a script.


TNS_ADMIN - Defines the path name to the TNS (Transparent Network Substrate) files like TNSNAMES.ORA, SQLNET.ORA etc.


ORACLE_TRACE - Trace Oracle's Unix shell scripts as they execute (using set -x).


TWO_TASK - The TWO_TASK environment variable specifies a SQL*Net connect string for connecting to a remote machine in a client/server configuration. SQL*Net will check the value of TWO_TASK and automatically add it to your connect string.

Saturday, January 3, 2009

stuck with grub prompt at boot time ?

If you were trying to install Linux as dual partition on you windows OS, and during installation something goes wrong!!
Or while you are booting your system if you are stuck with a grup prompt don’t panic you can get back to you safe haven (windows OS) by just fallowing these 4 steps.


grub > root (hd0,0)
that is assuming your windows partition is on hda (primary master, first partiton - adjust the numbers accordingly)
grub > makeactive
grub > chainloader +1
grub > boot

Tuesday, December 2, 2008

ASP.NET: View Trace Information on your ASP.NET Web Pages

If you want to see a huge amount of info about your pages, add Trace="true" to the @Page directive at the top of each ASP.NET page. An example is:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="editusers.aspx.vb" Inherits="xoc.ZapEm.EditUsers" Trace="true" %>
Alternately, you can instead change the web.config file for the web site. Change the trace enabled="false" to enabled="true". Then visit the virtual page trace.axd; if your web site is example.com, then visit http://www.example.com/trace.axd. This will show the trace information for the last 10 web pages on your site with all the debugging information.

Obviously, you should only use this for debugging and turn it to false before posting to a production web server. Info that you will get: