Windows Azure - Mobile services, database connection - azure-mobile-services

I'm having trouble running sql commands to my database on Windows Azure. Previously I had no problems at all running my commands and stored procedures with SQL management studio until I added another database on the same server. I can still connect and even se all the tables and both databases i SQL management studio but I cannot run any commands.
If I use the online management portal I am able to run my SQL but not with SQL management studio.
select * from nextlabel.[Article]
and it gives the folowing error:
Invalid object name 'nextlabel.Article'.
Any ideas on how to connect properly to one of the databases or if I'm doing something else wrong?

Related

How to connect PostgreSQL Azure Cloud Server with SQL Developer?

Does anyone know if there is any chance to connect a PostgreSQL Azure Cloud Server with SQLDeveloper?
If someone knows this may you could explain to me how it works.
Or if it doesn't work which IDE should I use for it?
Thanks for helping me out!
You can connect azure PostgreSQL database using Azure Data Studio. I tried to repro this and below are the steps to connect using ADS.
Install Azure Data Studio and Click extensions on ADS and install PostgreSQL.
Click on Connections and in servers, click new connection.
Set Connection type to PostgreSQL and enter the connection details like Server name, username and password. Click connect.
Azure PostgreSQL DB is connected using Azure Data Studio.
Reference: MS document Quickstart: Connect and query PostgreSQL - Azure Data Studio | Microsoft Learn

Connecting to Amazon Redshift in Azure Data Studio via the Postgresql Connector

I've recently joined a company with a mixed set of databases that include a Redshift cluster and some SQL databases. I'd like to use a single IDE to access both for analytical reporting, so I don't have to switch between tools. I'm currently using workbench, which works, but it's not clicking with me.
I do like Azure Data Studio, but it's SQL Server and Postgres only. Given the similarities between Redshift and Postgres, I thought I'd see if I could connect using the Postgres driver.
I've installed the Postgres extension and can "connect" to the database. However when I try to explore the database using the tree view, I get the error message 'Cannot Expand Node'. When I run a simple query that works in workbench, e.g.
Select * from [server].[database].[table]
I get the following Error message:
Started executing query at Line 1
cursors can only be used within the transaction that created them.
Total execution time: 00:00:00.019
I know I'm trying to do something that shouldn't be done. And if I can't, I can't. But has anyone here managed to get a redshift connection going in Azure Data Studio?
FWIW, I've come across a GitHub Repository that may be a Redshift driver for data studio - but this looks like a clone of the Postgres driver, with no activity since march (not even renaming the 'Postgres' titles to Redshift)... and therefore I'm dubious.

Setting up environment for SQL queries

I know the basic syntax of queries but otherwise I'm a beginner with SQL.
I have an SQL file (.sql) and I downloaded a couple programs (pgadmin and sql workbench).
I have no idea how to get from where I am now to actually writing queries and finding information. How do I set up so I can actually import my SQL file and start writing queries?
pgAdmin is the default GUI for PostgreSQL.
SQL Workbench is a free, DBMS-independent, cross-platform SQL query tool.
Either way, you need to connect to a database to actually run queries. The DBMS can either run on your local machine or you can connect to a remote server - where you need access privileges of course.

SquirrelSQL access more databases in one SQL script

It's probably a trivial question but I wasn't able to find any solution. The following script:
use Database1
go
...
use Database2
go
...
works in SQL Server Management Studio but not in SquirrelSQL 3.5.0 (jTDS Microsoft SQL driver) - use: invalid SQL statement.
What's wrong? Should I enable something in Squirrel options? (Both databases are located on the same server.)

Unable to run my app again after opening my database with the Server Explorer

I successfully use EF4 to build my database from scratch. My database is an SQL EXPRESS database file. I can manage this one with Sql Server Management Studio. So far so good.
I noticed that if I open my database with the Server Explorer in Visual Studio, the next time I run the application I got errors.
I also noticed that a new log file has been created. So now I have 2 log files.
Below is my connectionstring:
<add name="DocumentManagerEntities"
connectionString="data source=.\SQLEXPRESS2008;Initial Catalog=DocumentManagerDB;AttachDBFilename=|DataDirectory|DocumentManagerDB.mdf;Integrated Security=SSPI;MultipleActiveResultSets=True"
providerName="System.Data.SqlClient" />
What's wrong?
Thank you very much.
That maybe because multiple applications are trying to use your database at once. You need to close one connection to open another.
This article notes that
SQL Server Express Edition allows only a single connection to an .mdf
file when you connect with a connection string that has User Instance
set to true.
Further more
When you connect to a local database project, Visual Web Developer
connects to the SQL Server Express Edition database with user
instances enabled, by default. For example, the following code example
shows a typical connection string used by Visual Web Developer to
connect to a SQL Server Express Edition database.