Connect Aurora Severless from tableau desktop and tableau server - ssh-tunnel

It's a follow up question that I asked earlier here on Stack Overflow
Not able connect Amazon Aurora Serverless from SQL client
I found a cool hack that is working perfectly for my development purpose with some tweaks and I know I should not use this on my production environment.
So as we know Aurora Serverless works only inside VPC. So make sure you are attempting to connect to Aurora within the VPC and the security group assigned to the Aurora cluster has the appropriate rules to allow access. As I mention earlier that I already have an EC2 instance, Aurora Serverless and a VPC around both. So I can access it from my EC2 but not from my local pc/ local sql client. To fix that I did below two steps.
1. To access from any client(Navicat in my case),
a. First need to add GENERAL db configurations like aurora endpoint host, username, password etc.
b. Then, need to add SSH configuration, like EC2 machine username, hostip and .pem file path
2. To access from project,
First I create a ssh tunnel from my terminal like this way,
ssh ubuntu#my_ec2_ip_goes_here -i rnd-vrs.pem -L 5555:database-1.my_aurora_cluster_url_goes_here.us-west-2.rds.amazonaws.com:5432
Then run my project with db configuration like this way test.php,
$conn = pg_connect("host=127.0.0.1 port=5555 dbname=postgres user=postgres password=password_goes_here");
// other code goes here to get data from your database
if (!$conn) {
echo "An error occurred.\n";
exit;
}
$result = pg_query($conn, "SELECT * FROM brands");
if (!$result) {
echo "An error occurred.\n";
exit;
}
while ($row = pg_fetch_row($result)) {
echo "Brand Id: $row[0] Brand Name: $row[1]";
echo "<br />\n";
}
So what is my question now?
I need to connect my aurora serverless from tableau desktop and tableau server. For tableau desktop I used the same ssh tunneling and it works but how do I do it for tableau server?

Tableau Server does not support centralized data sources. You need to connect Tableau Desktop to your data source, and publish it to Tableau Server when you want to expose the data through the UI.
https://community.tableau.com/thread/111282

Related

RDS License Needed clarification

just want to know want do I need to license with RDS CAL based on the work flow below. We have this Server A where users connect to it to select the application they want to access by login their credentials. Once the users was approved on Server A it will communicate with Server B (where application
and RDSH also installed) to server the application needed by the user. Server A uses it's own account when communicating with RDSH server. My question is do I need RDS User CAL for those users or just the RDS Device CAL is enough?

On Prem to Cloud with Data Factory

I have one On Prem Oracle database and one Azure SQL Database and want to use a Copy Data activity to transfer this data.
I have now created a Self Hosted IR for the Oracle database, and I am able to connect to it and preview data from Data Factory editor:
I have a Azure SQL Database that I want to recieve data, and it is set up with AutoResolveIntegrationRuntime, with Connection successful. I am also able to preview data from this database:
When I try to run this Copy Data activity I get following error message:
ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot connect to SQL Database: 'sqlsrv', Database: 'database', User: 'user'. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.
Based on all Docs/Tutorials I have read this should not be failing. I have tried to open up the SQL Server to allow all IP adresses in firewall rules.
Any ideas what I might be doing wrong here?
Since the integration runtime is a bridge across on prem and cloud , you need to check whether you are able to access the onprem database and the Azure SQL database through the VM in which the IR is installed.
The VM hosting the IR should be able to access both the source and sink for the copy activity to be successful in case if either of source or sink is using the self hosted runtime.
So the issue is not w.r.t Azure SQL database but in the VM hosting the IR

Is possible to connect to RDS Oracle DB instance with SQL developer?

I'm trying to connect into my mac with the endpoint that AWS give me but i can't.
Yes, You can.
These are the AmazonRDS settings.
and this is the SQL Developer connection window
database host name should be the AWS endpoint & SID should be the AWS DB Name.
You can connect to database instance in RDS by using the endpoint and the credentials associated with the rds instance
Refer the below link for guidance:
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.Oracle.html
Also ensure that the security group associated with the RDS instance has appropriate port open for oracle connection.

How to connect to Redshift from RDS(sqlserver) via Linkedserver

I have created my RDS (sqlserver instance) and it is working fine when i connect from sqlserver express. Now i want to connect to Redshift cluster via the client. Both cluster are under VPC and i have already set up the security group for both.
I have created the linkedserver in my sqlserver express as follows.
EXEC sp_addlinkedserver
#server=N'Staging64', -- Linked Server Display Name
#srvproduct=N'test', -- Default to SQL Server
#provider=N'SQLNCLI', -- Use SQLNCLI
#datasrc=N'52.167.514.101', -- FQDN of remote server running redshift
#catalog = 'test';
EXEC sp_addlinkedsrvlogin #rmtsrvname = 'Staging64' -- Linked Server Display Name
, #useself = 'false' -- Do not masquerade
-- , #locallogin = '' -- Commented out to force all local users to use linked login
, #rmtuser = 'dev' -- Remote user name
, #rmtpassword = 'dev2015'; -- Remote password
The linked server is created without any issues but when i execute this query:
SELECT TOP 10 * FROM Staging64.test.stage.dw_viasatsubscription;
it throws this error message:
OLE DB provider "SQLNCLI11" for linked server "Staging64" returned message "Login timeout expired".
OLE DB provider "SQLNCLI11" for linked server "Staging64" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
Msg 53, Level 16, State 1, Line 25
Named Pipes Provider: Could not open a connection to SQL Server [53].
I have tried to google a lot but it has been in vain.
Any feedback will be appreciated.
Amazon Redshift can export data to Amazon S3 with the UNLOAD command:
Unloading Data to Amazon S3
UNLOAD command
This data can then be imported into SQL Server, as with any CSV data.
There are some systems can assist with this process (eg Amazon Elastic MapReduce, Amazon Data Pipeline), but they are probably overkill for your situation.

AWS Elastic Beanstalk: No data received: Unable to load the webpage

I just deployed a .NET application using SQL Server via Elastic Beanstalk.
It seems like my newly deployed application can't connect to my database. I just followed this video: http://www.youtube.com/watch?v=z-N0z5K_WFI (except I encountered issues during deployment where I had to untick incremental deploy)
I was able to connect to the db using SQL management studio. I also tried running the app locally while connecting to the amazon RDS db and has success. After deployment, checking the site and trying to login/register, I get this error:
No data received
Unable to load the webpage because the server sent no data.
Here are some suggestions:
Reload this webpage later.
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
The only thing in my mind right now is that my EC2 or application can't connect to the Database.
Is this a CIDR issue?
Couple of things to consider -
Is the port for your RDS database instance being blocked?
When you deployed your app, you should have seen a page in the wizard asking if you wanted the EC2 security group for your deployed Elastic Beanstalk instance to be added to the RDS security group for your database instance. You need to checkmark the relevant RDS security group too.
There's also an updated video from last year's AWS re:Invent conference that shows deployment of a SQL Server based app to RDS/Elastic Beanstalk - http://youtu.be/5N352oeYmqE
Hope this helps.

Resources