SQL Server deploy database to Azure throws "You must have a user with the same password..." - azure

I have a live SQL Server database which was originally on an Express version and has compatibility 100. I am inspecting it using SSMS 2016 RC, which seems to have highest compatibility level of 120.
On performing the task Deploy Database to Microsoft Azure SQL Database... it goes through all the verification steps and then bails out with the error:
Could not import package. Unable to connect to master or target server X. You must have a user with the same password in master or target server X
Is the only solution to upgrade the compatibility version of the database and is that even possible from such an old level? Do I have to install a newer SSMS to do this?
I've seen a similar question below, but it refers to SSDT, not SSMS:
SSDT failing to publish: "Unable to connect to master or target server"

I installed latest SSMS v18.3 and performed the deploy operation again and it went through without a hitch, without even requiring me to change the compatibility level

Related

Setting up cakephp3 on azure webapp on linux

I am new to Azure. I would like to setup web app of cakephp 3+ on web app service of azure. I made a web app and tried to install cakephp by composer.
I get the following error:
Fixture creation for "requests" failed "SQLSTATE[HY000]: General Error: 5 database is locked"
Fixture creation for "panels" failed "SQLSTATE[HY000]: General Error: 5 database is locked"
I thought this error was the database connection. But I made a custom script and I saw the web server was able to connect to the database server. I also checked for php version compatibility, but it was all fine, as my dev server is running on same php(7.0) with same cake version. I looked into the looked into logs but nothing helped me. When I exported the code/cakephp to other server it works without any issue. Microsoft did not help me.
Please help in solving the issue.
The "requests" and "panels" tables are used by DebugKit, and created automatically if they don't exist. Presumably, the database user you are connecting to the database with doesn't have "create" permissions here. Either correct that, or disable the DebugKit plugin in your config/bootstrap.php.

Cannot export a BACPAC from SQL Azure -- ExtAuth_Key10 is not supported in Microsoft Azure SQL Database v12

I'm getting an error with exporting the database that's housed in SQL Azure. The database itself is already v12. When I try to export the database, I get this error:
The element ExtAuth_Key10 is not supported in Microsoft Azure SQL Database v12. (Microsoft.Data.Tools.Schema.Sql)
I checked the related posts and saw that one recommendation was to update the DacFx framework. I've installed the latest I can find from Microsoft (16.5 at time of writing) as well as the SSMS (16.5.3 at time of writing). However I still get the same error.
It's very puzzling because this is an export operation, so it does not make sense to have something that is not supported in a V12 database in well, a V12 database.
What can be done to export this?
What element is ExtAuth_Key10? is that a master key?
The latest version of SSDT bundled wtih DacFX is RC 3 https://learn.microsoft.com/en-us/sql/ssdt/sql-server-data-tools-ssdt-release-candidate
Can you give that a try and let me know if you see any errors?

Visual Studio Team Services Build Failed - Database Project to Azure SQL

I have a build in Team Services (was Visual Studio Online), with one MSBuild step that is configured to build and deploy a DB project, using a publish profile. I can't seem to succeed in authenticating it. When I queued the Team Services build definition, I am able to build the DB Project and produce the .dacpac. However, come publish time and this error comes:
C:\a\1\s\Source\ShopDatabase\bin\Output\MyDatabase.publish.sql(0,0): Error Deploy72002: Unable to connect to master or target server 'mydb'. You must have a user with the same password in master or target server 'mydb'.
We're certain the user exists in the mydb and the master db in Azure.
Target: Azure SQL Database
DB project Target Platform: Microsoft Azure SQL Database
When I run the publish profile directly from Visual Studio, it works. But in Team Services build definition, it doesn't. I tried these as MSbuild arguments:
/t:Build;Publish /p:SqlPublishProfilePath="myproject.Dev.publish.xml" /p:Password="mypassword"
and this:
/t:Build;Publish /p:SqlPublishProfilePath="myproject.Dev.publish.xml" /p:TargetConnectionString="Data Source=myproject.database.windows.net;Persist Security Info=True;User ID=myuser;Password=mypassword;" /p:VisualStudioVersion=14.0 /p:Username="myuser" /p:Password="mypassword"
and this:
/t:Build;Publish /p:SqlPublishProfilePath="myproject.Dev.publish.xml" /p:TargetConnectionString="Data Source=myproject.database.windows.net;Persist Security Info=True;User ID=myuser;Password=mypassword;" /p:VisualStudioVersion=14.0 /p:TargetUserName="myuser" /p:TargetPassword="mypassword"
But won't work. Please help me T_T been searching the net for 6 hours already
This is a poor error message that likely disguises the real issue: you need to open up your firewall for deployment to Azure SQL DB. It's working from Visual Studio because you have your IP range enabled. The steps in this guide to building & deploying from VSO, specifically the post on deploying from VSO here, should help. it specifically covers how to open up the firewall as part of deployment.
An obvious answer (sometimes in hindsight!) but for future googlers the error You must have a user with the same password in master or target server
also happens if you are pointing your deploy to an instance that doesn't exist.
ie: Server was not found.
Fwiw, was generating a script from visual studio. Running as admin made it stop being a douche about this. What a waste of my life just now...
We recently had this issue and we resolved it by removing the #server-name from the end of the Server Admin Login value in the SQL DB Details section of the SQL Deploy VSTS Task. Some guides online say you need this but it appears something changed recently and it is no longer required.

Azure storage emulator unable to initialize

I've upgraded Azure Storage Emulator from 2.3 to 2.4. WAStorageEmulator.exe has been renamed to AzureStorageEmulator.exe but that's not the issue.
When I run
AzureStorageEmulator init -forcecreate
I simply get an error that Google returns with zero results:
Error: User-specified instance not found. Please correct this and re-run initial
ization.
Edit
I had to do a start and stop and then I was able to init. Because I had previous version of emulator installed I already have WAStorageEmulatorDb34 on my local SQL server instance. After I run init command I can see that no new database is being created (like WAStorageEmulatorDb42).
So I thought that the newest version may be using older DB. I then ran a query in MSSMS to check for existing blob containers and I can still see both containers I created on the older emulator containing blobs I added.
When I then accessed Development Azure Storage in Visual Studio it showed no containers whatsoever. So the new version apparently doesn't use old DB. But which one? And where is it?
Ok so I thought I'd run init one more time but with additional parameters to put DB on my SQL server instance:
AzureStorageEmulator init -server localhost -sqlinstance MSSQLSERVER -forcecreate
And then I get the aforementioned error. Again...
I'm running CMD as admin with elevated permissions.
Solution that eventually worked
Additional info
Azure Storage Emulator normally creates tables in the LocalDB storage. Depending on the emulator version these may be in various DB instances. You can check each storage emulator version's configuration in
%USERPROFILE%\AppData\Local\[AzureStorageEmulatorFolder]\*.config
Different versions have different folder names from DevelopmentStorage, WAStorageEmulator to latest (4.2) AzureStorageEmulator.
In this subfolder you'll find at least one config file that will correspond to your installed Azure storage emulator's version. If you open it, you'll see how it's configured and where it saved its tables. This is also true if you create initialization on any existing full SQL server instance.
The problem when I was trying to initialize my Azure Storage Emulator (ASE) is that I was also providing SQL server's instance which is the default one (MSSQLSERVER). I shouldn't be providing this information in the first place but only provide information about server
So the correct command line call is
AzureStorageEmulator init -server localhost -forcecreate
This created my database on my local SQL server. From here on, it's up to you how you'll migrate from an existing ASE database (if you already had one before) to the new one.
The issue I ran into is more or less an user error.
Azure Storage Emulator 4.6
Error : User-specified instance not found. Please correct this and
re-run initialization.
and
Resolution : I didn't have a windows authenticated login to my local
sql instance.

InstallShield 2012: Need to switch between sql scripts (sql server & oracle) based on property

The web applications I am installing can run against either a SQL Server or Oracle database. I need to be able to determine which database the user has (client is suggesting a property file) and then dynamically tell InstallShield whichSQL script to run, I know I can figure out how to determine which database is installed. My question is how do I configure the Feature/Component and tell InstallShield which script to use.
I don't have any Oracle servers available to me nor do I have the Oracle Instant Client. If I did, it seems I'd use a Basic MSI project included in InstallShield to build an Oracle Instant Client MSI and add it to my installer as a setup prerequisite. Kind of odd but I guess they couldn't get IBM / Oracle to play nicely.
So let's say I had all of that. I'd create a Sql connection that supported both MS and ORA SQL and build it. I'd run the installer with logging on and use the SQLLogin dialog to browse to a SQL instance and an Oracle Instance.
Then I'd look at that logfile and see if there's any evidence of the built-in InstallShield SQL custom actions setting a property that indicates the type and/or version of database server that it connected to. Hopefully something will surface because I didn't find anything in the documentation.
Once I figured that out, I'd use the property in a conditional expression so that the SQL scripts only ran on the type of database server they were intended.

Resources