1 / 13

MS-SQL Server Basics

MS-SQL Server Basics. IT:Network:Applications. Database. “Business runs on databases…” Understatement! Requirements Installation Creating Databases SIMPLE query Just enough to ensure its there Hand-off to DBA. Requirements. OS: 7, Server 2003, Server 2008 32- and 64-bit

jock
Download Presentation

MS-SQL Server Basics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MS-SQL Server Basics IT:Network:Applications

  2. Database • “Business runs on databases…” • Understatement! • Requirements • Installation • Creating Databases • SIMPLE query • Just enough to ensure its there • Hand-off to DBA

  3. Requirements • OS: 7, Server 2003, Server 2008 • 32- and 64-bit • IIS needed for reporting • .Net 2.0 or later (ASP.net)

  4. Installation • Run ‘setup.exe’ from CD • Select Platform • Install ‘Server components…’ • System check runs – ensures proper environment

  5. More install • Components • SQL DB Services • Analysis Services (Online Analytic Processing (OLAP) and data-mining) • Reporting Services • Notification Services (Send reports in “timely” fashion) • Integration (talk to other db) • Select basics and fine-tune via Advanced

  6. Instance Name /Accounts • “default” is first SQL server on this box • If need more SQL servers (virtual hosts), use “Named Instance” • Use system account or use domain account • domain must be “old-style” (YOURDOMAIN) not DNS-style (YOURDOMAIN.local) • Reboot when done!

  7. Basic Idea • Database • “Unit of Knowledge” • Table • Sub-component of Database • “Unit of Storage” • Database may be multiple tables • Database for NWTC • Table for Students • Table for Programs • One field in Students “points” to correct record in Programs

  8. Create a new Database • SQL Server Management Studio • R-Click on Databases > New Database • Give it a name • If multiple disks, WATCH location!

  9. Create a new Database

  10. Index Field • Table needs one field that uniquely identifies a particular record • Must not be null! • If needed, add field, set to “int” or “bigint” • Mark as NOT allow Null • Set as Identity Column

  11. Backup • BACKUP DATABASE CustomerDBTO DISK = ‘C:\Backups\CustDB.BAK’ • or • In SQL Server Mgmt Studio • Rclick on Database > Tasks > Backup • Delete “default” backup destination and Add new one

  12. Restore • SQL Server Mgmt Studio • R-Click on DATABASES (or your DB) • Restore DB • Specify DB to restore to & Specify source (our file) • Click box to restore this set • OPTIONS! • or • RESTORE DATABASE CustomerDB • FROM DISK = ‘C:\Backups\CustDB.BAK’

  13. Schedule the backup • In Mgmt Studio • Configure backup as before • Script menu > Script Action to Job • Left-side, select “steps” then Edit • Make sure job is correct • Left-side, select “schedules” then New • Give name, pick schedule, Ok

More Related