Monday, February 14, 2011

Friday Backup Job

As mentioned in an earlier post since our systems administrator left our company I am taking care of the backups until the position is replaced. The backup scheduled for last Friday failed as the backup agent was stuck on a server. Since it was the weekend I thought I will rerun the backup after fixing up the cause. I had a look at the log and restarted the server where the backup agent was stuck.


Now I wanted to reschedule the Friday backup as it is with the same features as to going into the same tape (we have multiple tapes in the backup rack). So I was looking for some options as to how to do this when I saw the option "Retry the Job Now".





So I thought I will try this option. What I expected was the backup job to finish earlier as the ob was sstuck on the last server. So I expected it to be finished within an hour. But when I didn't get the alert even after 4 hrs, I started to get worried and logged in to check what was happening. Only then I realised that the backup was running from he beginning. This was the first time I tried this option and worked very well as the job has completed in the way I wanted without much configuration.

As you can see Clean Drive job failed and I will have to resolve this as well. :)

Another learning for me.

Thursday, February 10, 2011

24 Hours of PASS Registration Now Open

As mentioned in my earlier post the SQL PASS 24 hr sessions are scheduled for March 15-16 2011. Registration is now open for these sessions.
Here is an excerpt from the site.

The LiveMeeting webcasts will begin at 12:00 GMT (8am ET) on March 15 and run for 12 straight hours. They start again on March 16 for another 12 hours. This is your chance to join the elite group of hardcore #24HOP veterans who watch all 24 sessions! Learn more and register today!

Wednesday, February 09, 2011

Sharepoint usage reports

Our Systems Administrator left our company last week after being 8 years with us. I have taken over the administration of our intranet which uses Sharepoint 2007 MOSS. I started to explore the site settings of the sharepoint web front end (WFE) from the past 2 days. I was excited when I saw the term site usage statistics under site administration as shown below.




But my excitement died down after seeing the following message. I wondered why our system adminsitrator did not set up the usage statistics. :(





So now I started exploring as to how to enable the usage statistics. So I logged into the sharepoint server and opened the central administration and started exploring application management and operations tabs. Finally under the Operations tab I found the Loggin and Reporting section as shown below.




I clicked the Usage Analysis Processing and looked at the options to set. I was surprised to see just 2 settings to enable site usage reports.





I have set them and will be monitoring the usage from now on. I am pleased with my learning and little discovery today.

Wednesday, February 02, 2011

Sharepoint Administration Expo By SSWUG -- February 11 2011

Here is a link to the Free Sharepoint Administration Expo organised by SSWUG on February 11th 2011 from 9 am to 1 pm PST

Sessions will cover the following topics:

* Configuring SharePoint Anonymous Access: Tips and Tricks
* Understanding SharePoint Blogs, Wikis, and Discussion Boards
* Letting Go - It's so hard to do
* Infrastructure deployment via infrastructure and features

This expo is all about providing the foundation for providing outstanding service with SharePoint by SSWUG.

Hope these sessions are useful for some of you

Tuesday, February 01, 2011

Print formuals from Excel 2007

Yesterday I had a requirement to compare formulas between two sheets. So I wanted to print the formulas and compare. This is a basic feature but I straight away did not know how to do it. So I started investigating the ribbon in Excel 2007.
After about 2-3 minutes Voila I found this.

Under Formulas Tab -- There was Show Formulas button in the Formulas Auditing Group as shown below. This button works as a toggle for showing and hiding the formulas.


Thursday, January 27, 2011

24 Hours of PASS March Sessions Announced

The 24 Hours of Pass sessions for March 2011 have been announced. Here is an extract from the site.

Hear from SQL Server and BI experts such as Jen McCown, Karen Lopez, Michelle Ufford, Wendy Patrick and Cindy Gross, just to name a few! Check out the great sessions in store and be sure to save the dates. Online registration will open soon; visit the 24 Hours of PASS website often for information updates.

Here is a list of the sessions in the BI Track, DBA Track and Dev Track. Can't wait to register!

BI Track
Session 02 (BI) – Start time 13:00 GMT on March 15
Dashboards Design and Practice using SSRS
Presenter: Jen Stirrup

Session 05 (BI) - Start time: 16:00 GMT on March 15
Cool Tricks to Pull From Your SSIS Hat
Presenter: Julie Smith

Session 09 (BI) – Start time 20:00 GMT on March 15
Multidimensional Thinking
Presenter: Stacia Misner

Session 12 (BI) – Start time 23:00 GMT on March 15
Many-to-Many Dimensions – ETL to Cube
Presenters: Lisa Phillip

Session 13 (BI) – Start time: 12:00 GMT on March 16
Reporting Services 201: the Next Level
Presenter: Jes Borland

Session 17 (BI) - Start time 16:00 GMT on March 16
Tips & Tricks for Dynamic Reporting Services Reports
Presenter: Pam Shaw

Session 19 (BI) - Start time 18:00 GMT on March 16
Intelligent ETL with SQL Server
Presenter: Jyoti Gupta

Session 20 (BI) - Start time 19:00 GMT on March 16
Clever Queries: Crafting MDX Queries to get the Most out of SSRS
Presenter: Erika Bakse

Session 22 (BI) - Start time 21:00 GMT on March 16
What You Don’t Know about SSRS 2008R2
Presenter: Kathi Kellenberger

DBA Track Session 01 (DBA) – Start time 12:00 GMT on March 15
SQL Server AlwaysOn: the Next Generation High Availability Solution
Presenter: Lara Rubbelke

Session 04 (DBA) - Start time 15:00 GMT on March 15
SQL Server Performance Tools
Presenter: Cindy Gross

Session 07 (DBA) – Start time 18:00 GMT on March 15
SQL Server Performance
Presenter: Isabel de la Barra

Session 10 (DBA) – Start time 21:00 GMT on March 15
Bad Plan! Sit!
Presenter: Gail Shaw

Session 11 (DBA) – Start time 22:00 GMT on March 15
Indexes and Execution Plans
Presenter: Kim Tessereau

Session 14 (DBA): Start time 13:00 GMT on March 16
Replication, Log Shipping and Mirroring: Oh My!
Presenter: Wendy Pastrick

Session 16 (DBA) – Start time 15:00 GMT on March 16
All about SQL Server Memory Settings for DBAs
Presenter: Vyshnavi Thota

Session 23 (DBA) - Start time 22:00 GMT on March 16
Index Internals for Mere Mortals
Presenter: Michelle Ufford

Session 24 (DBA) - Start time 23:00 GMT on March 16
TwitterData on Azure (end-to-end demo) – How We Did It
Presenter: Lynn Langit

Dev Track
Session 03 (Dev) - Start time 14:00 GMT on March 15
Spatial Data: Cooler Than You’d Think
Presenter: Hope Foley

Session 06 (Dev) – Start time 17:00 GMT on March 15
No More Bad Dates: Using Temporal Data Wisely
Presenter: Kendra Little

Session 08 (Dev) – Start time 19:00 GMT on March 15
T-SQL Code Sins: The Worst Things We Do to Code and Why
Presenter: Jen McCown

Session 15 (Dev) – Start time 14:00 GMT on March16
Entity Framework: Not as Evil as You May Think
Presenter: Julie Lerman

Session 18 (Dev) – Start time 17:00 GMT on March 16
T-SQL Awesomeness: 3 Ways to Write Cool SQL
Presenter: Audrey Hammonds

Session 21 (Dev) – Start time 20:00 GMT on March 16
Five Physical Database Design Blunders and How to Avoid Them
Presenter: Karen Lopez

Tuesday, January 25, 2011

SQL Bits Content

I came across this link on SQL Bits where there are about 164 videos on various aspects of SQL Server and sharepoint which I found useful. Altogether there are 215 articles.

Have a look at the compiled sessions and content page.

Friday, January 14, 2011

SSWUG Free Expo Event: SQL Server Performance Monitoring and Tuning -- Jan 14 9 am to 1 pm PST

Today I received an email about the free virtual expo from SSWUG

Here is an excerpt from the email.

Sessions will cover the following topics:
  • SQL Statement Tuning with Indexing Strategies (Presented by Kevin Kline)
  • Performance Tuning SSIS (Presented by Brian Knight)
  • Using DMVs to Diagnose Performance Issues with High OTLP Workloads (Presented by Glenn Berry)
  • Implementing Resource Governor (Presented by Buck Woody)

With registration, all attendees will also receive a complimentary month of full membership to SSWUG.org, where they can learn even more about SQL Server and other databases and database technologies through in-depth articles, podcasts, how-to videos and more. All the content will also be able for seven calendar days after Jan. 14, allowing attendees to revisit key portions of information at a convenience.

Please register now to save your place for this information-packed expo!

So register and enjoy!

Thursday, January 13, 2011

Shortcut to enable Fullscreen in SSMS

Today I was experimenting with the query results in Sql server management studio and saw this shortcut in he View menu of the SSMS.



So in order to show full screen I tried the shortcut -- Shift + Alt + Enter. The same shortcut works to come out of the full screen mode as well. What the full screen does is closes all the other windows and like object explorer, registered servers etc that you have open and maximises the query and results windows.

Likewise if you want to go to the properties just press F4.
To get the Solution Explorer window the shortcut is Ctrl + Alt + L
To get the Toolbox window -- the shortcut is Ctrl + Alt + X

Hope these shortcuts are useful for you.

Sunday, January 09, 2011

Have you heard about BizIntelligence TV ?

Yesterday I came across this blog on MSDN by Bruno Aziza.

Bruno says that Biz Intelligence TV is a new and innovative way to let industry leaders express and gain access to thought-leadership on Business Intelligence. The goal of the BizIntelligence.TV program is to start an ongoing conversation by providing compelling content from peers and industry stars.

Here is the Biz Intelligence TV channel on Youtube

Friday, January 07, 2011

SSIS 2008: Tips and Tricks video by Steve Swartz

Today I listened to this very good informative video by Steve Swartz which I wanted to share with you all.

This is a presentation by Steve Swartz in the Microsoft TechEd Europe 2010. In this presentation Steve says that he desires to teach you how to fish rather than give the fish itself.

Thanks to Steve for posting this.

Saturday, January 01, 2011

Happy New Year 2011 to Everyone

My first post this year is to wish all the readers here a HAPPY NEW YEAR!

As the new year blossoms, may the journey of your life be fragrant with new opportunities, your days be bright with new hopes and your heart be happy with love!
My main new year resolution is to start the certification process to achieve Microsoft Certified Technology Specialist (MCTS) Microsoft SQL SERVER 2008, Business Intelligence Development and Maintenance.

I have no doubt I will be using all the resources available here on BIDN in addition to getting some formal training in order to achieve that.

I look forward to all the suggestions in order to achieve this from all of the certified professionals in this area.

Friday, December 17, 2010

SSIS + CDC = SCD -- A PASS webinar on 20th December by Patrick LeBlanc

I got interested in the title of this webinar and hence thought that all of you might be interested in this webinar event as well. Below are the details


Date / Time

Date:
12/20/2010

Start Time:
12:00:00 PM

End Time:
1:00:00 PM

Timezone:
(GMT-05:00) Eastern Time (US & Canada)

Short Description

Building dimensions using the Slowly changing dimension wizard in SSIS is simple and quick. However its performance and flexibility is questionable. Even further, when trying to perform incremental loads of your Dimensions using the aforementioned approach or a custom approach prior to Change Data Captured (CDC) offered certain challenges. In this session Patrick will show you how to utilize CDC and SSIS to incrementally load Type I and Type II dimensions ;using features that are all native to SQL Server 2008.

Event Description

Speaker: Patrick LeBlanc
Patrick LeBlanc, SQL Server MVP and Author, is currently a Business Intelligence Architect for Pragmatic Works. He has worked as a SQL Server DBA for the past 9 years. His experience includes working in the Educational, Advertising, Mortgage, Medical and Financial Industries. He is also the founder of TSQLScripts.com, SQLLunch.com and the President of the Baton Rouge Area SQL Server User Group. Patrick is a regular speaker at various SQL Server community events and a PASS Regional Mentor.

Mon Dec 20th 12pm EST SSIS + CDC = SCD

URLhttps://www.livemeeting.com/cc/usergroups/join?id=53BGCZ&role=attend&pw=3%3C%2C9%27CDcs

Thursday, December 16, 2010

SQL Azure free trial

Here is a link to the special free trial offer for SQL Azure

For a limited time, new customers can sign up for SQL Azure and get a 1GB Web Edition Database for no charge…and no commitment. We ask for your credit card information when you accept this offer, as any additional usage per month will be billed at the standard rate. This is a great way to try SQL Azure – and the Windows Azure platform – without the risk.

Friday, December 10, 2010

Denali Resource Centre

This morning I found the following link on the MSDN blogs that is quite useful. There are plenty of articles and links to community blog posts, as well as 12 videos about the new functionality in SSIS.

Head over to the SQL Server Denali Resource Center.

Enjoy Denali using this resource centre

Tuesday, November 30, 2010

Enable Macros in Access 2007


  • We have a couple of access programs that we use for data conversions. These programs convert the csv files that are generated from our CRM to a fixed file format that is then uploaded to interface with other government institutions.
    With the introduction of OFfice 2007 there is this extra step that the users were required to do to enable macros manually every time they use these programs.
    I thought this manual should not be there for the users so I set out to look at all the options available to automate this step.
    HEre are the results.

  • Open the access file -- click on the office button at the top and click on Access Options
  • From the menu that appears choose the Trust Centre and click on the Trust Centre Settings.
  • From the menu that appears choose Macro settings and Enable (the fourth option) and click ok.
  • Next time when you open the porgram the annoying notification where there is a tendency to forget to enable will disappear.

Friday, November 26, 2010

39 videos on Microsoft BI Tools

I stumbled across this site today that contains very useful videos on Microsoft BI tools.

There are 39 videos of which I have listed the top five from thier site here.
  • The first video is a twelve minute introduction entitled "What is Business Intelligence?" This video covers what is meant by terms such as data warehousing and business intelligence and why companies undertake such projects.
  • The second video is a 34 minute overview of how a single data warehouse can be used to deliver business value to a wide variety of users through scorecards, dashboards, reports, analytic applications, and custom applications.
  • The third video discusses the process of data warehousing, from the initial problem definition through the creation of the cubes and delivery of the data. This video runs 19.5 minutes.
  • The fourth video is "Why Business Intelligence Projects Fail (and what you can do about it)." This covers some of the primary reasons that BI projects fail along with tips for addressing the problems. This video is 32.5 minutes in length.
  • The fifth video is "Introduction to Business Intelligence Development Studio" and covers the primary tool used to create data warehouses. This is the environment for creating SSIS packages, SSAS cubes, and SSRS reports. This video runs 15.5 minutes.

    So go ahead and register and enjoy the videos

Thursday, November 25, 2010

Show/Hide Office Ribbons

Yesterday I was in a presentation and because we wanted to see most of the screen, there was a requirement to hide the top ribbon see the image below.




I suggested to double click on the menu item to hide the ribbon. That is, double click either on Home, Insert, Pge Layout etc.

Someone in the room suggested a keyboard shortcut Ctrl+F1. That worked too.
Also keep in mind that this works across all Office 2007 and 2010 applications including Excel, Powerpoint, Access, Outlook etc.

I thought of sharing this here so that in case you have a similar requirement you could use it.

Tuesday, November 23, 2010

Project Crescent BI Tool for Denali

I found the following interesting announcement on the SilverLight Team Blog about Project Crescent.

Here is an extract from the announcement.

Project Crescent allows business users to manage data and show information in a truly innovative and exciting way, allowing people to visualize, interact and report on data using highly interactive visualizations, animations and smart querying.

One of Crescent’s most exciting features is its integration with PowerPoint. Through a feature called Storyboarding, users can embed reports in PowerPoint and manipulate the live data during a presentation.

Wednesday, November 17, 2010

New Path to Microsoft Certified Master (SQL Server 2008)

I came across an interesting blog link yesterday by Joseph Sack which outlines the new path to get certified for Microsoft Certified Master.

The current MCM program requires you to take three written exams and a six hour lab exam which would cost around 15,000 USD.

The new MCM program requires you to take a knowledge exam and a lab exam which would cost $2500.

In his blog, Joseph says -- "It’s our goal to reach the SQL Server experts worldwide who may be qualified to achieve MCM certification, but who’ve run up against the previous barriers of time, cost and location. By reducing or removing these barriers, while keeping the integrity and value of the certification, we expect to grow the community of SQL Server MCMs and increase its visibility and awareness of its value."

I hope this helps all the people who are trying to get certified as MCM.

Tuesday, November 16, 2010

PASS Summit 2010 Day 2 Keynote recording

If you have missed the PASS Summit ay Two Keynote by Quentin Clark you can view the recodring below.

PASS Summit DAy TWo KeyNote Recording

Speaker: Quentin Clark, General Manager of Database Systems Group at MicrosoftWith opening remarks from Bill Graziano, VP Finance at PASSQuentin Clark will showcase the next version of SQL Server and will share how features in this upcoming product milestone continue to deliver on Microsoft’s Information Platform vision. Clark will also demonstrate how developers can leverage new industry-leading tools with powerful features for data developers and a unified database development experience.

Monday, November 15, 2010

PASS Summit -- Women In Technology luncheon recording

If you have missed the WIT Luncheon live streaming event, you can now click on the below link to view the recording.
PASS Summit Day WIT Luncheon


The panelists for the WIT luncheon were as below:

  • Billie Jo Murray, General Manager, SQL Central Services, Microsoft
  • Nora Denzel, Senior Vice President and General Manager - Employee Management Solutions, Intuit
  • Michelle Ufford, Senior SQL Server DBA, GoDaddy.com
  • Denise McInerney, Staff Database Administrator, Intuit
  • Stacia Misner, Principal, Data Inspirations

Friday, November 12, 2010

PASS Summit Day One Keynote recording

If you have missed the Day One Keynote live streaming event, you can now click on the below link to view the recording.
PASS Summit Day One keynote recording

You can also get a copy of just released PASS 2010 Database Security report: "Data in the Dark: Organizational Disconnect Hampers Information Security"

Thanks to the PASS organsiers for providing these to all of us who are not able to attend the SQL PASS Summit.

Thursday, November 11, 2010

List of users and their permissions

Yesterday I wanted to know which users have what permissions to a database. So I started querying the two tables related to it.
select * from sys.database_permissionsselect * from sys.database_principals
I came up with the following script to suit my needs.

select USER_NAME(perm.grantee_principal_id) AS user_name, princ.principal_id, princ.type_desc AS principal_type_desc,
perm.class_desc,
OBJECT_NAME(perm.major_id) AS object_name,
perm.permission_name, perm.state_desc AS permission_state_desc
from sys.database_permissions perm
inner JOIN sys.database_principals princ
on perm.grantee_principal_id = princ.principal_id

There may be numerous other ways to do this.

Wednesday, November 10, 2010

Grant and Revoke Privileges

Today I have accidentally given access to a user using the grant option by issuing the Grant sql command.

GRANT VIEW ANY DATABASE TO username;

GO

I have immediately realised that I didn't want to give access to that user and hence I had to revoke the permissions.

REVOKE VIEW ANY DATABASE From username;

Thought I would document this here so that any one doing the same would benefit from this.

Also there is a With Grant option that you can use while using Grant option.

The main difference between Grant and With Grant option is that --
If only GRANT is used, the user cannot grant the same permission to other users.

Tuesday, November 09, 2010

IT Systems Viability

We have been using a CRM application heavily customised to fulfil our needs as a Training Management System for the last 10 years. Now the applications vendor has changed the technology behind this application to be in line with the latest technology and released a brand new application.

This means that we have to rethink the capability of our heavily customised system in future as it is not a case of simply upgrading to the new application. It is basically a rebuild of all the functionality we have developed over the last 10 years.

This situation has made me think of the question – How long should IT systems be viable? Of course there is no right or wrong answers to this question as it depends entirely on the business requirements and the functionality available at the time in the IT systems being used.

The bottom line is our expectations keep on changing as per the business and most systems cannot keep pace with these changes. Hence there is a need to choose new systems.
The life span of Systems has a big impact on the business costs. You can reduce the cost of replacement if the systems are utilised longer. We are thinking of utilising our CRM application for a bit longer as the functionality released by the new version of the application is no where near the functionality that our current system provides. WE just have to make sure that we do not roll out new versions of other applications like office and operating systems without proper testing for compatibility.

What are your views of IT systems viability?

Friday, November 05, 2010

The hardly used stuff function

My share of todays learning at sql share is the unusual stuff function. I have not heard of this function before and here are my learnings from the video by Andy Warren.
  • Stuff function inserts a string into a string at a specified position. It feels a bit like REPLACE (and you can certainly use it that way), but it's really designed to do something different - push x characters into a string based on an index and length.
  • Andy was surprised to realize it was the only string function he had never used to solve a problem.
  • If you try to use the stuff function to insert a null at a certain position of the string to replace a few characters, it does not error but it just returns the remaining characters after removing the number of characters you have specified.
  • If you try to use the stuff function that has null in its string, no matter what you try to replace it with it returns null

To learn more watch the video by Andy Warren.

Thursday, November 04, 2010

PASS Summit 2010 Live Streaming Events

Following is a post from the PASS website. This also provides a link the free live streaming events.

Tune in for our Live Keynote Addresses from Top Microsoft SQL Server Executives
Top Microsoft SQL Server executives, Ted Kummert, Quentin Clark and David DeWitt, will take center stage in Seattle, Washington at PASS Summit 2010 to share the latest and greatest SQL Server news on Nov 9, 10 and 11 from 8:00am to 10:00am Pacific each day.And join us on Wednesday, November 10 from 12 noon-1:30pm Pacific for the live streaming of the 8th Annual Women in Technology Panel Discussion on Recruiting, Retaining and Advancing Women in Technology: Why Does it Matter?

Register below for the live streaming keynotes and we'll send you the link to the live streaming event.

PASS Summit is the education and networking event of the year for thousands of SQL Server professionals.

If you have not already registered I strongly recommend you to register by clicking here

Wednesday, November 03, 2010

Quotename Function in SQL

I have learned something very basic today from the sql share video today. It is about the Quotename TSQL function. This function I think is hardly used and hence some of the developers may not be aware of this. Hence I thought I will put my learning about this function here.
  • Quotename function returns the string along with the delimiters added in the function.
  • This function can be used if you are using the delimiters repeatedly.
  • If you are using delimiters on an ad-hoc basis you can just use something like select "-" +@variable +"-"
  • One requirement for using this funciton is that the string cannot be more than 128 characters long as depicted in Andy's video


Thanks to Andy Warren who explains the various ways of using the quotename function in this video.

Tuesday, November 02, 2010

Copy Paste problem in excel 2007

Today one of my colleagues was working in excel. He had a dataset that in one sheet which was filtered. He wanted to copy those records that were filtered into a new worksheet. But when he copied and pasted the cells into another sheet the cells that were pasted contained all the rows. What he wanted to copy was only the filtered rows. This becomes a problem sometimes in Excel 2007

To overcome his paste problem I have suggested the following steps

Go to the Editing group in the Home tab
Click on the "Find and Select" button
Click on the "Go to Special" from the list
And click on "Visible cells only " radio button and click ok

Now you can copy and paste only filtered rows in excel.

Another quick turn around is open the workbook in another computer where the filtered cells copy paste works and do the first copy and paste and close the worksheet.
Now if you open the spreadsheet on the first computer the filtered cells copy and paste works !

Friday, October 22, 2010

Improvements on the Learning feature of sql share

Andy Warren of SQL Share is bent upon motivating learning to all the sql share subscribers. Here are some of the new features he has included in his recent emails.

  • The first feature he launched was to show the learning goal in minutes per month. Now we can set an annual goal and monitor our learning.
  • The other new feature is you can log in your own learning which is outside of sql share so that all learning can be monitored which is a really cool feature which helps the learner focussed on all the learning he is undertaking.
  • All these can be monitored from the Profile page.

    Thanks to Andy for providing these tools which helps all of us in our learning.

    If you have not yet subscribed for the sql share videos please do so by clicking here

Tuesday, October 19, 2010

Using Registered Servers in Managment Studio By Andy Warren

Today's featured video on SQLshare / Jumpstart TV is Using Registered Servers in Managment Studio By Andy Warren . Until I saw this video I didnot know about the Registered servers view in sql server 2005 even though I have been using the Management studio for the past 3 years.

Here are my learnings of today.

  • Ctrl+Alt+G is the shortcut for getting in to the registered servers pane. Alternatively click on the -- View menu -- Registered servers
  • From the registered servers pane you create a server group by right clicking on the database engine and creating a new server group.
  • Once a group is created you can also create a registered server instance by right clicking on the server group and creating a new server registration
  • You can rename the server from the Register server name
  • By double clicking on the registered server instance you will be taken to the object explorer which I am familiar with.
  • Most important thing is the settings that you have on your local machine are not reflected on the server and also it is not going to change anything about the server, it is not going to change how we connect to it or how our users see it.
  • Setting custom colour is a very useful new feature (available only in sql server 2008) discussed by Andy in this video. This can be used to differentiate the test servers with the production servers.
  • You can export registered server inforamtion to a file by right clicking on the server instance and choosing export. This feature is very useful when you are moving machines.
    The option "Do not include user names and passwords in the export file" is also very useful if you are giving the export file to a new DBA or another user.

    Thanks to Andy Warren for helping me learn all this within 4 min. 50 secs. If you are interested in viewing this video please click here

Monday, October 18, 2010

When my joystick started giving in...........

The other day I had about 20 excel workbooks to work with in a single day to complete some outstanding work in a tight timeframe. In each one of the excel workbook I was working on, there were about 20-25 worksheets. I use a joystick instead of normal mouse, and we didn't have any spare joysticks. My joystick thought that I have had enough of this and started giving in to my moves. I didn't want to increase my RSI by uisng a normal mouse. Instead I thought I will use some excel key board short cuts to work in these excel files.

Here are the shortcuts that I thought will come handy to everyone.

  • CTRL + PgUp -- To switch to the right hand side of the sheets
  • CTRL + PgDn -- To switch to the left hand side of the sheets
  • F4 -- To repeat last action in Excel (This works only in Excel, I wish it worked in word as well!)
  • CTRL + --> -- To move to the last populated cell on the right hand side
  • CTRL + <-- -- To move to the last populated cell on the left hand side
  • CTRL + down arrow -- To move to the last populated cell in the downward direction
  • CTRL + --> -- To move to the last populated cell in the upward direction.
  • If you hold down the SHIFT key as well for the above four commands the cells are selected.
  • CTRL + Spacebar -- To select an entire column in a worksheet
  • SHIFT+ Spacebar -- To select an entire row in a worksheet

All the above shortcuts helped me in doing my job quickly that day in spite of having a problem with my joystick.

Thursday, October 14, 2010

String Handling Functions - Part 1 By Andy Warren

In this video, within 6 min. 29 secs Andy not only shows the usage of Lower, upper, left, right, ltrim and ltrim functions but also displays a few what if scenarios which we may otherwise not think about if we just go by the book.

Here are my learnings:
  • upper and lower functions does not return an error when used with null data.
  • The second argument for left and right functions should be a positive value and cannot be a negative value.
  • If a negative value is used the select statement errors out.
  • If a zero is used as the second argument it does not return an error but it just returns a blank row.
  • There is no trim functions. If you need a trim function in sql then combine the ltrim and rtrim functions to get the desired result. Eg: rtrim(ltrim(@test))

Monday, October 11, 2010

Another interesting feature in SQL Share / Jump Start TV

I noticed another interesting and innovative feature in the SQL share email today. The email features "Your Scorecard". A view of it below.










This scorecard tells me that I have done 35 minutes of learning and my goal should be 120 minutes per month.
I think this is a great feature to motivate you and monitor yourself of how much you are learning. If you can set yourself a goal of 120 minutes of learning per month that should be really good for your career development.

So if you are not yet subscribed please do so from the sql share login link

Delivering KPIs with Analysis Services -- 24HOP recording by Peter Myers

Today I had the chance to view the 24HOP session recording "Delivering KPIs with Analysis Services by Peter Myers"

Here are my learnings.

What are KPIs?
  • KPI -- Key Performance Indicators are quantifiable measures comparing business performance to goals
  • KPIs are aligned with corporate strategy and objectives.
  • KPIs are designed to drive desired behavours
  • KPIs presents a measure of overall organisational health when combined into a collection for a business scorecard


KPI data requirements


  • A KPI should have at least an actual and a target value
  • Ideally corporate data systems will deliver both values
  • Actuals are typically retrieved from operational databases
  • Targets can be retrieved from planing systems
  • Sometimes the target values can be stored in supplementary data stores or can have fixed traget values.


The Demos included covered the following aspects.

Preparing the cube to store target values
Seeding arget values based on historical actual values using simple factor, data mining (time series)
Contributing target values using Excel 2010

Friday, October 08, 2010

Using Checkpoints in SSIS By Brian Knight

Here is the link of today SQL Share / Jumpstart TV video. Prior to viewing this video I had no knowledge of what checkpoints are.... here are my learnings out of this video.
What are checkpoints?

Checkpoints are setup to ensure that you can run the package from the failure point. These checkpoints are particularly useful when packages take a very long time to run.

When the package fails -- the problem can be fixed and the package is restarted. When checkpoints are used when the package is restarted the package restarts from the point where the package has failed. This will save alot of time for the DBAs and Developers.

Here is the process for creating simple check points by Brian

Step 1 Configuring the packageIn the package properties pane give a name to the property -- checkpointfilename The next property to be set is the CheckPointUsage -- Choose the If Exists option.The next property to be set is the SaveCheckPoints -- set it True
Step 2 Task propertiesChoose the task in the control flow and under the Execution group of the task properties falipackageonfailure -- TrueSet this property to True for all the tasks in the package.
This is the process of creating the checkpoints in the control flow layer in SSIS packages.

Thursday, October 07, 2010

Converting Crystal reports to SSRS

We have a number of crystal reports that we use and in the near future we need to convert them into SSRS reports. I have done some research on the internet and here are my findings.

The first one is a manual migration process suggested by Microsoft -- Link here I cannot imagine converting almost a 1000 reports to SSRS reports. I cannot imagine myself taking up this process.

The second one which came up in my search was the rpt to rdl website run by Jeff-Net. They have two types of conversion service as they call it. Jump Start conversion service and Full Conversion service. They say that it is a service and they donot have a product.

The third one was a product called Crystal Converter by KTL Solutions You can download a Demo version of this product and try out for yourself.

The fourth one is an online service called Crystal Migrator where you can give your email address and upload a single crystal report at a time. The converted report will be emailed to you.

This is just a list of what I have found worthy of note. I still haven't tried any of these yet. Will post my feedback once I try them.

If I have missed out anything please let me know so that I can update my list.

Tuesday, October 05, 2010

Notepad Basics

The other day my colleague showed me the menu item "View -- Status Bar" in the notepad. I always used to see a grayed out option of the status bar in the past. But this time I could choose the option to actually show the status bar in the notepad. This status bar shows you the curent postion of the cursor in terms of line and character position.

I was puzzled at this and did some research and found that if you enable the wordwrap feature the status bar option is grayed out. If you disbale the wordwrap feature then the status bar option is enabled.

I thought this would be useful particularly when a code page needs to be (is) opened in notepad.

Monday, October 04, 2010

Introduction to the CASE Expression By Andy Warren

I have used case statements before several times but there were some new learnings from the SQL Share video of Andy Warren

Here are my learnings of the case statement summarised:

People often get confused whether to use if else statements or case statements in T-SQL. According to Andy, only case statements can be used in T-SQL statements. If else statements cannot be used in select statements because if else statements can be used in control flow.
Following are some of the situations and syntax that can be used with case statements. The most important is included in the last syntax (Syntax 5)

Syntax 1:
case columnname when 'exisitng value1' then 'new value1'when 'exisitng value2' then 'new value2'end as aliascolumnname
The drawback with the above syntax is when the conditions of the when statement is not matched the result returned is null in the column.

Syntax 2:
case columnname when 'exisitng value1' then 'new value1'when 'exisitng value2' then 'new value2'else columnameend as aliascolumnname
When the else condition is used the drawback in Syntax1 is fixed.

Syntax 3:
If you want to use case statement for multiple columns the syntax is as follows;
case when column1='exisitng value' then 'new value'when column2='exisitng value' then 'new value'else column1end as aliascolumnname
Notice that there is no column name after the case in the above statement.

Syntax 4:
Nested case statementswhen formatted looks better and you can understand better
case when columnname1 = 'exisitng value' then case when clumnname2 = 'exisitng value1' then 'new value' else columnname1 end else columnname1end as aliascolumnname
The above can also be written in one case statement doing two tests.

Syntax 5 Last but not the least (Very important learning of the day):
You can use case in the order by clause
select columnname from table name order by case when columnname = 'value1' then 0 else 1 end, columnname.

Saturday, October 02, 2010

Home » Blogs » indupriya » 24HOP PASS recordings are now available24HOP PASS recordings are now available

The much awaited 24 hours of PASS session recordings are now available on the PASS website.

This requires a PASS member login. If you have not done so already, a PASS member login with username and password (free and simple to set up) is required to access the 24 Hours of PASS session recordings.

Friday, October 01, 2010

Aggregrate Queries in SQL Server T-SQL for Beginners By Kathi Kellenberger

My learnings from the sql share video

  • I knew that we cannot use where clause with aggregate functions but I didn't know the reason. The reason is the where clause is executed before the aggregate functions are applied and hence cannot use the where clause with.
  • Count(*) and count(columnname) may yield different results. This is because Count(*) does not ignore null values and count(columnname) ignores or does not count null values.
    When you do aggregation using the AVG function using the isnull function is recommended. Use of isnull function to substitute the null value of the column will give you the correct answer. eg: AVg(IsNull(columnname,0)
  • Always remember to supply an alias for each aggregated function
  • You can use other expression in the aggregate functions instead of just the column names. eg: sum(1) as "sum of ones"
  • When you use a group by clause, make sure select items are exactly same as group by clause, otherwise you might get incorrect results.

Wednesday, September 29, 2010

SQL Share a very useful video resource -- some positive changes that are helpful

For those of you who don't know about SQL Share here is a snippet from thei About Us page.

SQLShare is a division of Fourdeuce Inc, an Orlando, FL based company that also owns End to End Training, a well known provider of technical training. Fourdeuce is owned by Andy Warren, Brian Knight, and Steve Jones.

I have been getting daily emails from SQL Share since my subscription in April 2010. I used to watch some of the videos. These are small videos that cover various aspects of SQL SERVER by various authors. This is a very good resource for beginners and sometimes helps professionals as well. Everybody will learn something from here. There is no doubt about it.

But getting the email today made a difference compelling me to watch it as soon as I saw the email.

The reason for it is below. Have a look at the image below.



I just couldn't click on "Watch it Later" because I wanted to see because it is written in bold writing clearly that it is going to take only 3 min.

If you don't click on the link after seeing the "Learn Something today in 3 min. 46 secs" which is a minute fraction of 24 hrs in a day then I must say that you are not commited to learning. I looked at the topic and thought "Let me see what I will learn in this which I do day in and day out" But I did learn two points which I have posted in my previous blog.

Andy in his email said that he is experimenting this week. I think this little change will influence a lot of peopl in their learning goals and also credit the author of each featured video who take lot of pains recording it to be useful for the community.

Thanks to Andy who is doing a good job of sending these innovative emails.

Another very important change that was done is when you finished watching the video automatically two multiple choice questions come up to test whether you were really concentrating on the video which I found really useful.

Added to this there is a link "challenge your friend" which I quite like that we can send to colleagues for them to answer if they can.

Tuesday, September 28, 2010

Using Login Auditing in SQL SERVER by Brian Kelly

Today featured video in SQL Share was Brian Kelly's "Using Login Auditing in SQL SERVER". I watched this 3 min. video and learnt the following.

I know that we can view sql server error logs. I monitor them on a daily basis but I didnt know that the login audit requires a setup that is a bit similar to the normal windows event log set up. This can be set up when you right click on the sql server connection in the management studio and choose properties and then choose Security. There is n option to choose Failed logins only, Successful logins only and both failed and successful logins and of course the none option aswell.

These login auditing will not only appear in the sql server error logs but in the windows event logs as well.

The best part that we are getting as part of watching the sql share videos is testing the knowledge we have acquired immediately after the video finishes which I think is very innovative.



If you would like to watch the same video click on the link

Saturday, September 18, 2010

What is Sargability?

I planned to attend Rob Farley's 24HOP session but could not make it. I didn't know what Sargability meant at the time and thought I will google it.

And here is what I have found out thanks to the internet.

Here is a blog post which gives the history of how the word came into existence back in 2005 where Brad McGhee explains that the sargability is a real word but it is used a lot in the SQL Server world.

So what exactly does Sargable mean?
SARG is a contraction for Search ARGument ABLE as mentioned in Rob Farley's article.

I am looking forward for the recording of this 24HOP session. Meanwhile you can have a look at the posting by Rob Farley in his blog where he gives links to the resources he has mentioned in his presentation.

Friday, September 17, 2010

My takeaways from Adam Jorgensen's 24HOP session -- Zero to cube

Here are my takeaways from today's fantastic session of Adam


  • The first basic point was you can use "." instead of "localhost" to choose the localhost server.
  • Defining the attribute relationship was very clearly explained that the relatiosnhps should be from the lowest level to the highest level.
  • Proactive caching -- available in from SQL SERver 2008 but the refresh property is available in Excel 2007 but sometimes may not work properly.

The following two resources which are quite useful was also discussed.


The Data Warehouse Toolkit: The Complete Guide to Dimensional Modeling

Microsoft SQL Server Product Samples: Database

Friday, September 10, 2010

Free SQL Tools as blogged by

Today I stumbled across this very useful post by Mladen Prajdić

Click here to read more

As he says in the end ...

Even if none of this stuff helps you at the moment it's good to know they exist.

Because DBA-ing is like a box of chocolates, you never know what you're going to get :)

Thursday, September 02, 2010

What are plan guides?

Just a while ago I was watching a video on sqlshare Creating a Plan Guide for a Parameterized Statement By Andy Warren . Only then I heard about plan guides. I didn't know what plan guides were. Here is my find from googling


In SQL Server 2005, there is a new feature called Plan Guides that can help out in some cases where you discover poorly performing queries that you don't have direct control over. Essentially, a Plan Guide allows you to add or modify query hints to queries on the fly, just before they are executed. Click here for a detailed article on plan guides by Brad McGehee.

Monday, August 16, 2010

Count number of months between two dates in excel

The formula I used for this is

datediff(cell1,cell2,"m").

This will give you the number of months.

Monday, August 02, 2010

Automatically forward email messages to another user

Today I had a requirement to automatcially forward email messages to another user, since this user has left the organisation.

On my research, I have come up with this article which gives a detailed step by step instructiions

Click here to go to that article

Friday, July 30, 2010

MMC cannot open -- in Citrix

Today I had a problem with our citrix server, where in the Management Console was not opening as usual when I try to open any of the below processes. Citrix Access Management console, Event Viewer, Manage Server, Administrative tools etc.


but I could access the event viewer from another machine. Here is what the event viewer error message says.



Here are the steps I have been advised to follow by Aaron Mountford (gen-i consultant) to resolve this.

I have registered the two dlls as follows.


Click Start, click Run, type regsvr32 Msxml3.dll, and then click OK
Click Start, click Run, type regsvr32 %systemroot%\system32\inetsrv\wamreg.dll, and then click OK.

Thursday, July 29, 2010

Convert a date to show AM/PM in SQL

Today I was working on a date column -- create_date. I wanted to show whether the row was created in the morning or in the evening i.e., AM/PM

This is what I did to achieve this.


SELECT rn_create_date, SUBSTRING(CONVERT(varchar(20), Rn_create_date, 22), 18, 3) AS Expr1
FROM tablename;



Here is the link to the BIDN blog where I have posted
If we are used to the Query Analyser of SQL Server 2000, we might find it frustrating that the query window does not automatically come up when you start SSMS.

You have to either press Ctrl+N or Click on New Query to start it up.

Here is a way to start up the New Query window automatically.

Click on Tools-- Options click on the + to exapnd environment and click on General.

The following screen comes up.




Click on the drop down beside start up and choose ' Open Object Exlpoer and New query'.

Click Ok. Next time when you open SSMS the query window will automatically be opened for you.

Here is link to the blog I posted in my BIDN blog.

Friday, July 23, 2010

Hiding your folders using command prompt

To hide your folders using the command prompt, click start -- run -- Type cmd and press enter

The commoan screen appear.

Do the following:


  • To hide, d:/>attrib +h +s +r

  • To revert d:/>attrib -h -s -r

The folder ill be still hidden even if you set 'show all hidden files' under folder view options


Make sure you keep a note of your fodler name otherwise you cannot unhide it.

Thursday, July 22, 2010

Star Schema vs. Snowflake Schema

Star Schema

• Start schema is simpler and hence good to use for small data warehouses. The rules that apply here are as follows:
• Each dimension is represented by a single dimension table
• Each dimensional table is related to or linked to a fact table.
• The relation is merely a master and detail relationship with Primary key being the dimension and reference key in the fact table.
• When there are 5 or more dimensions referring to one fact table it appears like a star and hence the name star schema
• In terms of ease of use you need less complex queries and easy to understand
• This design has redundant data and hence hard to maintain and change.
• Lesser query execution time due to lesser number of queries


Snowflake Schema
• Snowflake schema starts like a star schema and more complex and hence it is good to use the snow flake schema for large data warehouses. The rules that apply here are as follows:
• Each dimension is represented by a two or more dimension tables
• Each dimensional table is not directly related to fact table
• Here the tables that describe the dimensions are normalised.
• In terms of ease of use you have to use more complex queries
• There is no redundancy and easy to maintain and change
• More query execution time because of more foreign keys

Friday, July 16, 2010

Make movies online

Today I came across this site where you can make movies on the web. Here is the link.

You can start creating movies just by typing your text.

Friday, June 25, 2010

Building a cube without a data source

Sometimes we might have to build a cube without a relational data source. In this scenario, we can build a cube without a datasource focusing on designing the dimensions and measures and then BIDS can generate the relational schema that is needed to populate the cube.

The following are the steps to achieve this.

•Start a new analysis Services Project in BIDS.
•In the Select method to build the cube diablog box -- choose "Build the cube without using a data source".
•In the Define New Measrue dialog box -- define the measures and measure groups.
•In the Define New Dimensions dialog box -- define the dimensions and set the basic properties
•In the Define Time Periods dialog box -- Define the first calendar day, last calendar day, first day of the week and the time periods whether it is year, quarter, month, date etc.
•Specify additional calendars if needed
•In the Define Dimension Usage dialog box -- Specify how the dimensions relate to the measure groups in the cube.
•In the completing the Wizard dialog box -- Enter the cube name and click Generate Schema now tickbox. This generates the schema geneeration wizard.
•In the Schema Generation Wizard dialog box -- Specify the Data Source view name and this will create the new Data Source View.
•In the Connection Manager dialog box -- Fill in the Provider, server name, Logon to the server, Connect to database fields.
•In the Impersonation Information dialog box -- Use the Service account (is recommended)
•In the data source wizard -- Specify the data source name
•In the Subject Area Database Schema Options dialog box -- Specify the options, accept the defaults
•In the Specify Naming Conventions dialog box -- just accept the defaults.
•After the above steps are completed, the data source view is generated in BIDS
•Populate the data source with data so that this data can be used to populate the cube.
•The last step is to right click the relevant cube in the solution explorer and select Process. Accept all the defaults and click Run. This step extracts data from the data source view and populates the cube.
The cube is now ready for viewing.

Here is a link to the original blog I posted on BIDN.

Wednesday, June 23, 2010

Silverlight Operating system

Here is a link I found today that is really interesting. It is a windows 7 operating system simulation. Have a look.

Friday, June 18, 2010

Microsoft LogParser

Today I was frustrated with the built in error log in SQL SERVER 2005 and did some research and found the following link to Microsoft LogParser that can be used to search the error logs.

http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en



Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows® operating system such as the Event Log, the Registry, the file system, and Active Directory®. The results of your query can be custom-formatted in text based output, or they can be persisted to more specialty targets like SQL, SYSLOG, or a chart.

I have found this very useful

A sample query to search in the error logs is as follows:

Logparser.exe "select top 100 substr(text,23,9) as ESource, substr(text,0,22) as EDate, substr(text,32) asEMessage from \\d:\databases\MSSQLTEST\LOG\ERRORLOG.* where EMessage like '%database \'master\'.%'" -i:textline

Wednesday, June 16, 2010

24 Hours of PASS Recordings Ready for Viewing!

24 Hours of PASS Recordings Ready for Viewing!

24 Hours of PASS brought an exceptional lineup of SQL Server and BI experts from around the world in 24 back-to-back webcasts starting at 12:00 GMT (UTC) on May 19 and 20. Attendees got an in-depth look at the hottest SQL Server and BI topics, including - as part of the SQL Server 2008 R2 Community Launch - the new SQL Server 2008 R2, including business intelligence and data management innovations, and much more.

Check out the sessions again or for the first time and learn from the community's top SQL Server experts. You need to be a PASS member (it's FREE to join!) to view the recordings.

Tuesday, June 15, 2010

SSIS Expression Tester

The expression tester tool is a standalone application that allows you to easily develop and test expressions. It is like a workbench to quickly try things without having to open a package or mess up the one your currently working on. It is designed to be easily portable, just extract the files and run, but it does require SQL Server Integration Services to be installed on the machine. The download contains both SQL Server 2005 and SQL Server 2008 versions of the tool and control.

You can download this tool at the following link


SSIS Expression Tester

Friday, June 04, 2010

Shortcut key to display Macro dialogue

In excel the shortcut key to display the macro dialog box is Alt+F8. This can then be used to create, run, edit, or delete a macro.

Thursday, June 03, 2010

Crystal reports not working from CRM system

today I had a problem where the crystal reports that render through the CRM system that print on a label printer were not printing. The error coming up was - "Error printing to crystal reports." Our system admin tried to reinstall the printer software, but that didnot fix the problem. Then I asked him to check whether it is the Microsoft updates.

Then he restarted the system and allowed the updates to go through and that fixed the problem.

Friday, May 14, 2010

I had a requirement to import an excel 2007 spreadsheet into a database as a table in sql server 2005. In Excel 2007 the drivers required for exporting have changed when compared to the previous versions. With Excel 2007 you use the driver named 'Microsoft Access 12.0 database engine OL DB provider'

Following are the steps to import data into sql server 2005 from Excel.
  • Right click on the database from sql server management studio and choose tasks -- import data
  • Choose the data source as the driver name specified above ('Microsoft Access 12.0 database engine OL DB provider')
  • Click on properties button and click on All tab
  • Double click on the data source line and give the file name with the exact path in the property value field. Click ok
  • Double click on the Extended properties line and enter Excel12.0 in the property value field. Click ok twice.
  • Click next through the import wizard and preview the data and click finish.


Your data is imported into the sql server database.

Thursday, May 13, 2010

I have attended the idera sponsored webinar on 'Top 10 Most Useful SQL Server DMVs' by Greg Robidoux

Here are my learnings of that webcast

What are DMVs
Dynamic Management Views are views and functions introduced in sql server 2005 for monitoring and tuning sql server performance.

Dynamic Management Objects (DMOs)
Dynamic Management Views (DMVs) -- can select like a view
Dynamic Management Functions(DMFs) --Requires input parameters like a function

When and Why use them
Provides information that was not available in previous version of sql server
Provides a simpler way to query the data just like any other view versus using DBCC commands or system stored procedures

Types of DMVs
  • change data capture
  • common language runtime
  • database mirroring
  • database
  • execution
  • full-text search
  • I/O
  • Index
  • Object
  • Query notifications
  • Replication
  • Resource governor
  • SQL Operating System

Get a list of all DMOs

select name, type_descfrom sys.all_objects where name like 'dm%' order by name

Permissions

Server scoped-- view server state

Database scoped--view database state

Deny takes prescedencedeny state or deny select on an object
People should have sys admin privileges

Grant permissions

grant view server state to loginname

grant view database state to user
deny view server state to loginname

deny view database state
must create user in master first

Specific types of DMVs

  • database
  • execution
  • IO
  • Index
  • SQL operatng system

Database for page and row count

select object_name(object_id) as objname, * from sys.dm_db_partition_stats order by 1

Tips 1851 -- mssqltips.com

Execution--- (when sql server is restart everything is reset)
sys.dm_exec_sessions-- info about all active user connections and internal tasks

sys.dm_exec_connections-- info about connections established

sys.dm_exec_requests-- info about each request that is executing (including all system processes)
Tips 1811, 1817, 1829, 1861

Execution--- Query plans
sys.dm_exec_sql_text--returns text of sql batch

sys.dm_exec_query_plan--returns showplan in xml

select * from sys.dm_exec_query_stats-- returns stats for cached query plans sys.dm_exec_cached_plans--each query plan that is cached

Exection -- example

select * from dm_exec_connections cross apply
sys.dm_exec_sql_text(most_recent_sql_handle)
select * from dm_exec_requests cross apply
sys.dm_exec_sql_text(sql_handle)

Select T.[text],p.[query_plan], s.[program_name],s.host_name, s.client_interface_name, s.login_name, r.* from sys_dm_exec_requests r inner join sys.dm_exec_sessions S ONs.session_id = r.session_idcross apply sql_text cross apply sys.dm_execsql_query_plan
select usecounts, cacheobjype, objtype, text from sys.dm_exec_cached_planscross apply dm_exec_sql_text(plan_handle)where usecounts > 1 order by use counts desc


IO

select * sys.dm_io_pending_io_requests can be run when you think that io can be a bottleneck select * from sys.dm_io_virtual_file_stats (null,null)

select db_name(database_id), * from sys.dm_io_virtual_file_stats(null,null) --shows io stats for data and log files -- database id and
file id -- null returns all datadb_name is a funtion to return the name of the actual
database rather than database id


Index (when sql server is restart everything is reset)
sys.dm_dm_db_index_operational_stats (DMF) -- shows io, locking and access information such as inserts, deletes, updates
sys.dm_dm_db_index_physical_stats (DMF) -- shows index storage and fragmaentation info,
sys.dm_dm_db_index_usage_stats (DMV) -- shows how often indexes are used and for what type of SQL operation
Tips 1239, 1545, 1642, 1749, 1766, 1789

Index examples
select db_name(dtabase_id), object_name(), * from operation_stats(5,null,null,null)
parameters databaseid, objectid, indexid, partition number
select db_name(dtabase_id), object_name(), * from physical_stats(DB_ID(N'Northwind'),5,null,null,null, detailed)
parameters databaseid, objectid, indexid, partition number, mode

Missing indexes

  • sys.dm_db_missing_index_details
  • sys.dm_db_missing_index_groups
  • sys.dm_db_missing_index_group_stats
  • sys.dm_db_missing_index_columns
    Tip 1634

SQL Operating system

sys.dm_os_schedulers-- information abt processors
sys.dm_os_sys_info-- info abt computer and abt resources available to and consumed by sql server
sys.dm_os_sys_memory-- how memory is used overall on the server, and how much memory is available.
sys.dm_os_wait_stats-- info abt all waitsDBCC SQLPERF('sys.dm_os_wait_stats', CLEAR)
Tips 1949


sys.dm_os_buffer_descriptors-- info abt all data pages that are currently in the sql server buffer pool
Tips 1181, 1187

memory use by database

memory use by table

Monday, May 10, 2010

SSAS does not work if copied from another machine as a VM -- Why?

Did you know that even if you create an exact copy of the sql server virtual machine, the analysis services will not work?

I faced this problem last week.

The exisitng development machine (lets call it DEV1) stopped working and was giving lots of errrors.
So we thought that we will create a copy of the exisitng production system as a virtual machine and use that as the development machine and we created an exact copy of the production system as a virtual machine but gave it a different name (DEV2).
Then decomissioned the original development machine.

When I tried to access the sql server database on the new development machine (DEV2) the access was fine. But when I tried to access the analysis services through the management console, there was no response.

So I thought I had two options to make analysis services to work --

  • Option 1: Reload sql server from scratch and ssas and SSRS and then copy all databases and cubes from the production server.
  • Option 2: Try renaming the new development machine (Dev2) to the old development machine (Dev1)

Since option 2 was easier I thought I would try that first. And bingo the trick worked.

But I still don't know why analysis services does not work from a copy.

Can anyone of you help me understand why?

Thursday, May 06, 2010

PASS Hosts New Com.PASS Content Feeds

PASS is pleased to host Com.PASS, a new set of content feeds that provide Microsoft SQL Server and Business Intelligence professionals broad access to quality information across respected community Websites.

Conceived by Brian Knight of Pragmatic Works and developed in collaboration with PASS President Rushabh Mehta, SQLServerCentral.com Editor Steve Jones, and sswug.org Founder and Managing Editor Stephen Wynkoop, Com.PASS employs a SQL Server Integration Services (SSIS) package that uses keywords to scrub selected community Websites for relevant content.
“Com.PASS is about making it faster and easier for busy SQL Server pros to find the information they need to do their jobs better,” notes PASS’s Mehta. “You can quickly get lost in the sea of links and information available on the Web. Com.PASS feeds you content in your target topic areas from sites that you can trust.”

Initially focusing on BI content, Com.PASS currently includes five feeds:

§ Com.PASS.BI, for BI content across the Microsoft SQL Server and Office stacks
§ Com.PASS.SSAS, for SQL Server Analysis Services content
§ Com.PASS.SSIS, for SQL Server Integration Services content
§ Com.PASS.SSRS, for SQL Server Reporting Services content
§ Com.PASS, which combines all the feeds Just click a feed to add it to your RSS reader.

Learn more and subscribe to your favorite feeds.

Wednesday, May 05, 2010

Exceptional DBA Awards -- Get nominated or nominate people you know

Nominations for The Exceptional DBA of 2010 open today, giving database administrators around the world the chance to be recognized for service to their employers, the SQL Server community, and the IT industry at large.
The link to the site is:

http://www.exceptionaldba.com/?utm_source=ssc&utm_medium=survey&utm_content=dba_awards&utm_campaign=sqlbackupbundle

Secure and available data is crucial for a company's success, and so are the DBAs. All too often DBAs don't get the respect they deserve.
And if you agree with us that it's time to change this, then please help us find 2010's Exceptional DBA Awards winner!

"If you are an exceptional DBA, or know of an exceptional DBA, I encourage you to participate in the Exceptional DBA Awards. Not only will it give you or some exceptional DBA some much-deserved recognition, it will also help to increase the awareness of the importance of the DBA role among the IT community."
Brad McGehee, Exceptional DBA Awards Judge

Would you like to nominate yourself or a DBA you know? Nominations are now open, and we are waiting for your entry! Please make sure that all details have been submitted before June 4, 2010.

Free resources for exceptional DBAs
===========================
The awards sponsor, Red Gate Software, is offering you Brad McGehee's "Day-to-Day DBA Best Practices" poster and a free trial of the SQL Backup Bundle – all Red Gate's DBA tools in a single suite. Red Gate's SQL Backup Bundle includes products such as SQL Backup, to compress, encrypt and strengthen backups, and SQL Response, to monitor SQL Server health and activity. Download free resources now.

Saturday, May 01, 2010

XSLT, XML tools

Here are two free tools for working with XSLT, XQuery and XPath.

XRay is a free XML editing enviroment. Now in its second major release, XRay provides support for XML Schema (XSD) and an integrated online XML tutorial system.
XRay is free. Download it right away!.

Kernow is an open source tool designed to make it faster and easier to repeatedly run transforms using Saxon.
It uses compiled stylesheets, multiple threads and caching resolvers to make the transforms run efficiently, and comboboxes that remember between runs to save your fingers having to retype paths. Kernow is runnable from Ant allowing it to slot into your build process, and its a high level API for Saxon making it very easy to run transforms from your own Java applications.
Kernow is written by Andrew Welch using Java 1.6.

Wednesday, April 28, 2010

SSIS session in Auckland by Patrick

We had a really interesting session with Patrick of Pragmatic Works yesterday on the topic "Introduction to SSIS".

He has covered the following basic aspects of SSIS
  • Opening BIDS environment with a -NOSPLASH
  • Creating a small package with some package requirements -- Control flow, Data flow, Event Handler, package explorer
  • Deplying the created package
  • Scheduling a package

Here are my takeways from this session

Tip 1

You can use -NOSPLASH in the shortcut of the Visual studio icon to avoid the initial start up screen when you open Visual Studio

Tip 2

Data Connections can be created in two ways --

  • Via the Data Source on the right hand side of the screen of the solution. If the data source is created this way, it can be used by all the packages in the project.
  • Via the connection manager within the package itself. If this is used, the connections can be used only within that package.

Tip 3

Data Flow Taks can be created in two ways

  • Via the Control flow tab -- by dragging the Data flow task from the toolbox
  • Via the Data Flow Tab -- by just clikcing on the link available in this tab.

Tip 4

Always use OLEDB source instead of ADO.NET source for greater performance

Tip 5

In the OLEDB source tool always use SQL command instead of Table/view. Using the Table/View can slow down the SSIS package considerably.

Tip 6

When sql command in used, use the Preview button instead of the Parse Query button

Tip 7

You can use look up task and derived column task to redirect the un match rows to an error output.

Tip 8

If you use the row count task in the data flow tab that creates an unnamed variable, to name this varaible right click on the grey space on the control flow tab and name the variable.

Tip 9

You can right click on the control flow tab and click on the Package Configurations to configure the package. These configurations can be created as an XML file which can then be modified at deployment.

Tip 10

When you build a project and deploy, the package will be in the MSDB database of the sql server.

Tip 11

You can schedule an SSIS package using the SQL SERVER Agent or using dt exec command line.

Power BI Kids competition 2026

 Celebrating the next generation of data rockstars! 🚀✨ I am incredibly proud to share that we have officially wrapped up our 8-week #PowerB...