一、Microsoft SqlClient Data Provider for SQL Server
1、标准连接字符串
Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;User ID=mylogin@myserver;Password=myPassword;Trusted_Connection=False;Encrypt=True;
使用 ‘myloginc@myserver’形式的User ID
2.打开MARS方式
Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;User ID=mylogin@myserver;Password=myPassword;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True;
3、windows通过活动目录方式授权的连接方式
Server=tcp:myserver.database.windows.net,1433;Authentication=Active Directory Integrated;Database=mydatabase;
4.活动目录指定用户名和密码方式
Server=tcp:myserver.database.windows.net,1433;Authentication=Active Directory Password;Database=myDataBase;UID=myUser@myDomain;PWD=myPassword;
5.加密传输方式
Data Source=myServer;Initial Catalog=myDB;Integrated Security=true;Column Encryption Setting=enabled;
二、.NET Framework Data Provider for SQL Server
1.标准连接字符串
Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;User ID=mylogin@myserver;Password=myPassword;Trusted_Connection=False;Encrypt=True;
2.打开MARS方式
Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;User ID=mylogin@myserver;Password=myPassword;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True;
3.Azure活动目录授权方式
Server=tcp:myserver.database.windows.net,1433;Authentication=Active Directory Integrated;Database=mydatabase;
4.Azure活动目录用户名和密码方式
Server=tcp:myserver.database.windows.net,1433;Authentication=Active Directory Password;Database=myDataBase;UID=myUser@myDomain;PWD=myPassword;
5.加密传输连接方式
Data Source=myServer;Initial Catalog=myDB;Integrated Security=true;Column Encryption Setting=enabled;
加密方式仅支持.NET Framework 不支持 .NET CORE
三、Microsoft OLE DB Driver for SQL Server
1.sql 授权方式
Provider=MSOLEDBSQL;Data Source=myServer;Initial Catalog=myDatabase;Authentication=SqlPassword;User ID=myUserName;Password=myPassword;Use Encryption for Data=true;
2.windows 使用 SSPI授权方式
Provider=MSOLEDBSQL;Data Source=myServer;Initial Catalog=myDatabase;Authentication=ActiveDirectoryIntegrated;Use Encryption for Data=true;
3.Azure 活动目录用户名和密码授权方式
Provider=MSOLEDBSQL;Data Source=myServer;Initial Catalog=myDatabase;Authentication=ActiveDirectoryPassword;User ID=myUserName;Password=myPassword;Use Encryption for Data=true;
4.活动目录嵌入授权方式
Provider=MSOLEDBSQL;Data Source=myServer;Initial Catalog=myDatabase;Authentication=ActiveDirectoryIntegrated;Use Encryption for Data=true;
Provider=MSOLEDBSQL;Data Source=myServer;Initial Catalog=myDatabase;Authentication=ActiveDirectoryInteractive;User ID=myUserName;Use Encryption for Data=true;
5.活动目录Token授权方式
Provider=MSOLEDBSQL;Data Source=myServer;Initial Catalog=myDatabase;Access Token=myAccessToken;Use Encryption for Data=true;
6.活动目录MSI授权方式
Provider=MSOLEDBSQL;Data Source=myServer;Initial Catalog=myDatabase;Authentication=ActiveDirectoryMSI;User ID=myObjectId;Use Encryption for Data=true;
四、SQL Server Native Client 11.0 OLE DB Provider
Provider=SQLNCLI11;Password=myPassword;User ID=[username]@[servername];Initial Catalog=databasename;Data Source=tcp:[servername].database.windows.net;
五、SQL Server Native Client 10.0 OLE DB Provider
Provider=SQLNCLI10;Password=myPassword;User ID=[username]@[servername];Initial Catalog=databasename;Data Source=tcp:[servername].database.windows.net;
六、SQL Server Native Client 10.0 ODBC Driver
Provider=any oledb provider's name;OledbKey1=someValue;OledbKey2=someValue;
七、.NET Framework Data Provider for OLE DB
Driver={SQL Server Native Client 10.0};Server=tcp:[serverName].database.windows.net;Database=myDataBase;Uid=[LoginForDb]@[serverName];Pwd=myPassword;Encrypt=yes;
八、.NET Framework Data Provider for ODBC
Driver={any odbc driver's name};OdbcKey1=someValue;OdbcKey2=someValue;
本文详细介绍了Azure SQL数据库的多种连接方式,包括Microsoft SqlClient Data Provider、.NET Framework Data Provider、Microsoft OLE DB Driver以及SQL Server Native Client的各种授权和加密选项。涵盖了从标准连接字符串到使用活动目录、MARS、加密传输等多种连接方法。
3183

被折叠的 条评论
为什么被折叠?



