Monday, 21 March 2011

Blog Syndication

I got sent an email recently asking  how I went about syndicating my blog on some of the popular SQL Server sites. It is a very straight forward process that involves the sites that I syndicate on making use of my RSS feed. As someone took the time to send me an email to ask the question, I thought that there might be others out there who would appreciate knowing this stuff too so I thought I’d put together a short post.

For those of you that don’t know, my blog (www.gethynellis.com) is syndicated over at www.sqlserevrcentral.com (SSC) and www.sqlserverpedia.com (SSP). Both these site will happily syndicate your blog and give you attribution for your work. For those of you who do blog and would be interested, this is how it works on each of these sites:

  • www.sqlservercentral.com The great thing about SCC is that you can either use their blog platform to host your blog or you can syndicated you content there and maintain a separate blog all of your own. I chose the later mainly for the flexibility and control I get with running my own domain and site. So how did I go about setting it up? I sent the webmaster (Steve Jones Blog|@Way0utwest) over at SSC and email that included a link to my site’s main RSS and Steve pretty much did the rest.
  • www.sqlserverpedia.com I like SSP too, and I subscribe to all the syndicated blogs over there. Again to get syndicated there is very simple process. There is slightly more to their syndication process though. This is because they only want SQL/Databases related posts and there is some (Not Many!) restrictions about things you can write about…The main one that I can remember, is writing around/endorsing third party products. A result of this and because they know you may not always want to write about SQL Server related posts on your blog they ask you set up a dedicated feed (really simple process) for their site’s syndication and every time you publish a post that you want syndicated on SQLServerpedia.com you include that post your SSP syndication tag. Aside from that though it’s very straight forward, you provide a bit of information about yourself, a photograph for the contributors page and the RSS feed for your syndicated tag and you are away. For full instructions check out this link http://www.sqlserverpedia.com/wiki/Syndicate_Your_SQL_Server_Blog
Why would I syndicate my content? What are the Advantages of Syndication?
  1. Exposure – Although some blogging site out there suggest the ‘write it and they will come’ approach, which is true to a certain degree, those same ‘blogging’ blogs suggest you write about something you love and something that is a niche market , well if you have chosen SQL Server as the main topic of your blog then you have a niche market and you probably have a career as a data professional. You also have a large target audience that you can instantly gain exposure too by being syndicated on these sites. For example SSC has over 1.2 million registered users. It’s a very good way to kick start your blog and raise awareness about yourself and your blog.
  2. More Feedback – As these syndicated sites already have a large visitor base you will find that people leave comments on your blog posts a lot quicker than before syndication.
  3. Your work will be scrutinised by more people – I have included this is both advantages and disadvantage. Although in reality, at least for me, it is very much more an advantage I can appreciate why some people may be put off by potential criticism.
  4. Networking - You will meet many  more of your fellow SQL Server bloggers, this means that you will build relationships and improve your profile in the community more quickly and you are more likely to build a network of SQL Server people in a shorter period of time.
  5. League Table SSC has a league table which ranks its top 10 bloggers  over the last 30 days. The league is based on the frequency of you posts and how many comments you receive. I spent a few months over the last year in the top 10 bloggers chart, but yet to make it to number one. To me, this table  serves two purposes, it acts as a measure of who is blogging the most frequently and it is also a good measure of who is raising topics that generates debate. I have seen people on this list who have posted once a day for 30 days but have received as little as two comments, and I have seen people who may have only posted once a week for the last month but have over 60 comments. The frequency of your writing and the interest in what you write is combined together to give your league placing. If you do make this list though you will quickly see you profile grow as you and your name and your blog will be on show on a prime location on a very popular well read site.
  6. Awards – As my regular reader will already know Last year SSP held it inaugural annual blogging awards. I was nominated in two categories and I somehow managed to win the New to “SQLServerpedia” award. You can read more about that here.

All for a minimal effort.

Are there any Disadvantages of Syndication

I struggled really to find  disadvantages but I guess if I was being really picky I would say

  1. One of the sites has their own comment section, so you could end up with comments on the same post in two different places (See, I said it wasn’t much)
  2. Your work will be more scrutinised – I mentioned earlier that this to me is major advantage, I can understand though that people may be put off by the potential extra criticism. But I think it’s important to grow a thick skin, get involved in the debate and if you do write something that is incorrect, allow people to point that out to you and learn from it. In the long run this will have huge benefits to you, and you can learn a great deal from the experience.

Can you think of any other advantages or disadvantages? Do you syndicate in other places? Please feel free to leave a comment and let me know.

Wednesday, 16 March 2011

Becoming a DBA: How to gain experience

Last week I had an interesting telephone call from a someone who I connected with on linkedin.com. On Linkedin I’m what they call an “open networker” which means I won’t click on ‘I don’t know you’ if you send me a connection request. If I don’t want to connect with you then I’ll simply archive your message/request.  I use linkedin.com primarily for work and business. I use it to connect with fellow DBAs and database professionals  and I also connect with recruiters/agents whose business is to fill SQL Server contract roles. At the time of writing I’m well over 500 connections but have a fair way to go before I get to 1000. If you would like to connect please do feel free to send me a request here.
A SQL person sent me a connection request which I accepted  and he then sent me an email and then phoned me up asking if I would help him out. The crux of the phone call was around him getting more experience using SQL Server. He has a Virtual Lab set up with a SQL Server in it, he wanted me to help him recreate real life examples of some of the problems a DBA faces.
Now having thought about this for a second, I decided that although I could help and create some contrived examples it would be much better for this person to solve full on real life examples. I told this person that although I could help with this request his best bet at gaining more exposure to SQL Server and more of the problems that people can experience with different aspects of the product would be to help try and solve some of these problems himself. I directed him at the forums on SQLServerCentral.com and over on MSDN and suggested that he use his environment to try and help people with their problems. Even if he didn’t know how to solve that particular problem himself, reading the posts and suggested solutions and then working through the problem in his own environment would help him learn.
I guess the purpose of this post is this, in helping other people solve their SQL problems, you gain great experience in aspects of SQL Server that you may never come across in your normal day job, which can only help build your knowledge and experience.
Feel free to send me a Linkedin connection request.

Monday, 14 March 2011

Stored Procedure Definitions and Permissions

I wrote a post a while back that showed how you can grant execute permission ‘carte blanche’ for a database role in SQL Server. You can read that post here. This post is going to build on that concept of using database roles for groups of users and allocation permissions to the role. I recently had a situation where a tester wanted permission, for themselves and the rest of the testing team, to look at the definition of all the stored procedures on a specific database, strangely enough for testing purposes. I thought for a while on how best to grant this permission, I did not want to grant the VIEW DEFINITION permission at the server level or even the database level. I just wanted to grant for all the store procedures that existed in the test database at that time. This is the solution I came up with:
Create a database role in the specific database called db_viewspdef
CREATE ROLE [db_viewspdef]
GO



I then added the tester windows group to that role:
USE [AdventureWorks]
GO
EXEC sp_addrolemember N'db_viewspdef', N'DOM\TesterGroup'
GO



My next task was to get a list of all the Stored Procedures in the database, for this I used the following query against sys.objects:
SELECT  *
FROM    sys.objects
WHERE   type = 'P'
ORDER BY name

I then thought about concatenating some code around the result set to allow SQL to generate the code for me, so I used:
SELECT  'GRANT VIEW DEFINITION  ON ' + s.name+'.'+d.name + ' TO [db_viewspdef]'
FROM    sys.objects d
INNER JOIN sys.schemas s ON d.schema_id =s.schema_id
WHERE   type = 'P'
ORDER BY d.name





As you can see I joined sys,objects to sys.schemas to get the schema qualified name for all the stored procedures in the Adventureworks database. I changed the output the query results to text and copied the results from the results pane to a new query window. I fired the query, permission to view the definition of each stored procedure currently in the database was granted.

PermsPic