Skip to main content
8 votes

Connect to SQL Server over Internet

The recommended way to do this is to set up a VPN between the two sites. The steps to do this vary depending on the particular firewall/router being used. If a VPN cannot be used, the following ...
7 votes
Accepted

When executing a command via xp_cmdshell what user issues the command to the system?

From xp_cmdshell (Transact-SQL) in the product documentation: The Windows process spawned by xp_cmdshell has the same security rights as the SQL Server service account. When it is called by a user ...
tpet's user avatar
  • 1,214
4 votes

Using postgres database from another computer

Read the article Configuring PostgreSQL to Accept Connections From Computers on Your Network where it is explained with screen shots.
Marco's user avatar
  • 3,710
4 votes

Command line tool / script to backup a remote SQL Server database to local disk

There are two common ways to do this: Easy way - with "normal" database backups - when you run the BACKUP DATABASE command, the SQL Server service on the remote box needs to write the backup to a ...
Brent Ozar's user avatar
4 votes

Cannot remotely access PostgreSQL on EC2 instance

(self-answering in case someone else has these same symptoms!) Then I stumbled upond Shubham Dipt's post on "PostgreSQL on EC2 (Ubuntu) in AWS", making me aware of the "Security group" layer AWS ...
rikb's user avatar
  • 201
4 votes
Accepted

Is it possible to force a query to ignore the server option "remote proc transaction promotion" so it doesn't promote remote proc transaction?

Is there a query hint or some way to force it to not promote a remote procedure transactions? No there isn't, but if you're currently doing something like this: INSERT #Temp EXECUTE schema_name....
Paul White's user avatar
  • 86.4k
3 votes
Accepted

Connecting to mySQL from 2 different machines

So what you can do : If you want to change IP from 192.168.1.4 to 192.168.1.3 then you can update mysql.user table Update mysql.user set host =' 192.168.1.3 where host='192.168.1.3' ; Flush ...
3 votes

Unable to remotely connect to Postgresql 9.5 instance

Turns out my hosting provider moved the server behind a managed firewall without notice.
Nel's user avatar
  • 61
3 votes

Foreign Key (references) constraint on PostgreSQL Foreign Data Wrapper?

The PostgREST team gave a potential solution: faking the foreign key constraints. They read the pg_catalog.pg_constraint table to get this information. The idea was that I could manipulate the ...
odinho - Velmont's user avatar
3 votes

Command line tool / script to backup a remote SQL Server database to local disk

Your requirements require the use of the following two tools: sqlcmd (SQL Server Built-In CMD Tool) psexec (SysInternals Remote Execution Tool) SQLCMD First you have to have a valid SQLCMD command. ...
John K. N.'s user avatar
3 votes

Command line tool / script to backup a remote SQL Server database to local disk

This sounds like the perfect use of a newer tool by Microsoft, mssql-scripter. This open source, python based bad boy should be able to do everything you need. Warning: it is still technically in ...
LowlyDBA - John M's user avatar
3 votes

SQL Server Management Studio - Debugger buttons greyed

You need to open the network ports & firewall ports between your desktop running SSMS, and the remote computer. Just generally speaking, though, I'd highly recommend against running the debugger ...
Brent Ozar's user avatar
3 votes
Accepted

PostgreSQL error: remote query result rowtype does not match the specified FROM clause rowtype, on remote function call

To understand what's going on, first check what is being done on the remote: SELECT _test1(); _test1 ──────── (1,2) This does return a record, not two integers. When the dblink() call reports ...
András Váczi's user avatar
2 votes

can't connect to remote postgresql database

I do not agree to use host all all 0.0.0.0/0 md5 if your database is exposed to the internet. In my project postrgres is in the cloud and it is used from the backend. I need to connect directly to ...
Stefano Zabucchi's user avatar
2 votes

Using postgres database from another computer

Yes, two things that need to happen: Your database must be listening on a port and ip to external connections. For this you need to modify postgresql.conf, you may choose to use the new-ish method of ...
Evan Carroll's user avatar
  • 63.7k
2 votes

How to connect to a SQL Server installed on Windows Server 2012 running on VPS?

In addition to using SQL Server Configuration Manager to enable TCP/IP connections, you need inbound tcp port 1433 and optionally udp port 1434 open at the firewall for SQL Server to accept inbound ...
Hannah Vernon's user avatar
  • 70.2k
2 votes
Accepted

Is there a server option which limits the amount of rows returned by a remote query?

You can use OFFSET and FETCH to effectively page through results e.g. SELECT * FROM MyTable ORDER BY MyColumn OFFSET 100 FETCH NEXT 100 ROWS ONLY Helpful article here... Article About OFFSET FETCH ...
Ollie's user avatar
  • 738
2 votes
Accepted

Connect to SQL Server on Linux over the network

1st you need to identify your VM IP address, supposing it is 10.1.1.10 sqlcmd -S 10.1.1.10 -U SA -P "YourPassword" Either check connectivity between your host and your VM using ping 10.1.1.10 and/...
Rogerlr's user avatar
  • 441
2 votes

Connecting to server which located remotely throws timeout exception

In your manual procedure you state that you specify "name" in the server name, not an instance. However in your connection string you specify Data Source =tcp:<IPAddress of RDP Machine>\<...
Tom V's user avatar
  • 15.7k
2 votes

How to insert data from a local MSSQL db table to a remote MSSQL db table using WCF application coded in .NET

I can see four ways you could accomplish this: 1. Linked servers You can establish a linked server on both the local and remote SQL Server, which will allow you to reference tables not only on the ...
Daniel Hutmacher's user avatar
2 votes

PostgreSQL error: remote query result rowtype does not match the specified FROM clause rowtype, on remote function call

In my scenario, I get exactly the same error. ERROR: remote query result rowtype does not match the specified FROM clause rowtype I have a VIEW using dblink and initially I create a VIEW using "...
André Carvalho's user avatar
2 votes
Accepted

How to insert into temp table on Server A results from dynamic SQL open query stored proc call to remote server B via Remote Query showplan operator?

I noticed in the execution plan, it's using a Remote Scan showplan operator. I know when possible the Remote Query showplan operator is more efficient... There's nothing inherently inefficient about ...
Paul White's user avatar
  • 86.4k
2 votes

Allow user to create databases on server and to see only the databases that are created by him, without creating login first

Instead of making Logins for each user, you should use an Active Directory Group that each user is a part of (e.g. DOMAIN USERS), and assign permissions directly on that AD Group or on a Role you can ...
J.D.'s user avatar
  • 38.1k
2 votes

Enable remote access to database via proxy server

Have you thought of something like humongous.io (disclaimer I'm a co-founder)? It's an online GUI for MongoDB. You whitelist one IP address (Humongous' server) and your team can access MongoDB through ...
Kamagatos's user avatar
  • 121
1 vote

TNS connection forward

You tried ssh MachineD -L 15219:MachineB:15220 -L 15220:MachineA:1521 this did not work but you think in the right direction, you want to join two tunnels. login to MachineD and make a tunnel from ...
miracle173's user avatar
  • 7,692
1 vote

How to Backup Remote Database to FTP server

You have two processes here that are discrete, Dumping the database. Moving the dump to an FTP server. There are numerous ways to accomplish both of these. You'll have to ask a more specific ...
Evan Carroll's user avatar
  • 63.7k
1 vote

Unable to connect to SQL Server 2016 remotely

should i construct the server name as tcp:ipaddress\instance, 1433 Absolutely no. All that the network library needs to connect to SQL Server instance is it's IP + port. When you are using default ...
sepupic's user avatar
  • 11k
1 vote

Read MS Sql query high latency w.r.t. Remote Query

Create a copy of the table into a #temporary table on the server you are running the query on, then run the query based off the temp table. I am not an expert on why certain queries run slower over ...
Anthony Genovese's user avatar
1 vote

Oracle Database Remote Connection

Your connection string is wrong. With easy connect you need to provide a hostname and servicename/SID. In your case you would provide sqlplus user/"SomePass"@HOSTNAME:$PORT/servicename If you want to ...
jmk's user avatar
  • 444
1 vote
Accepted

How to replicate schema changes from local database to a remote?

Next time, click the Generate Scripts button and then execute the generated SQL script at both the local and remote databases. For the changes you made locally, that you now want to replicate to the ...
John Eisbrener's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible