List schema and tables on SQL Server remotely - sql-server

We have a SQL Server but access is limited so we can't access the server directly. The only available access is to use another server running on CentOS Linux where I can SSH to it and then from this intermediate server to further connect to this SQL Server.
I am looking a simple way to list databases and schema on the SQL Server.
What would be the command to do the above from this Linux server, assuming one has the IP address and credentials of the SQL Server.

Related

SQL Server linked server to a Microsoft Dataverse environment

I would like to connect from an on premise Microsoft SQL Server environment to a Dataverse environment in Azure. I want to be able to download data from Dataverse to SQL Server. I would like to know if i can use linked servers to do this and what are the correct properties for the connection. Thanks!

How to access SQL Server Analysis Service Instance remotely that is from another computer?

I am stuck in two problems mentioned below::
1. SQL Server Management Studio(SSMS) is installed on my local machine. Default instance of SQL Server Analysis Services (SSAS) is running and its default port is 2383. Now, I want to access that SQL Server Analysis Services(SSAS) instance from another computer which is on different network. I access database Engine instance from another computer using SQL Server authentication. I did this by following the procedure like port forwarding, defining inbound rules in windows firewall setting etc. I followed the same procedure for accessing SQL Server Analysis Services(SSAS) instance but SQL Server Analysis Services(SSAS) is not supporting SQL server authentication mode. How can I do this?
2. SQL Server Analysis Services instance is running on my local machine. I want someone from another network to deploy a cube on my local machine using SQL Server Data Tools (SSDT) via internet. How can he access my analysis service database? What are the settings I must do to allow him to connect to my Analysis Services database?
Thanks

How to connect to a MS SQL database using MS Server Management Studio and ODBC

I need to connect to a MS SQL Server, using MS Management Studio, the hosting company only provided me the ODBC connection for this database, but I can see it only connecting using VPN on the Server.
My question:
- Can I connect to the DB using MS MS Management Studio through ODBC?
I usually use SQL Server Authentication or Windows Authentication.
Thanks for your time.
I don't believe that you can connect directly to the odbc connection in SSMS, although you can connect to a SQL server, and add a linked server to the odbc connection. You would open the server objects -> Linked servers -> Add
From the provider list choose Microsoft OLE DB Provider for ODBC Drivers
I think the details will vary depending on if this is a System DSN or File DSN but here's the msdn. http://msdn.microsoft.com/en-us/library/windows/desktop/ms675326(v=vs.85).aspx
Then you can query against the data source by opening a new query against your sql server and using the full four part name i.e.
SELECT * FROM ServerName.DatabaseName.SchemaName.TableName
Another option would be using VS 2012 to add a Data Connection to the ODBC data source. This would be the cleanest although it doesn't directly address the question.
Possibly. The ODBC connection will contain all the information you neeed - the server address or IP address, a user name and a password.
But there may be a firewall on your host preventing such connections.
Try it.

SQL Server Express usage with Pentaho (or any non-microsoft product)

I'm trying to connect a local SQL Server database to an ETL utility called Pentaho. Pentaho very easily connects to full versions of SQL server without issue.
I've set mixed mode authentication and created a sql server account for the sql server express instance that can be used to login through SSMS.
When I try to log in via Pentaho, I get errors about it not knowing what the server is, or the server not responding. I've tried {localhost, myip, localhost\SQLEXPRESS, myip\SQLEXPRESS, just SQLEXPRESS} as the server name (and SQLEXPRESS is the instance name).
I know I've had trouble connecting other programs to SQLEXPRESS databases in the past. Can someone tell me why it acts different than when using a full install of SQL Server and how I can get around these differences?
If SQL Server Express is on a different server, have you enabled TCP/IP protocol?

Difference between different datasources

Him
Please explain what is the difference between different datasources for SQL (shown in the pic.)
I mean difference between Microsoft SQL Server and Microsoft SQL Server Database File
Connecting to Microsoft SQL Server means that you are establishing a network connection to a SQL Server -- the database engine is running either on your machine or remotely and you are using the SQL Server as a service and are connecting to it. That server has the data and you just use a protocol to request operations to be performed.
Connecting using a Microsoft SQL Server database file (MDF) means that you want to use a database file and have a running SQL Server engine running locally use that MDF file. So, if you have SQL Express on your machine, when you create a connection to a MDF file, you're essentially using the SQLExpress engine on your machine to serve up that MDF file (and the database contents) to you.
I admit I almost always connect to a SQL Server, as I'm not guaranteed to have the MDF file available in all environments. Plus, I usually don't install SQL Express.
That's how I understand the difference. Hope this helps!
Maybe the "Microsoft SQL Server Database File" option refers to manually using SQL Server's files (*.MDF), whereas the Microsoft SQL Server refers to connecting to a full-blown SQL Server ?

Resources