This document presents information on SQL Server 2012 Express. It discusses hardware and software requirements, limitations of SQL Server Express compared to full versions, and new features in SQL Server 2012 like 14 new built-in functions and improved paging functionality. It also provides documentation on how to execute stored procedures, pass-through queries, and use sequence generators for auto-incrementing IDs.
Developers' New features of Sql server express 2012
1. Presented By
Md. Ziaur Rahman
Senior Software Engineer
Astha IT Research and Consultancy Ltd.
2. Targeted Product : SQL Server 2012 Express
Hardware and Software Requirement
Limitations
Installation
New Features
How to publish Data By MSSQL 2012 Express
3. 32-bit systems
Computer with Intel or compatible 1GHz or faster
processor (2 GHz or faster is recommended.)
64-bit systems
1.4 GHz or faster processor
Minimum of 512 MB of RAM (2 GB or more is
recommended.)
2.2 GB of available hard disk space
OS : Windows 7, Windows Server 2008 R2,
Windows Server 2008 Service Pack 2, Windows
Vista Service Pack 2
4. Installations can only make use of one CPU with a four core maximum
Installations can only make use of 1GB of RAM, regardless of the amount
of memory installed
Databases built with Express Edition are limited to 10GB in size
Express Edition does not offer the database mirroring, log shipping,
or merge publication features offered in the larger product
SQL Server Express Edition does not include Oracle replication
functionality
The tools available with Express Edition are limited
– the installer does not include Database Tuning Advisor, SQL Agent, or SQL
Profiler
5. Step 1: Enable Microsoft .Net Framework 3.5
SP1. and Download and install Microsoft .Net
Framework 4.0.
Note: LocalDB does not require any .NET
Framework installation.
Note: SQL Server Express (with database engine
only) can work with either .NET 3.5 SP1 or .NET 4,
there is no need to have both enabled.
Step 2: Download Microsoft® SQL Server®
2012 Express.
6. SQL Server 2012 introduces 14 new built-in functions.
The new functions are:
Conversion functions
PARSE (Transact-SQL)
TRY_CONVERT (Transact-SQL)
TRY_PARSE (Transact-SQL)
Date and time functions
DATEFROMPARTS (Transact-SQL)
DATETIME2FROMPARTS (Transact-SQL)
DATETIMEFROMPARTS (Transact-SQL)
DATETIMEOFFSETFROMPARTS (Transact-SQL)
EOMONTH (Transact-SQL)
SMALLDATETIMEFROMPARTS (Transact-SQL)
TIMEFROMPARTS (Transact-SQL)
Logical functions
CHOOSE (Transact-SQL)
IIF (Transact-SQL)
String functions
CONCAT (Transact-SQL)
FORMAT (Transact-SQL)
9. Execute a pass-through command against a linked server
{ EXEC | EXECUTE }
( { @string_variable | [ N ] 'command_string [ ? ]' } [ + ...n ]
[ { , { value | @variable [ OUTPUT ] } } [ ...n ] ]
)
[ AS { LOGIN | USER } = ' name ' ]
[ AT linked_server_name ]
[;]
<execute_option>::=
{
RECOMPILE
| { RESULT SETS UNDEFINED }
| { RESULT SETS NONE }
| { RESULT SETS ( <result_sets_definition> [,...n ] ) }
}
<result_sets_definition> ::=
{
(
{ column_name
data_type
[ COLLATE collation_name ]
[ NULL | NOT NULL ] }
[,...n ]
)
| AS OBJECT
[ db_name . [ schema_name ] . | schema_name . ]
{table_name | view_name | table_valued_function_name }
| AS TYPE [ schema_name.]table_type_name
| AS FOR XML
}
10. -- Execute the procedure
EXEC Production.ProductList '%tire%‘
WITH RESULT SETS (
(ProductID int, -- first result set
Name nvarchar(255),
ListPrice money) , -- comma & 2nd RS
(Name nvarchar(255) ,
NumberOfOrders int
));
11. Old Code :
DECLARE @Offset AS INT = 6
DECLARE @PageSize AS INT = 5
SELECT Id, Name
FROM ( SELECT Id, Name,
ROW_NUMBER() OVER (ORDER BY Id) AS
RowNumber
FROM Users ) UsersSelection
WHERE UsersSelection.RowNumber > @Offset AND
UsersSelection.RowNumber <= @Offset +
@PageSize
12. SQL server 2012 Code :
DECLARE @Offset AS INT = 6
DECLARE @PageSize AS INT = 5
SELECT Id,
Name
FROM Users
ORDER BY Id
OFFSET @Offset ROWS
FETCH NEXT @PageSize ROWS ONLY
13. Purpose :
Better performance for auto-generated IDs and easier to have
IDs unique across tables.
Scenarios :
The application requires a number before the insert into the table
is made.
The application requires sharing a single series of numbers
between multiple tables or multiple columns within a table.
The application must restart the number series when a specified
number is reached. For example, after assigning values 1 through
10, the application starts assigning values 1 through 10 again.