2013 annual report for this blog.
Here’s an excerpt:
A San Francisco cable car holds 60 people. This blog was viewed about 3,400 times in 2013. If it were a cable car, it would take about 57 trips to carry that many people.
Finding server information is vital when monitoring servers and is usually pretty easy to find on SQL Servers, however when monitoring web or app servers this may be a bit of a challenge when SQL querying is not at your disposal. This tip will talk about the SSIS task “WMI Data Reader” and how it can help you monitor your non-SQL Servers.
First, a short introduction to WMI….
WMI (Windows Management Instrumentation) is used for accessing management information in an enterprise environment. The ability to obtain management data from remote computers is what makes WMI useful. It provides a consistent approach to carrying out day-to-day management tasks with programming or scripting languages – MSDN
Some things you can do with WMI may include:
As you can see, WMI is a very powerful tool and can be used locally or remotely.
There are tons of different metrics you can capture using WMI scripts, but for this example I’ll capture disk space information using the Win32_LogicalDisk class and insert it into a database table using a SSIS package.
First, let’s create our database table that will store our disk information:
CREATE TABLE DiskInfo ( Drive varchar(4), DriveSize numeric(18,2), FreeSpace numeric(18,2), [Date] Datetime Not NUll Default GetDate() )
Once our table is created, we can create the SSIS package. Open BIDS or SSDT and create a new Integration Services project.
From the SSIS toolbox, drag the WMI Data Reader Task into the Design view.
Right click in the Connection Manager window and select New Connection and select WMI. Click Add:
This will open the WMI Connection Manager Editor. Give the connection manager a name and description. If you are creating the package for a local computer then use \\localhost to connect. If you are creating the package for a remote server then use \\RemoteServer to connect. For this example, I’m connecting locally using Windows Authentication:
Next we’ll need to right click on the WMI Data Reader Task and choose edit. Click the WMI Options tab. This tab is where we will need to input information such as the WMI connection string and the WMI query. For this example, I have used the following:
You will need to create a new File Connection for Destination. Click the ellipsis (…) for Destination and choose new connection.
Usage type – Create File – Path to file (for this example, I’m using C:\DriveInfo.csv)
Once we have our WMI Data Reader Task configured, right click and select Execute Task:
After executing successfully, you should see the CSV file created with disk space:
Now that we have successfully created the CSV file with data, we need to put this into our database table we created.
In BIDS or SSDT, drag the Data Flow Task into design view, right click and select Edit:
In Data Flow view, we need to drag the following three tasks in from the SSIS toolbox and connect using precedence constraints.
Right click on the Flat File Source and choose Edit. Select New and browse to the CSV file we created earlier:
Click on the Columns tab to ensure you can see the data from the CSV:
Right click on the Data Conversion task and choose edit. Select Free Space and Size and change Data Type to numeric[DT_numberic] and click OK:
Right click on the OLE DB Destination and choose Edit. Select New for the OLE DB connection manager and create a connection string to the database and table you created at the beginning of the tip:
Click Mappings. Map input columns with available destination as shown below and click OK:
Go back to Control Flow and connect the WMI Data Reader task to the Data Flow task using a precedence constraint:
That’s it! Execute the package. Once the package is finished you can query the database table to see the results:
To convert the disk space to GB use the following query:
SELECT Drive, Cast(DriveSize/1024/1024/1024 as Numeric(10,2)) as [DriveSize(GB)], Cast(FreeSpace/1024/1024/1024 as Numeric(10,2)) as [FreeSpace(GB)], [Date] FROM DiskInfo
One of the biggest challenges in a ETL project is faced during data cleansing. NULLs are one of the most unexpected and problematic issues that can make a SSIS package fail. Defensive programming against NULLs is very important, especially when you are dealing with data migration projects where data from OLTP or other source systems cannot always be predicted.
In order to create a test bed for our NULL Defense series, create a new database ( name it something like TestDB ) which we will use for simulating problems and developing solutions.
Create a new table called NULLDefense and populate it with data exactly as shown in the picture below. To keep the focus on the problem, we would keep the structure simple, but inclined towards the problem for which we will create our NULL Defense.
Now follow the steps below to create the SSIS package which will simulate the problem in question.
Since this is only for demonstration, we are not going to waste time inserting these records, so we will just use two Multicasts for the destinations to analyze the number of records going to each destination.
After you have completed these steps, your package should look something like the below picture.
Now if you take a look again at the data we have inserted into our table, we should have two records on the invalid output side and one record on the valid side as there are two records which do not have dates. The reason why we inserted a record with NULL and one record with ” is this is one of the scenarios that you will find in real life projects. Applications insert data into OLTP systems and many times application developers insert data using ” as a placeholder for no date instead of using a constant for NULL from the data access libraries (something like SQLDBNULL) which sends a NULL value to the database instead of a blank value. But from a user or business point of view any date that is not available is NULL, though blank and NULL might carry a different meaning and behavior from a technical standpoint.
Execute the package and you will find two records on the valid side and only one on the invalid side. You would find the same result even if you put a condition using the LEN function to measure the length of the value in the DOB field.
Go back to SSMS and view the data in the NULLDefense table we just created and you will find the reason for this. Whenever a blank value is entered inside a datetime field, when you run a query it will return a default value of “1900-01-01 00:00:00.000” as can be seen in the below picture.
We now move towards the solution for this.
I would not consider any options of making changes at the database level as we might not have the liberty of changing anything for our ETL solution as many other applications might be depending on the existing settings of the database.
Coming to the next alternative, we can place additional checks at the database level to ensure that the value is neither NULL nor the default value, but this kind of solution cannot be considered for a real-time solution as there might be numerous functions and conditions operating on this field and everywhere a dual check or replacement function would be required to fix this issue.
Finally, the option that I recommend is to bring uniformity in perception of NULL to our package and feeding only data that is either NULL or non-NULL to the package. This can be done through a very simple step at the database level itself, without changing any existing database settings, values or logic.
For our test package, just create a new “view” as shown in the picture below where we replace the default value with NULL.
Now change the connection of the source in our package to this view and execute the package. The results should now be as expected, which can be seen in the below figure.
Datetime is one special datatype which can trick you with NULLs and we just developed a defense against NULL date values.
Social networking giant Facebook is making a “huge effort” to weed out fake profiles to prevent misuse of such identities, a senior company official has said.
“Absolutely, there is a huge effort,” Facebook India business manager Pavan Varma told PTI when asked about the company’s action on this front.
If Facebook doubts the ownership of an account, it will ask the user to identify himself/herself, he said.
Full Coverage on Apple’s new iPhone
The doubt about the authenticity of the account will arise if an account has a generic name instead of a proper name, uses images of celebrities/ cartoon characters as display pictures, or does not have “enough friends”, Varma said.
“It could even be that Facebook comes back to you saying, `could you help us identify yourself if you don’t have enough friends, because we don’t want fake identities,” he said.
“We are worried about the experience we deliver….It’s not about protecting our brand identity so much,” he said.
Recently there were reports of fake accounts being created by computer programs, which are used for inflating the number of “likes” on Facebook page for a brand.
Facebook had recently said it would be taking out fake “likes” generated by spammers, malware and black marketers.
Varma said advertisers must also shed the obsession with numbers. “How does an advertiser today treat a Facebook page? It is treated as a place where they just come with a number of people who are there. But that is a wrong way of doing it,” he said, stressing that the conversations around the brand should assume importance rather than the numbers.
Mere “likes” on the page do not help a brand, he said. Companies generally pay Facebook for a dedicated page on its platform that helps them connect with the target audience.
IDBI Bank claims it has over five lakh fans on Facebook, Varma said, who was speaking to PTI on the sidelines of a banking summit.
He added that Facebook, as a medium, is completely secure and cited the case of ICICI Bank, which now offers basic services over the Facebook page by integrating its net banking platform with the social networking site.
If you’re looking for a new job, you might want to consider using Twitter along with more traditional search tools to market yourself, find open positions, get career advice and network, it has been revealed.
You can begin by highlighting your skills in your Twitter bio, career experts advise, the New York Post reported.
According to reCareered.com President Phil Rosenberg, if you’re currently employed and secretly looking for a new job you can create an additional Twitter profile for job-seeking purposes.
Use keywords as you detail your credentials in your bio, so that recruiters and hiring managers can find you, and include a link to an online resume and your e-mail address.
Northwestern University’s Career Services website also suggests creating a “Twesume,” or a condensed resume of just 140 characters that you can tweet or use as your Twitter bio.
You can also use the background of your Twitter page to showcase your skills, if you work in a creative industry.
You can search using hashtags to find openings or advice.
According to career experts and our own research, the most effective hashtags for job search are #jobs, #hiring, #jobhunt, #jobsearch, #jobtips, #jobopening, #career and #resume, which you can also attach to your own tweets to help recruiters and hiring managers find you.
Searching using a combination of #jobs and a hashtag specifying the industry or location you’d like to work in is also useful, according to Diane Crompton, the co-author of “Find a Job Through Social Networking
Google Inc has bought startup VirusTotal, picking up a fledgling but widely used cybersecurity player in a move that could beef up protection for its Internet services.
The acquisition of VirusTotal, which aggregates warnings on submitted files and websites from most antivirus solutions, including Intel Corp’s McAfee andSymantec Corp , could significantly shore up the search giant’s ability to weed out infectious content from Gmail, social network Google+ and even the pages it shows search users.
VirusTotal operates by accepting requests for virus checks, running every available protection software on the questioned document or pages, then distributing the results to security vendors.
Because those results include the documents and websites submitted, the service is considered a valuable source of information by the security industry about new threats and potential targets.
On Friday, the cybersecurity operator stressed that it will continue to run its service independently.
“VirusTotal will continue to operate independently, maintaining our partnerships with other antivirus companies and security experts,” the startup said in a blogpost announcing the acquisition.
“We’ve worked hard to ensure that the services we offer continually improve. But as a small, resource-constrained company, that can sometimes be challenging.”
Google, which boasts one of the largest hoards of cash and short-term securities in the technology industry, embarks on dozens of acquisitions every year, from its $12.5 billion of Motorola Mobility to tinier purchases intended to bring technology or talent into its fold.
It did not say how much it paid for VirusTotal. “Security is incredibly important to our users and we’ve invested many millions of dollars to help keep them safe online,” the Internet firm said in a statement.
“VirusTotal also has a strong track record in Web security, and we’re delighted to be able to provide them with the infrastructure they need to ensure that their service continues to improve.”