When setting up backups within Azure, I get the following for the database portion:
No supported connection strings of type SQL Database or MySQL found configured in app.
This is a ASP.NET CORE 1.0 web app, and I have an instance of SQL Server and a SQL Database setup.
In the App Settings, it allows me to add connection strings. I have the following:
Connection String Name: ConnectionString
Value: Server=tcp:*******.database.windows.net,1433;Initial Catalog=Staging;Persist Security Info=False;User ID=*******;Password=*******;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
Type: SQLServer
Slot Setting: Unchecked/False
When navigating to the app, and choosing backups, my database is not showing and I get the message noted above. This is the same connection string I use within the app itself.
What could I possibly be doing wrong?
Related
I try to execute migration on remote, Azure SQL Server database.
Command:
dotnet ef --startup-project ./../Teamdare.Bot database update -e Production
Connection string in appsettings.Production.json:
"ConnectionString": "Server=tcp:project.database.windows.net,1433;Database=project;Persist Security Info=False;User ID=login#project;Password=projectPassword;"
The migrations work for local database and database credentials are correct as well - they work with previous app and by db GUI client.
The error:
One or more errors occurred. (No such host is known)
I tried some variations of connection string, this one seem to be most similar to one provided here: https://www.connectionstrings.com/sql-azure/
The thing was I was using wrong handler - I stayed with the one used for PostgreSQL database, which we use for local developement.
can someone guide me on this. I have to classic VMs(Application server and Database Server) on Azure. I have a asp.net web application connected to the database server and its working fine. But I needed to install a sql server 2014 on Application server and place a connection string for it in my web application. I have installed sql server 2014 on my application server and restored a database, but as soon as I place a connection string for the newly restored database in my web.config file, I get a 500 internal server error. As soon as I remove the connection string for newly restored database, the application works fine with the rest of the connection string.
I have a JBoss application that I copied from our production system running in local. This application connects to a SQL server database. I copied also this database in local and can browse it with MS SQL server studio. After a long fight with the users and TCP connections settings in the SQL server. Now I can see how the connection between the JBoss and my copy of the DB is done in local.
However, the problem I am facing is that I get lots of exceptions like
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid
object name 'table_name'.
Obviously the table_name exists in the SQL database as I can browse it, from SQL studio, using the same user JBoss is using to connect. One interesting thing is that when I browse the tables I see their names are in the form of: 'schemaName.table_name' so my only guess is that the schema is expected for the queries sent from JBoss. This is perhaps a problem with the configuration in the SQL because the JBoss is the same, the jars in the JBoss are also the same and the only thing that may be different is the creation of the users for the SQL database.
Does any one in the forum has any idea about what the problem could be or how can I specify the default schema for a certain user, so it is used in the JDBC connection?
To assign a user a default schema:
In SQL Server Management Studio go to Security / Logins / YourUser / UserMapping. There you can set the default schema for each database so you don't have to type the schema before the table names.
I have finished my first complete Orchard CMS website, developed locally in SQL Server CE. I want to publish it to Azure, but I am having difficulty with the WebMatrix Migrate function.
I have a SQL Server instance in Azure with an blank Orchard database already there (I want to use the replace option late in the migration to just nuke the existing db). I have added my IP to the server firewall rule.
In WebMatrix 3 I can connect to my Azure database using:
Server: myserver.database.windows.net
Database: orchard-db
Username: admin#myserver
Password: mypassword
I can view the tables in WebMatrix.
When I select my CE sdf file (Orchard.sdf) and click the Migrate button and enter the exact same details I get the following (can provide full stack trace if needed):
We were unable to connect using the connection details provided.
Microsoft.SqlServer.Management.Common.ConnectionFailureException:
Failed to connect to server . ---> System.Data.SqlClient.SqlException:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
---> System.ComponentModel.Win32Exception: The network path was not found
I'm really not sure what the issue is. I have tried various configurations of the details but nothing seems to work. If I connect as my database user (i.e. not a server admin) I get a different error:
The server principal "orchard_user" is not able to access the database "master" under the current security context.
I went and had something to eat, and now I can get to the next step of the migration. When I select replace database I get the following error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.SqlServer.Management.Common.ConnectionFailureException: Failed to connect to server . ---> System.Data.SqlClient.SqlException: Login failed for user 'admin'.
EDIT: I have come to the conclusion WebMatrix is not going to migrate my SQL Server CE database to my Azure SQL Server database. I installed SQL Server Express and migrated it to that, when I get home from work I will use the SQL Server Migration Assistant to move it to Azure.
I ended up installing SQL Server Express, using WebMatrix to migrate the SQL Server CE database to that. I then ran the Deploy Database to Microsoft Azure Database Wizard in SSMS to push my database to Azure.
I can't be certain, but it seems that WebMatrix can't migrate CE to Azure. According to Azure doco:
It is recommended that you always use the latest version of Management Studio to remain synchronized with updates to Microsoft Azure and SQL Database. Update SQL Server Management Studio.
I guess WebMatrix is behind or something. Hopefully this helps someone in my situation.
I have the following problem deploying our ASP.net Webproject. The Deployment just runs fine. I'm using TFS 2010 and deploy the application through the msbuild arguments (/p:DeployOnBuild=True etc.).
The problem I'm running into is the deployment of our database. At the moment I'm trying to use the Package/Publish SQL settings of the web project. The connection string for the destination database looks as follows
Data Source=SomeIP, 1433; Initial Catalog=MYDatabase; User ID=DeploymentUser; Password=PW;
So I'm trying to use an sql login to login to the sql server (sql server 2012, the respective user is dbowner) but every db deployment fails because msbuild always tries to login to the sql server with the buildservice account.
One solution might be to grant access to the sql server of the build account. Unfortunately this is not possible for us because the dbserver is not in our domain.
Any ideas how i can force msbuild using the sql login specified in the connection string?
Are you doing any of this:
"Import from Web.config
Finds connection strings in the Web.config file and enters their names into the Database Entries grid with "-Deployment" appended to them.
You can change the "-Deployment" suffix to "-Web.config" (for example, change "ConnectionStringName-Deployment" to "ConnectionStringName-Web.config") in order to specify that the connection string value in the Web.config file should be used for deployment. For more information, see Connection string for destination database later in this document."
and is it taking the connection string from your web.config?
http://msdn.microsoft.com/en-us/library/dd576376.aspx