我有一个使用Windows Azure作为后端的WPF应用程序.我使用SQL Azure来存储WPF应用程序通过WCF服务访问的数据.我需要能够存储服务器端的二进制文件(例如图像),并想知道存储这些文件的最佳方法是什么.我可以将文件放在SQL数据库中,但我不确定是否建议这样做.让我们假设存储大约2000个文件(总大小约为1GB).经常访问这些文件(最好在客户端上缓存).
有什么建议?
wpf azure azure-storage azure-storage-blobs azure-sql-database
我对Entity进行了一些更改,并在packageManager控制台中成功执行了"update-database -verbose",我可以看到azure数据库中反映的更改.
然后我对azure云进行了部署,我从Azure云获取了错误消息
"The model backing the 'myDBContext' context has changed since the database was created. Consider using Code First Migrations to update the database"
Run Code Online (Sandbox Code Playgroud)
我尝试设置Configuration.AutoDetectChangesEnabled = false并重新部署
但我仍然得到同样的错误.
请帮忙 ..
是否可以配置可以使用SQL Server将数据从SQL Azure DB传输到AZURE VM的复制?
基本上,我想将事务数据从Sql AZURE移动到安装了SQL Server Standard的Azure VM中的本地服务器.我在Azure VM上使用SSRS来自服务器,并希望从此数据源运行报告.
我们尝试为SQL Azure DB配置地理复制,但除非它是Premium DB(价格昂贵),否则我们无法确定辅助数据库的区域.默认情况下,Azure使用North for South region和类似的地方,这将使报告运行速度非常慢.
sql-server azure reporting-services azure-virtual-machine azure-sql-database
如何使用Azure SDK从守护程序(技术上是队列处理器)在资源组中创建新的Azure SQL Server?我遇到的问题是尝试创建时的授权错误.这是例外:
Hyak.Common.CloudException AuthorizationFailed:对象ID为"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"的客户端"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"无权执行"Microsoft.Sql/servers/write"操作超范围'/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/{myResourceGroupName}/providers/Microsoft.Sql/servers/{newServerName}'.
(实际异常在每个占位符中都有实际值.)
我正在使用Microsoft.Azure.Management.SqlNuGet软件包,版本0.38.0-prerelease(最新版本).
我以前曾试图用来CertificateCloudCredentials进行更改 - 但它产生了以下异常:
Hyak.Common.CloudException AuthenticationFailed:身份验证失败."授权"标题不存在或以无效格式提供.
现在我正在使用TokenCloudCredentials,通过以下方式获得:
AuthenticationContext aContext = new AuthenticationContext(string.Format(
anApiConfiguration.LoginUriFormat,
anApiConfiguration.TenantId));
ClientCredential aClientCredential = new ClientCredential(
anApiConfiguration.ClientId,
anApiConfiguration.ClientSecretKey);
AuthenticationResult aTokenResponse = await aContext.AcquireTokenAsync(
anApiConfiguration.BaseResourceUrl,
aClientCredential);
Run Code Online (Sandbox Code Playgroud)
从此我成功获得了一个令牌.然后我使用该令牌如下:
SqlManagementClient sql = new SqlManagementClient(anAuthToken);
ServerCreateOrUpdateProperties someProperties =
new ServerCreateOrUpdateProperties {
AdministratorLogin = someSettings.AdminAccountName,
AdministratorLoginPassword = someSettings.AdminPassword,
Version = "12.0"
};
ServerGetResponse aCreateResponse =
await sql.Servers.CreateOrUpdateAsync(
someSettings.GetResourceGroup(aRegionType),
aServerName,
new ServerCreateOrUpdateParameters(someProperties, aRegion));
Run Code Online (Sandbox Code Playgroud)
最后一行,即CreateOrUpdateAsync调用,是在这篇文章的顶部产生异常的原因.
在Azure Active Directory中,客户端应用程序被授予Windows …
我对这两种类型的数据库有些困惑。以我的理解,弹性数据库只是单个数据库的集群,对吗?因此,如果是这样,我就不会对它们施加不同的限制,例如:
1)我选择标准800弹性池,但是它仅包含两个S1单数据库(每个数据库20 DTU),那么我最多有40 DTU(= 2 * 20DTU),而不是 800 DTU?
2)同样的情况:对于两个S1单数据库,我有2 * 250GB = 500GB的存储限制,但是Standard 800弹性池提供了800GB的存储限制-我可以使用多少存储空间?
3)我想将三个S3单个DB(每个100 DTU和250GB = 300DTU和750GB)放在一起:所以我不能选择一个S-100弹性DB,因为这个SDB的限制是100eDTU和100GB?
我今天在哪里:
TDSVER=7.3 tsql -H example.database.windows.net -U me -D ExampleDB -p 1433 -P notreallymypassword
Run Code Online (Sandbox Code Playgroud)
这不是:
>>> import pymssql
>>> pymssql.connect('example.database.windows.net', user='me', password='notreallymypassword', database='ExampleDB', tds_version='7.3')
Run Code Online (Sandbox Code Playgroud)
它失败了
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pymssql.pyx", line 635, in pymssql.connect (pymssql.c:10734)
File "_mssql.pyx", line 1902, in _mssql.connect (_mssql.c:21821)
File "_mssql.pyx", line 577, in _mssql.MSSQLConnection.__init__ (_mssql.c:6214)
File "_mssql.pyx", line 1704, in _mssql._tds_ver_str_to_constant (_mssql.c:18845)
_mssql.MSSQLException: unrecognized tds version: 7.3
Run Code Online (Sandbox Code Playgroud)
好的。好吧,那很奇怪。所以我回去尝试了tsqlusing TDSVER=7.2,它似乎工作正常。
尝试联系tds_version='7.2'给我:
Traceback (most recent call …Run Code Online (Sandbox Code Playgroud) 如何每晚将表从本地SQL数据库复制到Azure SQL数据库?也许我应该使用SSIS包?
因此,我使用Visual Studio数据库项目将数据库发布到Azure。
默认情况下,这会将数据库发布为S0定价层。然后,我必须登录门户并将“定价”层更改为S1。
从这个答案中,我可以看到有人ServiceObjective在创建数据库时设置了属性,如下所示:
CREATE DATABASE
[{databaseName}]
(MAXSIZE={maxSize}, EDITION='{edition}',SERVICE_OBJECTIVE='{serviceObjective}'
Run Code Online (Sandbox Code Playgroud)
在门户中更改定价层后,我运行以下命令:
SELECT DATABASEPROPERTYEX('MyDatabaseName', 'ServiceObjective')
Run Code Online (Sandbox Code Playgroud)
它返回,S1所以我确定ServiceObjective是正确的属性
但是我的问题是我可以使用以下命令创建数据库后设置此属性吗? Alter
Invalid source server details were specified for the migration.
Validator 'Microsoft.SqlServer.Migration.Core.Validators.SupportedDatabaseEnvironmentValidator' failed to validate data.
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
The certificate chain was issued by an authority that is not trusted
Run Code Online (Sandbox Code Playgroud)
我是Azure新手,希望从我的计算机数据库迁移到azure.
作为Azure SQL数据库自动化解决方案的一部分,我试图使用服务主体创建映射到Azure AD身份的 Azure SQL数据库用户。
结果是一条错误消息,提示:此时找不到主体'AAD_User_UPN_or_Group_Name'。请稍后再试。
可以按照完全相同的步骤,使用我自己的用户帐户创建数据库用户。
请在下面找到更多详细信息:
服务主体在Azure SQL数据库中执行以下T-SQL语句:
CREATE USER [AAD_User_UPN_or_Group_Name] FROM EXTERNAL PROVIDER;
Run Code Online (Sandbox Code Playgroud)
返回的错误消息是:
Principal 'AAD_User_UPN_or_Group_Name' could not be found at this time. Please try again later.
Run Code Online (Sandbox Code Playgroud)
当我自己的用户帐户触发相同的T-SQL语句时,该语句成功运行并创建了用户。
非常感谢您的帮助或建议。
azure azure-active-directory azure-sql-database azure-sql-server