Technology Insights

Get physical path to SQL Server 2005 data files

To get the path where SQL Server 2005 stores data files for databases, you can use the following T-SQL script: USE master GO DECLARE @data_path nvarchar(256) SET @data_path = (SELECT SUBSTRING(physical_name, 1, CHARINDEX(N’master.mdf’, LOWER(physical_name)) – 1) FROM master.sys.master_files WHERE database_id = 1 AND file_id = 1) SELECT @data_path AS DataPath It uses the built-in “master”…

Technology Insights

Creating remote branches from local ones in Git

I had an existing local branch that I had done some commits to and wanted to create a remote branch on origin so that I could check it out to other local branches on different machines. The current version of Git (1.6.1.x at the time of this writing), doesn’t seem to have an elegant way of doing this, but still I was able to do it fairly simply by manually editing Git’s “config” file (inside of the “.git” folder of a working directory).

Technology Errors

Business Objects gives error “class com.businessobjects.wp.tc.TCMain not found”

When upgrading from SAP Business Objects XI R2 service pack 1 to service pack 2, I got the following error in the Java runtime console when trying to create new or use existing Web Intelligence reports: load: class com.businessobjects.wp.tc.TCMain not found. java.lang.ClassNotFoundException: com.businessobjects.wp.tc.TCMain at sun.applet.AppletClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)…