Cool tips and tricks for Google Chrome…

This is a decent post I put out there about Chrome on my businesses website but I figured all you WordPressers out there would enjoy skimming it too. I am going to make a series of these since people like them! More to come.

http://www.getbooksmarts.com/tips-tricksGet great speed from Chrome-and-news/google-chrome-productivity-tips-tricks

DBA Test/Development Server Best Practices

These are things I learned from a hardware failure of a test server (you might also call it a staging area). So what’s the big deal? Developers should have all their code checked into source control and nothing critical should be on there right?

Sadly no. These are things you should do on your test server to limit your exposure as a DBA.

1. Treat the server as a production server. This includes transaction log backups, backups of user accounts, SSIS, SSRS, SQL Agent jobs, and Windows Tasks.

2. Trust, but verify. Trust the developers to be following best practices, after all your job is to make the company money and so is theirs. Periodically issue correspondence with the developers to verify that nothing is running in a production manner.

3. Get a good snapshot/system image from time to time. If someone or something destroys your server, you have something to fall back upon. This is especially true when developers are creating lots of dependencies in their code to OS level libraries.

Powershell Retrieving Remote System Time

Compare Local Date and Time to a Remote Computer

This is a rather interesting problem. I was doing a comparison between an audit table and a trace for SQL Server, which was proving to be dificult as I soon realized there was latency as well as the system date’s had an offset. So I turned to my good old friend, Powershell. Powershell has a very nice interface for coding against WMI, which I fully leveraged in this code snippet.

#Server name here. 
$ServerName = <Server Name Here>
#Retreive the localtime of the server. 
$remoteDate = Get-WmiObject -ComputerName $ServerName -Class win32_operatingsystem -Property LocalDateTime
#Converting a WMI time to a standard datetime format. 
$remoteDate = [System.Management.ManagementDateTimeConverter]::ToDateTime($remoteDate.LocalDateTime)

$localDate = Get-Date

#Displaying the difference. 
$remoteDate - $localDate

Best Mobile Apps For Weight Loss

It is now exceptionally easy to lose weight, thanks to these two apps.

LiveStrong Calorie Tracker

First, and in my opinion the most important is the LiveStrong Calorie Tracker. This app is available as a website or an app for your phone, even Windows Phone 7. You can enter in many different kinds of foods listed in their database or enter your own. Also keep track of your workouts. At the end of the day, if you have calories left over you will lose weight, simple as that.

Nike+

The other is Nike+. Keep track of your workouts, set goals, and get coaching advice from Nike’s website.

That is the technology behind weight loss. The other half of it is setting goals. For myself I have a life long goal to watch my children grow up and have children of their own. That is my underlying motivation. I also have shorter goals, lose two pounds this week or run 2 miles in 15 minutes. All in all, I’ve lost 20 pounds so far, halfway to my goal, and a lifetime of maintenance. I have noticed that I am much happier now and feel better too. Start enjoying life.

http://nikerunning.nike.com

http://www.livestrong.com/

Visual Basic Basics: Visual Basic 2010 – Implicit Line Continuation

VB Line Continuation Operator (_ underscore)

Yay _

no more _

under scores _

for line continuation!!!!!_

It was one of my pain points in VB. Please visit the below, he does a wonderful job explaining it.

Visual Basic 2010 : Implicit Line Continuation – Fryan’s Digital World.

And of course, we all know that Visual Basic is superior to C#:

http://www.simple-talk.com/dotnet/.net-framework/10-reasons-why-visual-basic-is-better-than-c/

Honestly I like both, but I am partial to VB, C# is a little more masochistic.

How to Map to Skydrive

This is a great article to show you how to do it and I give him credit:

http://howto.cnet.com/8301-11310_39-57347395-285/how-to-map-your-skydrive-folder-in-windows-7/

But there is a problem why would you want those files to be exposed to the public???

\\docs.live.net@SSL\IDGOESHERE\^2Public

See the end that says public? Yeah, you don’t want that, change it to:

\\docs.live.net@SSL\IDGOESHERE\^2Documents

This will save it to your documents folder on your Skydrive, much more secure in that not everyone can see your files.

SQL Server Reporting Services ~ Ordering Parameters

Did you get the error when previewing: FORWARD DEPENDENCIES ARE NOT VALID

In SSRS 2005 it was relatively easy to change the order of the parameters, just right mouse click on the report and click on Report Parameters. But they “moved the cheese”. Once you know where it is, it is fast to change. It is now in the Report Data tab. Click on the parameter to move. Up/Down arrows then become highlighted. You can then use those arrows to change the parameter order.

 

New Years Resolution: Leave FACEBOOK!

“If you’re building a product that people love, you can [afford to] make a  lot of mistakes.” – Mark Zuckerberg

Here is why I left Facebook, I do not respect Mark Zuckerberg the founder of Facebook. He doesn’t value your information which he proved in a series of text messages a few years ago. The company has a lack of concern about your private data, allowing third parties such as Zynga access to data the shouldn’t have required. Facebook has since fixed this only to run into further privacy concerns.

People are addicted to Facebook

People are posting where they are on Facebook, great you just potentially told a theif, “Hey I’m not home right now, so take all of my cool electronics”. People are posting what they had for breakfast! Really who cares, you aren’t two years old anymore. Maybe these people should try to put their time to better use, like learning something new, get a job, try to be a better version of you. Think about all the time you spend on Facebook, it adds up! If you are complaining about your place in the world quit Facebook, you will find that you are actually doing things again and moving in a better direction.

Quitting Facebook, what you should know

Facebook hired a consulting company to figure out what would make you want to stay, they give you a pathetic form to fill out. They are trying to play on your emotions to keep you in their clutches. Good news, you fill it out, click submit, and you are free. Free to get on with your life.

Life After

I quit at the start of the New Year after watching a CNBC documentary on Facebook, it was really enlightening. I urge everyone to watch it. Please people, time to get on with living and spend less time on your computer.

WD TV Live Plus HD ~ Review and Tips

Overview

Greetings again, I recently acquired a WD TV Live Plus HD. At first I was rather suprised how tiny the device is. Once plugged in, be prepared for a a lot of patches. Not exactly what I call a good time but with each upgrade you can see a lot of new and improved functionality. If they keep on improving the software, as well they should, it’s only going to get better.

Navigation

Navigating through the system is fairly self explanatory. There are a lot of services available to you in the internet media section. Any network shares you have setup are available to you (with some configuration in the settings).

The remote leaves me wanting more. The buttons are rather small and require a little more pressure applied to them to get them to work. Western Digital does provide the ability for a USB keyboard (even wireless). I have yet to try this but I’m very anxious to use a keyboard with it, I have seen a keyboard used and it is much faster to navigate and search for your shows.

Resolution

1080P (via HDMI), need I say more… The clarity is superb. Of course, one caveat is the video is only as clear as the source. If a YouTube video is low res, the video on the WD is going to be grainy, especially if it’s on a big screen. The WD TV Live Plus includes CVI/RCAs that plug into the back of the device with a minijack connector.

Accessories

As mentioned earlier, the device can accept a keyboard from one of it’s two USB ports. These USB ports can also accept a wireless adapter or a WD portable hard drive.  YOU HAVE TO REVIEW THE LIST ON WD’S WEBSITE FOR A COMPLETE LIST OF WHAT IS ACCEPTED AS IT IS VERY PICKY. The list can be found here.

Note: The portable hard drives take a while to be recognized, but typically install in a minute. You will see a new icon in Settings > File Management if it was successfull

Wireless ~ Tip

If you are like me, your TV is far away from your router. I took a look at the list WD provides and didn’t like the fact that they get extremely particular, down to versions numbers of the hardware, something you can’t get to without blind luck. You could buy something like a Linksys Range Extender, they work well if you do not have a lot networks surrounding your home plus, they don’t yet offer wireless-n.

My solution was to create a wireless bridge using my dual-band Netgear router, (I purchased a second one to get this to work). The great thing about doing that is the dual band functionality. All of my other devices are either wired to my base router or using standard 2.4ghz wireless g. All of my “entertainment” devices at my tv (like an Xbox, Wii,Blue-Ray) are wired into the repeating-secondary-router. On the base and secondary routers, the 5ghz band is reserved for just communicating to one another. 5ghz does not recieve as much interference as 2.4ghz and transfers data much faster (300mbs vs 54 mbs) than a standard wireless g on 2.4ghz.

If you are interested in a more detailed explanation, let me know, I will be happy to post a more detailed explanation with some instructions.

How To Get Lots of TV Shows

Playon.tv offers a lot of great value. Install it on a computer you don’t mind running all the time. Basically it turns your PC into a media server. Your PC, using Playon.tv, will grab shows from tv websites that they are providing. The TV Live Plus can connect to your PC (media server) and browse through content and play them on your TV. Also, you can stream the channels to your phone. All this for a one time fee of $50 for the software.

Hulu Plus offers good value. They offer a free trial but you have to pay every month.

Flingo, currently free, has some great exclusive content. I really enjoy Engadget, and if you are reading this, I am sure you will too.

Drop All Tables in a Database

So I recently had to delete all tables in a database based on schema name. Here is the solution I came up with:

DECLARE @tblName VARCHAR(200) ;

 

DECLARE tbl CURSOR

FOR

SELECT SCHEMA_NAME(schema_id) + ‘.’ + name AS tableName

FROM sys.tables

WHERE schema_id IN (SCHEMA_ID(‘admdb’), SCHEMA_ID(<Your Schema Here>), SCHEMA_ID(<Your Schema Here>)) ;

 

OPEN tbl ;

 

FETCH NEXT FROM tbl INTO @tblName ;

WHILE @@FETCH_STATUS=0

BEGIN

EXEC(‘DROP TABLE ‘ + @tblName) ;

 

FETCH NEXT FROM tbl INTO @tblName ;

END

 

CLOSE tbl ;

DEALLOCATE tbl ;

 

A couple things worth mentioning is that I set the table name to 200 character varchar. Of course this script can do some damage, please, please, please make sure you don’t need anything in any of the tables before running this!

By default, drop table does not accept a variable but if you turn it into a dynamic query (wrapping it in an execute function) works perfectly.