SQL DBA Guru

“Your issues, Our solutions”

header photo

Customized SQL Scripts for DBA

Posted November 19, 2012
Hi DBA Guru,
 
Can you please help me with this? I am looking for some sort of SQL Script for my database administration and maintenance.
 
I want to create a table and the column names would be - the database name, current date, row count, data size, index size, etc.

In this table, I want to insert about all the tables' above information for one particular database and would want to use DMV for this.

Kindly suggest and let me know if you have any questions.
 
Thanks
Tina

DBA Training

Posted July 11, 2012
Hi Sujeet,
 
                   I am new SQL DBA..I caught your blog while I was searching for some valuable blogs for SQL server in Google and I was very much happy for your kind advice. I would like to contact you to chat and ask you what we face the live issues in Sql server administration.. Looking forward for your reply.
 
Thanks for sharing such a valuable information..
 
 
Thanks in Adv,
Mani...

Career Change from System Administrator to SQL Server DBA

Posted July 10, 2012

Dear Sujeet,

I'm in need of advice from a sql expert, currently i'm working as a half level sql dba in a software company, technically i do mixture of both system administrator and dba, but i'm willing to move to MS SQL Dba to make that as my profession, i have 4 years experience and pretty amazing grasping ability. Since i'm not exactly a full time dba, where should i start? i live in bangalore, any good institutions you recommend and is it a good idea to have the MS Certification and any reference where i can get on hand experience in sql dba. Thank you for taking time reading the mail.

Regards,
S.Bharath Bharadwaj.

Unable to connect to Remote SQL Server

Posted June 30, 2012


Hi Sir,
          I am having a doubt regarding one of the issues in SQL Server. Can you help me to find out the root cause? While trying to connect to a remote sever, I am getting the following error.

Error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server).

Kindly suggest.

Thanks,
Anoop

Issue while Upgrading the Reporting Server

Posted June 30, 2012

Hi Sujeet,
 
I am Srinu working as a DBA and  recently I got one problem during upgradation.
In our Reproting Server (Standby) SQL Server 2005 SP4 (Version:9.0.5000) is installed, at present we want to upgrade to SQL Server 2005 Enterprise edition RTM (no Service packs, Version:9.0.1399). When I was upgrading this, it is prompting error as "existing components are later versions". To remove service packs in Reporting server there is no uninstall option in SQL Server 2005.
 
How can this be resolved? Kindly guide, much appreciated.
 
Thanks & regards
Srinu
SQL DBA
Mumbai.

Way to DBA...

Posted March 18, 2012

Explore your career path to become a DBA and furthermore. Just choose your current job title to see what you might be doing in future @ http://www.sqldbaguru.com/career-path.

Live Chat with SqlDbaGuru - Timing Altered

Posted February 19, 2012

Dear Friends,

           Due to my time unavailabity, the timings for live chat has been altered. Now, its only available for 30 minutes biweekly - Mondays and Thursdays at  7:30 AM GMT / 8:30 AM BST (London)/ 01:00 PM IST (New Delhi) / 01:30 AM EST (USA New York).

           Thanks again for putting up your queries to me through calls / emails / chat sessions. Keep posting!

 

Kind Regards,

Sujeet

My Salary Calculator

Posted January 31, 2012

Now here you go! If you are looking for what you are worth for, here is the tool to calculate the payscale based on the market survey. So, why not to try it? It provides key salary data based on your requirements. There are millions of unique salary profles to compare with. So, visit the home page of www.SqlDbaGuru.com, click on the Research Salary button and complete few questions to get the up-to-date salary data matching your profile! Thanks.

Script to find out the SQL Server Fragmentation Level

Posted January 19, 2012

Dear Sujeet,

           Can you please suggest how to find the fragmentation level by using command prompt? Thanksin advance for your help.

Regards,

Kolla Srikanth

Urgently Need Real Time DBA Experience!

Posted January 19, 2012
Hi Sujeet,
      I am Suresh Kolla from Mumbai. I have completed B. Tech (IT) in 2008 and also have completed the SQL Server DBA course in one of the institutes in Hyderabad. Honestly speaking, initially still after my course I was not very confident with the subject but now after looking your website www.sqldbaguru.com, it has gave my a very good confidence to become a professional SQL Server DBA.
     Can you please suggest me regarding my DBA career and how to achieve my goal? Please send me the learning material from very basic concepts to advance concepts and also suggest how to get the real time experience? I eed it very very urgently.
    Please help in this regard. Iam waiting for your valuable suggestions.
Thank you,
Suresh Kolla.

My SQL Server is hungry for ever...

Posted January 19, 2012
Hi Sujeet,
     I am very new to sql server, and I am working at a company where I am getting this kind of errors very frequently with almost every server. As per my knowledge , sql server takes memory from OS ,when it needs but does not releases though when it's not of any use later. So, please suggest how to deal this kind of issues and how to release memory if possible? or the only solution is to increase RAM??
total ram is 6GB
sqlserv.exe\sa using  4710952K
sql server 2008
 I also hve checked the error logs but didn't find any errors. 
 
Customer Comments: sqlserver.exe is taking maximum memory.
Summary: server name : Memory utilization is 96.89%
 
       Kindly suggest at the earliest.
 
Thank you,
Rajani

Secret to make more money in your career!

Posted September 8, 2011

Sujeet Shares his experience with Koenig - Solutions at http://www.koenig-solutions.com/training/FeaturedStudent.aspx?syear=2010&sid=585#anchorfs. Something more there...

Live Chat on SQL Server related issues with Sujeet!

Posted September 7, 2011

Hello everybody,

I feel very happy and excited as well as a pleasure to invite you all to the bi-weekly Live Chat sessions on the SQL Server Database administration and maintenance issues! My website, www.SqlDbaGuru.com, (born with a thought to help others struggling on the day to day database related issues,) has been sharing many of the top-notch advices and scenario based solutions to all levels of SQL database professionals across the globe.

I would like to help you all on as many posts as possible, but due to time constraints, would request you to not to miss out on your chance to get an expert advice!

Logistics:

Days: Mondays and Thursdays

Duration: About 30 minutes.

Timings:

  • 7:30 AM GMT / 8:30 AM BST (London)/ 01:00 PM IST (New Delhi) / 01:30 AM EST (USA New York)
  • 5:30 PM GMT / 6:30 PM BST (London)/ 11:00 PM IST (New Delhi) / 12:30 PM EST (USA New York)

 If you have any issues accessing the chat room at all, please mail or call me, and we’ll get the issue resolved at the earliest.

Catch you there at gmail chat @ sujeetsaha@gmail.com!


Sujeet Kumar,

Database Architecture and DBA (SQL Server)

SQL Server environment in a company

Posted September 6, 2011

Question: I am a fresher and want to become a SQL Server DBA. I would like to know about the SQL Server environment and how SQL Server is deployed practically in small scale firms? Could you please help me to have more insight on this? 

Solution: Good question. This is a very basic but a very valid question which generally a beginner level DBA thinks first. I would explain this here.

There are primarily three types of environment – DEV, UAT and Prod. This also varies from organization to organization.

  1. Dev : Development Environment – Where the developers develop the database code i.e creating tables / views or writing Stored Procedures stc.
  2. UAT: Test Environment – Where the developed codes are tested for functionality validation by business users.
  3. Prod: Production Environment – Where the tested code is moved and the actual users start working.
  4. SIT: System Integration Testing Environment – Where the testers do the testing of the sub-systems, as a whole, to ensure that all the modules of the script work as a system.

So, if we summarize, then the application deployment cycle is something like:

DEV Environment --> SIT Environment (Optional) --> UAT Environment --> Prod Environment

To keep it simple, the movement of code from one environment to another is called deployment. The deployment, in itself is a complex task and is very challenging. It all depends on what all components we are planning to deploy from one environment to other? A simple example may be simply deploying a newly created table from dev to UAT and from UAT to Production environment. Whereas a complex example may be the deployment of a whole application having application code deployment, middle level components configuration deployment and database level deployment. And to deploy from one environment to another, the DBA’s need to follow a process called Change Control.

Hopefully, this gives a good idea and a broader view about the SQL Server environment in any small to middle level organization along with the deployment process. But don't hesitate to ask me if you would like to know more about it!

Want to Help Others?

Posted August 19, 2011

Dear Friend,

            If you are a SQL Server person, then just count that how many industry leaders and SQL techies know about you? Get yourself noticed globally by sharing your experience as an interviewer / interviewee for SQL DBA position helping others to learn from your mistakes or suggestions to improve them. You can mail me at sujeetsaha@gmail.com or simply put your comments in the Blog section of www.SqlDbaGuru.com Thanks in advance for helping others through your valuable comments and experiences.

Regards,

Sujeet

I am a DBA and I need to grant a permission to an user in more than 60 databases. Can somebody help me?

Posted August 17, 2011

How to grant a permission to all the databases?

I am a DBA and I have got a request to add an user and grant him read access to all databases in a SQL server. Now, the problem is there are more than 60 databases hosted in the server and I do not wan to do it on all databases manually one by one. Is there any way out or a script through which I can grant the read permision to all the databases at one go?

Resolution: I have a script here to help you in this situation. Pls. refer to the following loink in my website :

http://www.sqldbaguru.com/permisison-all-db

Pls. feel free to add up and post your comments for any related queries.

Thanks,

Sujeet.

www.SqlDbaGuru.com

Getting prepared for the SQL Server DBA interview.

Posted August 15, 2011

Going for an Interview?

Now better be prepared before speaking up in an interview for the SQL Server DBA position and grab the opportunity. You can call at  88-26-648-648 or mail at sujeetsaha@gmail.com to fix up an appointment for a mock interview!

Please Dial 0091 before the number if calling from outside India.

Explaining the licensing models in SQL Server.

Posted August 15, 2011

Dear Friends,

           On your constant requests for information on licensing models in SQL Server, you can now refer to my page - http://www.sqldbaguru.com/licensing. This applies almost same for SQL Server 2008 and 2005 but do let me know for further details if required.

Regards,

Sujeet

How to Become a Professional SQL Server DBA

Posted April 30, 2011
Friends,
         I started my career as a SQL Server developer and then moved towards SQL Server Database Administration. But it was very tough to change the career path as I didn't knew what to do and from where to start with! But then I managed and now have more than 8 years as a DBA form 11 years of overall work experience.
       
        So, I am going to share my experiences and my learning in this blog. Will talk about what the pre-requisite skills are needed to become a Professional SQL Server DBA, how much time it takes to be a good DBA, additional skill sets, trainings and certifications required and so on.
        Let me first explain and help you with the decision making to become a DBA.


Explaining the term – DBA:

        A database administrator (DBA) is a person responsible for designing, implementing, and maintaining the database system; establishing policies and procedures pertaining to the management, security, maintenance, and use of the database management system.


Who can become a DBA?

        To start with, you would be falling in either of the following categories:
·         You are a fresher or a non-IT professional having no or very less knowledge about databases.
·         You are an IT professional but not much experience with databases.
·         You are an IT professional but having good understanding of databases.
        Now, whatever category you fall into and whatever experiences you have, the good thing is you can always opt for DBA as a career (let’s be positive). But obviously, the more knowledge you have about the databases, quicker will be the way to become a DBA.


Pre-requisites for becoming a DBA:

·      Good knowledge and understanding of databases.
·      T-SQL and .Net coding knowledge will be an additional advantage.
·      In-depth knowledge of operating systems and storage will be helpful.        
·      Responsible, Trustworthy, Analytical, Working under pressure, Supporting 24 X 7 and Good communication skills are the keys to survive (these comes with the experience, so no worries.)
Choosing the product:
                As the primary responsibility of a DBA is to work on databases, it is purely the individual’s interest on which product he/she is expert and is more comfortable with. You can choose among SQL Server from Microsoft, Oracle from Oracle, Sybase from Sybase and many others.
                I will talk about SQL Server from Microsoft.

DBA Responsibilities:
·         Installing or upgrading a SQL Server: Every DBA is responsible for installing SQL Servers or upgrading to an upper version of SQL Server. The DBA should know the difference between different SQL Server editions and install the required edition. He should also understand the licenses required for it.
·         Patching up the SQL Servers: After installing the SQL Server, the DBA must make sure that the SQL Server is properly patched with the correct Service Pack.
·         Database Server Health monitoring: One of the prime responsibility of a DBA is to monitor the database server for smooth operation. Like the processor is optimally utilized, the memory is sufficiently used, etc.
·         Storage availability: The database is saved on physical disk and the DBA needs to make sure that enough space is available for the database growth.
·         Performance tuning & optimization: The database needs to be tuned and optimized on a regular basis by the DBA.
·         Securing the SQL Server database: The data must be secured from unauthorized users, which the DBA makes sure by assigning proper permissions to the authorized users.
·         Backups and restoration: In case the database gets corrupt or if the server goes down, the DBA needs to recover the database with the minimum loss as quick as possible. So, the DBA needs to take the database backups regularly and when required, also needs to restores it.
·         Data transfer: In the current heterogeneous environment, the data may be needed to imported from or exported to different formats, which the DBA needs to do i.e.  SQL Server -  to / from -  Oracle / Sybase / text files / .csv format.
·         Disaster Recovery: The DBA also needs to plan and make strategies for the disaster recovery of SQL Server.
·         Deployment of SQL scripts: The DBA does the SQL code and scripts deployment to the production environment.
·         Maximum uptime of servers: The DBA needs to make sure that the SQL Servers have minimum downtime with no / minimum impact on business.
·         Documentation: This is very necessary which helps all things to be documented and handy for new DBAs or emergencies.
·         Communication: Since the DBA has to interact with different teams, he has to be very good and effective in communication. 
To Start:
                So, once you are mentally prepared to become a DBA and you have chosen the database product (SQL Server or Oracle or any other third party product), you need to analyze and honestly answer about the prerequisite points mentioned above, especially on the database knowledge level. I would suggest, rate yourself between 1 to 10 and work on the improvement areas. Here are some good websites (http://www.microsoft.com/sqlserver/en/us/, http://www.mssqltips.com/, http://blog.sqlauthority.com/), which can help you to increase your database understanding from administration point of view.
Next Step:
                After you make your decision to be a SQL Server DBA, you need to understand the basics of SQL Server database, how they are stored in the hard disks and how they are accessed via the operating system etc.  And believe me, these are not that hard which they seem to be. The best way is to buy a book (I would say to buy and not to download any e-books as it forces you to read since you have spend money on it), go through each chapter one by one and clarifying your doubts. The best way is to practically implement the tings which you read from the book. You can download the evaluation or free edition of SQL Server from the DVD which comes along the book or from  the Microsoft site - http://www.microsoft.com/sqlserver/en/us/. If you still stuck, don’t hesitate to mark me a mail at sujeetsaha@gmail.com and I would be more than happy to help or explain about the topic.    
One step ahead:
                So, now after finishing the book, you should understand the different terminology of SQL Server database, the high availability methods, some best practices etc. Now this is the time when you need advance training and certification so that you can get the knowledge on those topics which are still unanswered to you. You should look for a training center which preferably gives you one-to-one session, cheaper and very professional. I would recommend Koenig-Solutions (http://www.koenig-solutions.com/) for getting you trained and certified as they are pioneer in this.  And believe, I am recommending after my own experience with them. You can get a discount even, if you ask me to get you registered for the training!
                Try to get yourself certified at the earliest as it helps you to get very good understand and sound knowledge on the topics and secondly, it earns you a credibility which is respected worldwide. At this moment, you know the concepts, have done basic practical on the system, trained on the advanced concepts and certified as well. Now, it’s the best time to start having some hands-on experience   by starting a job as a Junior DBA.
Tips to search for the job:
·         Create a Resume which clearly shows your understanding on SQL Server concepts and your about earned certifications.
·         Upload your resumes on job sites and mention your preferred job location. For example, if you are looking for the SQL Server DBA job in India, you can upload at http://www.naukri.com/http://www.monster.com/ and http://www.jobsahead.com/ to name a few.
·         Subscribe your Email ID in the job site so that you can get to know for any latest availability.
·          Keep revisiting the job site and if shortlisted, start giving the interviews.
·         Don’t forget to read my section on important interview questions before you go for the interview.
What to look before you accept the DBA job:
                Once you are shortlisted as a SQL Server DBA, don’t rush to accept the offer but a thorough understanding of your roles and responsibilities is must. Discuss these with your future manager and check if you are comfortable with those. If not, it might be a good idea to tell your manager honestly so that he can set his expectations according to that and may be helping you to overcome where you lack. Ask if they can provide you some in-house trainings or mentoring.
Here You Go!
                Congratulations! You have made your dream come true of being a SQL Server DBA. Now, welcome to world of DBAs and the day to day challenges. You can get all the SQL Server Database Administration related stuff at http://www.sqldbaguru.com/. Happy reading!!

SQL Server Future with Cloud Computing

Posted December 31, 2010