Table des matières

SQL Server

ORMs

SQL Server Management Studio (SSMS)

SQL Server Linux

SQL Server 2016

SQL Server 2012

SQL Server 2008

SQL Server 2005

Connection strings

SQL Server Express

<connectionStrings>
    <add name="BooksDbContext" connectionString="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\sampleDb.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;" providerName="System.Data.SqlClient" />
</connectionStrings>

Avec Integrated Security

Quand c'est un login Windows:

Data Source=9YSGY01-PC\SQL2016;Initial Catalog=Database;Integrated Security=True;MultipleActiveResultSets=True;

Sans login Windows, c'est un login SQL Server:

Data Source=sqlserver.instance.com,1433;Initial Catalog=DatabaseName;User Id=username;Password=password;Integrated Security=False;MultipleActiveResultSets=True;

Mapping des fonctions SQL Server et Oracle

Chaînes

SQL Server Oracle
CONCAT(expr1, expr2, …) CONCAT(expr1, expr2)
SUBSTRING(expr1, start, length) DBMS_LOB.SUBSTR(expr1, start, length)
REPLACE(expr1, expr2) REPLACE(expr1, expr2)
CHARINDEX() DBMS_LOB.INSTR()
LEN(expr) DBMS_LOB.GETLENGTH(expr)