I have setup an Azure app service with a hybrid connection to my local on premise SQL Server 2014.
The connection is just fine I can ping it from app service using tcpping.
However I cannot make the connection to the database. The sqlcmd command fails complaining about the user / pass - but they are correct.
I am using this command
sqlcmd -S <servername> -d Sample_Dev -U xxx -P xxxx -I
I am getting this error:
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login failed for user 'xxx'
I have searched online for that error and I am unable to make it work. Can you please help me on that ? I really appreciate your help.
Thanks
I was able to make it work by creating a database user directly on mssql and not using AD.
I am new to SAP HANA database. I have successfully hosted the SAP HANA express database on cloud server. I have created a database and I am able to query it for the CLI.
However I have trouble connecting it from eclipse have spent two days on the same.
I am following https://developers.sap.com/india/tutorials/hxe-howto-eclipse.html tutorial.
Please Note :
I am able to connect to server using RDP and putty so the IP address is correct
I have started the database using command:
hdbsql -i 90 -d HXE -u SYSTEM -p SAPhxe123
why is eclipse taking port 39015 by default in last screenshot? is this the issue or can we change this.
Any help here would be much appreciated!
Remove the port and just keep HXE for the tenant.
39015 is the right one for the first tenant in an AWS or Azure VM (39017 is for Docker).
Try connecting to the system database first. If that works but the tenant doesn't, check this: https://developers.sap.com/tutorials/hxe-gcp-eclipse-tenant-connect.html
If that doesn't work: https://blogs.sap.com/2018/02/24/troubleshooting-connection-problems-for-hana-express/
Unless you explicitly closed port 22, ping should respond.
Also a reminder that HANA studio is part of a set of deprecated tools so if you are looking to learn native development, I would recommend going for XS advanced.
Could you please refer to following document: https://developers.sap.com/tutorials/mlb-hxe-tools-sql-eclipse.html
There the tenant database connection is created as follows
The host server (IP) is maintained in hosts file
Additionally the tenant db is only provided as HXE without port number
If you running the HANA server as a container.
Go in to the container "docker exec -it bash
HDB info
What is the port that you can connect to (If the Port is 39041 for example)
Rerun your container mapping your docker run command with -p:. That is (-p 3901:39015).
Essentially what is broken is that the port Eclipse HANA studio is trying to connect to is not mapped to the HANA port that is listening on.
You have to map the PORT that HANA is listening to Host PORT 39015.
If this is a cloud env you have to do the appropriate port forwarding.
Tested this and it works now.
For tenant database, I think it is enough to use HXE
Did you try to change the host name by adding the port information after IP address?
When your HXE instance was created on AWS, did you assigned it the default security group or did create one based on "Seller settings"?
This is really important because without this custom security group you won't be able to access your instance from the outside world.
Please refer to the following tutorial for more details: https://developers.sap.com/canada/tutorials/hxe-aws-setup.html
I want to access database mongodb on the server staging by putty. But i'm still confused to setting it
Look at this :
What needs to be set there?
I want a full explanation
Or maybe there is another better way to access mongodb?
With Putty you can create a SSH session on the server on which the MongoDB server is running, so you can't use Putty directly to connect to your MongoDB server. You can do the following:
First Solution
Use SSH to connect to your server where the MongoDb is running (paste in your hostname or IP adress in the Putty Window and connect to Port 22)
Login with your server credentials on this server
Use mongo command line tool on the server and connect to the MongoDB server
Second solution (therefore your MongoDB port has to be accessable from the internet and you need the mongo CLI tool on your machine)
Open a CMD on your Laptop/Desktop PC
Use mongo yourMongoDbServerHostname:Port/dbname -u dbuser -p dbpassword and you create a connection to your remote MongoDb server
If you are looking for a Mongo GUI client, have a look at: https://robomongo.org/ or https://www.mongodb.com/products/compass
If thats not working, please provide further information about the MongoDb server.
Context: I am trying to build a development SQL Server that I can continue to learn SQL on and use Microsoft SQL Server Management Studio (SSMS) to access on a Windows PC.
So I have the AdventureWorks database sitting on a Docker Container for MS SQL Server 2017 running on a DigitalOcean Ubuntu 16.04 box. From my Mac I can remote SSH in to the server, access the container and query the database.
However I wish to use SSMS on my Windows PC and am unsure how I begin to connect to the remote box. In the picture below, there are no options to specify an SSH key or to even login in to the Ubuntu box, only to access the SQL server.
Is this even possible?
connect via SSMS using the public IP address, followed by comma separator and then the port (xxx.xx.xx.xxx,port)
You'll also need the sa credentials to make this work.
In your case, Server Name input will become Server IP, port#
No need of ssh, you just need to expose SQL Server service to the internet.
When Using SQL Server Management Studio to connect to the docker container on local machine, you can use localhost ip. In that case Server Name input will become 127.0.0.1,port#
Following instruction of this site solved it for me on Windows Containers:
https://www.sqlshack.com/sql-server-with-a-docker-container-on-windows-server-2016/
It was possible to connect to SQL Server instantly from SSMS.
Give it a try if this is also working on Linux containers with this command:
docker run --name mssqltrek-con1 -d -p 1433:1433 -e sa_password=My$eCurePwd123# -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer
After running this you can retrieve the correct ip with:
docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" mssqltrek-con1
In my case it was the Cisco VPN that was blocking the host to connect to container IP. I had to uncheck the "Cisco Any Connect Network Access Manager" as shown in the image below for it to work. It ensures that the VPN no longer manages the connection.
You can connect to SQL docker server
Using IP of Machine on which docker image is hosted,port
IP_Of_Machine,Port
Provide User - sa (default) and password.
you can also do it command>
docker exec -it <container_id|container_name> /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P <your_password>
This isn't exactly the same problem as the OP's but I created a sql docker container and then couldn't log in to it from SQL Server Management Studio. It turned out that the sa password I used wasn't secure enough. Once I deleted my container and recreated one with a more secure password it let me connect to it from SQL Server Management Studio. If you do not specify a strong enough password it still creates the container OK - you just can't log in to it!
Hopefully this will save someone some time.
I benefited from the answers on this page, however, i had to go through my own tweak. for some reason, in my case, it didnt accept localhost,1433 but it did accept 127.0.0.1,1433
In my case I was using docker-compose and was unable to connect. I fixed this by explicitly specifying the port in the docker compose file.
mysqldb:
ports:
- "1433:1433"
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=SuperSecretPassword!23
image: registry/mysqlimage
I also faced same issue when I try to connect through SSMS, even I tried with localhost,1433 it doesn't help me out.
enter image description here
After some R&D I found the way to solve it
Open Kubernetes which will be installed as part of docker toolbox
(mine was win 10 home which will not support hyper-v)
click on sql container which will be in left side of app
copy the IP address which will be in right side of app
use IP address with port like XXX.XXX.XX.XX,1433 along with credentials in SSMS
enter image description here
I am just wasting too much time with this issue. My final goal is to change the collation of the Amazon RDS DB from latin to utf8. To accomplish that, there is a lot of information out there, and yet, non of that has worked for me.
First of all I tried to prompt mysql:
mysql -h ###.###.us-west-1.rds.amazonaws.com -p --port=3306
but it raise an ERROR 2003 (HY000): Can't connect to MySQL server on '###.###.us-west-1.rds.amazonaws.com' (60)
If I try using telnet:
telnet ###.###.us-west-1.rds.amazonaws.com 3306
Trying 54.###.##.##...
telnet: connect to address 54.###.##.##: Operation timed out
telnet: Unable to connect to remote host
Looking at the aws.docs says that I have to authorize access to my cache cluster. But I could't get that far. I didn't know what to put on the Port rangeand Source by trying to add a new Custom TCP rule for my default security group. So I ended following this tutorial using mysqldump but I have the same connection problem as using >mysql
Any help would be really appreciated!