Soon to be a DBA

 

[AD-SIZE]

Wednesday, August 25, 2004

 
Microsoft SQL Server - Using Application Roles - SQLTeam.com

SQL Server 2000 Security - Part 5 (Application roles)


Mastering Application Roles

Friday, April 30, 2004

 
GoogleGroups thread discussing complex queries and good books on the subject

Friday, April 09, 2004

 
We went over stuff in chapter 2 of the prep guide. Here are just some misc notes and links from MSDN

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_intro_3nsj.asp (isql utility)

I figured out how to login to a database but haven't done much else

C:\ isql -U database (ie ctrain) then you get prompted for a password

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/qryanlzr/qryanlzr_7v02.asp Color Coding in Query Analyzer

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/qryanlzr/qryanlzr_7v02.asp Talks about the different icons in the Query Analyzer screen

We also talked about Analyzing queries http://msdn.microsoft.com/library/default.asp?url=/library/en-us/qryanlzr/qryanlzr_3cj2.asp

And using Object Search http://msdn.microsoft.com/library/default.asp?url=/library/en-us/qryanlzr/qryanlzr_3cj2.asp



and system functions
rowset - used when connecting to a database on another server, the rowset behaves like an object

aggregate - use with group by to get a total of products (for example) for a unit
scalar - only use when you want to return a single value

Query Analyzer Query Menu

Results in Text - shows messages on the same pane as query results
Results in Grid - shows messages on a different pane labeled messages than results
Results to File

Object Browser
Can right click on table and choose Script Object to New Window to see SQL statements that created the table

I suggested that we try to create a non comshare sql database to practice on.

We also talked some about stored procedures and using the debugger.

Please feel free to elaborate on what I missed.

Are folks interested in meeting next Tuesday? We discussed Cheryl covering Chapter 3 after New Year's since she will be gone until then.
Best,
Susan Gross
Product Support Specialist
Phone: 734-994-5212 or +(0) 20 7349-6060 (UK)
FAX: 734-994-1399
Email: sgross@comshare.com
Web Page: http://support.comshare.com/


Thursday, April 08, 2004

 
Every SQL Server installation automatically installs the following databases:


  • master

  • model,

  • tempdb,

  • pubs

  • Northwind

  • msdb


 
When you add a primary key to a table, a clustered index is automatically created unless you specify that it should be non-clustered, or there is already a clustered index on the table.
 

The fixed server roles that can create databases are:


  • sysadmin

  • dbcreator


These are the roles that can do this by default, although you can grant the permissions to others.


 
Do not use reserved keywords to name objects in an SQL Server database. MSDN has a list of the reserved keywords.



 
Compare SQL Server Databases with sp_CompareDB



 
Tables - Creation and Naming

The name of a table has 3 parts.

database.owner.tablename

This means that several tables in a database could have the same name as long as they are owned by different users.

Typically, the user that creates the table is its owner.

However these three roles: sysadmin, db_ddladmin, and db_owner, is able to create a table that will be owned by another user.


Wednesday, April 07, 2004

 
Columns defined with a PRIMARY KEY constraint or IDENTITY property cannot allow null values.

Wednesday, December 18, 2002

 
Color Coding in SQL Query Analyzer

What do all those different colors mean when you are typing a query?

Color Coding Reference for Query Analyzer


User Defined Functions

User Defined Function of the Week


Command Prompt Utilities


ISQL


SQL Statements that cannot be in a Trigger



ALTER DATABASE

CREATE DATABASE

DISK INIT

DISK RESIZE

DROP DATABASE

LOAD DATABASE

LOAD LOG

RECONFIGURE

RESTORE DATABASE

RESTORE LOG




Saturday, December 07, 2002

 
This page http://www.foresightsoftware.com/PrimaryForeignKeyExample.htm has a visual representation of Primary Keys and Foreign Keys
 
I was researching Primary Keys and I found this article from SQL Server Magazine SQL by Design: How to Choose a Primary Key