Installing Connecting Good resourse on setting up network access: http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx Monitoring Performance Monitor Can be used to help you determine if a particular SQL Server currently is experiencing bottlenecks or not Removing SQL Server Control Panel > Add Remove Programs Remove the SQL Server 2008 (not the other SQL Server 2008…. programs first) Updating SQL […]
All posts by
Overview and Editions
SQL Server Editions SQL Server Compact Edition An Embedded Database Engine. Lightweight, in-process database engine designed to run on devices and desktops and is geared toward local data storage. SQL Server Express Edition The entry point to the data service platform which runs on server and desktop versions of the Windows platform. Has the typical […]
Columns (Fields)
Column Types See page 134 of 'Beginning SQL Server Express 2008) Text varchar(50) For short text fields varchar(MAX) (Will eventually supercede text type) vNarchar(50) Unicode so double storage space but not limited characterset nVarchar(MAX) Unicode so double storage space but not limited characterset text Don't Use – Use varchar instead as this will be superceeded […]
Tables
table SYSCOLUMNS is the system table (contains all other tables) Creating A New Table The easiest way to create a new table is using SQL Server management Studio. To implement creation in cod you can create the table without saving and use menu > Table Designer > Generate Change Script to get the SQL code […]
Indexes
As well as selecting a primary key for each table you may also specify other columns to be indexed. Indexes speed up searching, but slow down adding and deleting of records (indexes are effectively another table that’s created but is hidden from you). Open a table in Design View. Press the toolbar ‘Manage Indexes & […]
Databases
Maximum Number Of Databases Databases per instance of SQL Server = 32,767 (http://msdn.microsoft.com/en-us/library/ms143432.aspx) The total number of databases on a particular server is not all that relevant. What is important is how busy each of the databases are (and to a certain degree, the size of the databases in relation to the size of the […]
Users
User roles explained: http://sqlserverpedia.com/wiki/Database_Security_Tutorial
Good SQL Coding Resources
Good books on the subject: “Pro Visual C++/CLI and the .NET 3.5 Platform” “Beginning SQL Server 2008 Express for Developers”
ORDER BY
ORDER BY UserName ASC"; ORDER BY UserName DESC"; ORDER BY Country, UserName"; //For multiple fields DateTime most recent first ORDER BY MyDateColumn DESC";
DateTime
Equivalent to MySQL Now() Use GETDATE(): UPDATE table SET date = GETDATE(); This returns the current database system timestamp as a datetime value without the database time zone offset. This value is derived from the operating system of the computer on which the instance of SQL Server is running. Using Fields Stored Using GETDATE() In […]