Friday, July 13, 2012

SQL Full Back ups SSMS and T SQL


Today I was visiting my professor in the school where I met a young guy who was looking to go and make career in database technology. He was not familiar with the SSMS  in depth and requested if I can teach him basics of T sql scripts and some normal operations of SSMS. As Below I was about to write the T sql script for backup that I teached him then I though it would be nice to share the SSMS backup also. So initially I will showing the SSMS backup and then follow by T sql script back up.

Backup Using SSMS
Right click the database -> task->backup->select the database browse the database file from it path and leave all worries to SSMS for restoring.
P.S. I am not discussing any errors right now and everything goes smooth you will find a back up of the database on the mentioned folder.






Back up Using T- SQL:
I am writing the most basic script to back up database reason to just to mention a basic script is to make new people familiar with the T sql and it operation not to make them confuse in ocean of  TSQL puzzles. Once you grab the Idea you would be making more complex scripts.

Backup Database <Database Name> to disk=N'Specify the location'

The italic words are keywords and must be written as they are.

One important point SQL language is not a programming language  it a Query language but it does not mean it does not uses any programming concept what I have learn the different its not as flexible as programming language but if you know how to use the SQL and Programming this fusion makes you an excellent programmer.




P.S. For New DBA's Please keep your recovery model to Full until you earn enough experience and knowledge for the other two models.

No comments:

Post a Comment

Popular Posts