Connecting Prisma to Azure SQL Database - sql-server

I am trying to connect Prisma to an SQL Database in Azure. I noticed that my Azure SQL Database connection string does not look anything like the connection strings in the Prisma getting started document.
Server=tcp:mufdatabase.database.windows.net,1433;Initial Catalog=muf;Persist Security Info=False;User ID=muf;Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
Whereas Prisma lists MS SQL Server connection string example as
sqlserver://localhost:1433;initial catalog=sample;user=sa;password=mypassword;
I thought Azure SQL Database was just an SQL Server so why would the connection strings be so different? Does Prisma support Azure SQL Database?

I think it does according to this
If we look at your line, the prisma configuration should look like this
sqlserver://mufdatabase.database.windows.net:1433;initialCatalog=muf;integratedSecurity=false;username={your username};password={your password};trustServerCertificate=false;

Related

My SQL Server database is not showing for Azure backups?

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?

Can't connect to Visual Studio 2015 SQL DB using Excel?

!
I've tried using ADODB connection string and also in the Excel Data Connection Wizard.
I'm getting this error:
[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access is denied.
I can see the server created in Visual Studio with its databases fine, no worries, in SQL Server but not connect in Excel. I can connect in Excel to databases created in SQL Server but not those created in VS (2015).
It's seems like a server issue rather than database one but here's the connection string's anyway:
This works fine for database's created in SQL Server:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Data Source=DESKTOP-ODUI05F\MSSQL2012;Initial Catalog=MyDatabase
but the same string generates the above error when connecting to the server/database created in VS.
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Data Source=(LocalDB)\MSSQLLocalDB;Initial Catalog=aspnet-Widly-20160823125202
The server name is: (LocalDB)\MSSQLLocalDB.
The database is generated in VS using EF.
Please help - driving me nuts.
Thank you, Simon
Solved!
Followed the solution linked below.
Even though it's an MSSQL Server DB you're trying to connect to, using Excel Data Connection Wizard you have to ignore SQL Database connection option and choose "Other/Advanced" instead. I recorded it in a macro which produced all the vital parts for the connection string as follows:
How to connect to localDB in Excel
Provider=SQLNCLI11;
Integrated Security=SSPI;
Persist Security Info=False;
Data Source=(LocalDB)\MSSQLLocalDB;
Initial Catalog=aspnet-PTL-20160827031609
Besides doing the dishes this is my biggest and only achievement today! :)

Umbraco Database Connection Credentials

Where can I find the database credentials of my umbraco database?
In web.config there is just the following line:
<add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />
Which provides insufficient information...
Your connection string clearly shows that you're using default SQL Server CE database (Umbraco.sdf). You can find the Umbraco.sdf file in the /App_Data folder.
Depends on your requirement you can convert the SQL Server CE database to SQL Server Express or open up your solution in Webmatrix to see database tables.
You can find more information on conversion here https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/53818-Convert-Umbraco-SQL-CE-database-to-SQL-Express
To view database tables from webmatrix, you need to open up your solution and click the tab called databases.
umbracoUser is the table where you can find users.
It seems that you are using SQL Server CE and not a SQL Server instance

How can I set up a remote connection to a SQL Server 2012 database in the Cloud?

I have connection strings that look like this after I added a few line feeds so it's easy to read:
<connectionStrings>
<add name="DefaultConnection"
connectionString="Data Source=xxx.database.windows.net;
Initial Catalog=database2;
Persist Security Info=True;
User ID=xxx;
Password=yyy"
providerName="System.Data.SqlClient"/>
I have two tables one in a local database and one in database2. The tables are in the dbo schema.
If the table in the remote and local databases are both called USERDATA then how can I move data
from my local to remote database. I assume I need to make a remote connection but is that possible
if the database is store in the cloud like this? If possible can someone tell me how I can set up
this remote connection? I have SQL Server Management Studio so I can open a SQL Query window. I am just not sure how to specify the remote connection and if that is the best way to do it.
You can use like this:
INSERT INTO [database2].[dbo].[USERDATA]
SELECT tn.ID, tn.NAME
FROM [database].[dbo].[USERDATA] as tn
or you can use SSDT (Sql Server Data Tools) to migrate your schema and data to Sql Database on Azure.
There are multiple ways of handling this. Two simple ones of the top of my head are:
1) If you just need to transfer data for ONE table your best bet is to use a program called 'bcp' that comes with your SQL Server tools.
bcp allows you to export or import data (using in or out parameters) to a file and very quickly. You can simply use the bcp tool, export a table into a flat file, copy it over to the SQL Server in the cloud (using remote deskop or sharing the file in Azure storage or any other web-based storage) and then import the table again.
2) Alternatively, if you have access to SQL server in the cloud from your premise machine (ie: the firewall is open) and you're to run SSIS, you can connect both of the SQL servers within your SSIS package and transfer the data via SSIS

SQL Server Connection

We have an Excel file from which it retrieves information from a SQL Server DB.
Here is a snippet of the code:
Provider=SQLOLEDB.1;Persist Security Info=True;User ID=mjone;Initial Catalog=pff_db;Data Source=....
My question is that for mjone, how is he able to get connected to the SQL Server DB? I am looking at the SQL Server Management Studio and do not see any mjone used.
Check these:
Check the users under `pff_db`
Check global SQL Server Users
Check if that user exists in the server (Windows)

Resources