remote-server

The right connection string for Remote SQL server for C#

谁说胖子不能爱 提交于 2019-12-03 04:36:38
问题 I just want to know the right sql connection string for a remote sql server express edition. This is what I got but I got some problems SqlConnection cs = new SqlConnection(@"Data Source=(IP Address)\PC-NAME\SQLEXPRESS,1433;Network Library=DBMSSOCN;Initial Catalog=dbase;User ID=sa;Password=password"); I got this error in my C# debugger: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify

How to execute a shell script on a remote server using Ansible?

南楼画角 提交于 2019-12-03 02:10:30
问题 I am planning to execute a shell script on a remote server using Ansible playbook. test.sh: touch test.txt Playbook: --- - name: Transfer and execute a script. hosts: server user: test_user sudo: yes tasks: - name: Transfer the script copy: src=test.sh dest=/home/test_user mode=0777 - name: Execute the script local_action: command sudo sh /home/test_user/test.sh When I run the playbook, the transfer successfully occurs but the script is not executed. 回答1: local_action runs the command on the

pg_dump postgres database from remote server when port 5432 is blocked

心已入冬 提交于 2019-12-03 01:28:35
问题 I'm trying to pg_dump a SQL database on a remote server in our DMZ. There are 2 problems. 1) there is n't a lot of space left on the remote server so the normal command run to locally backup the database pg_dump -C database > sqldatabase.sql.bak won't work due to space issues. 2) I also can't run the other version of pg_dump command to dump database from remote server to local server using: pg_dump -C -h remotehost -U remoteuser db_name | psql localhost -U localuser db_name as the server is

How do I push a local Git branch to master branch in the remote?

这一生的挚爱 提交于 2019-12-02 23:59:33
问题 I have a branch called develop in my local repo, and I want to make sure that when I push it to origin it's merged with the origin/master. Currently, when I push it's added to a remote develop branch. How can I do this? 回答1: $ git push origin develop:master or, more generally $ git push <remote> <local branch name>:<remote branch to push into> 回答2: As people mentioned in the comments you probably don't want to do that... The answer from mipadi is absolutely correct if you know what you're

Use SSH to start a background process on a remote server, and exit session

浪尽此生 提交于 2019-12-02 23:25:52
I am using SSH to start a background process on a remote server. This is what I have at the moment: ssh remote_user@server.com "nohup process &" This works, in that the process does start. But the SSH session itself does not end until I hit Ctr-C. When I hit Ctr-C, the remote process continues to run in the background. I would like to place the ssh command in a script that I can run locally, so I would like the ssh session to exit automatically once the remote process has started. Is there a way to make this happen? The "-f" option to ssh tells ssh to run the remote command in the background

Connecting to remote redis server

妖精的绣舞 提交于 2019-12-02 22:13:01
I wanted to make some changes in redis.conf, so that whenever i type redis-cli it connects me to redis installed on remote server. I know that we can connect to redis installed on remote server by : redis-cli -h 'IP-Address-Of-Server'. But actually, I have some bash scripts and in those scripts i have used redis-cli at many place. So instead of replacing redis-cli with redis-cli -h 'IP-Address-Of-Server' in each file, I wanted to somehow change redis configuration, so that by default it connects me to the remote server. I hope it make sense :) Like Tommaso said, this is no good reason to touch

The right connection string for Remote SQL server for C#

天涯浪子 提交于 2019-12-02 18:35:53
I just want to know the right sql connection string for a remote sql server express edition. This is what I got but I got some problems SqlConnection cs = new SqlConnection(@"Data Source=(IP Address)\PC-NAME\SQLEXPRESS,1433;Network Library=DBMSSOCN;Initial Catalog=dbase;User ID=sa;Password=password"); I got this error in my C# debugger: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

pg_dump postgres database from remote server when port 5432 is blocked

一个人想着一个人 提交于 2019-12-02 16:42:49
I'm trying to pg_dump a SQL database on a remote server in our DMZ. There are 2 problems. 1) there is n't a lot of space left on the remote server so the normal command run to locally backup the database pg_dump -C database > sqldatabase.sql.bak won't work due to space issues. 2) I also can't run the other version of pg_dump command to dump database from remote server to local server using: pg_dump -C -h remotehost -U remoteuser db_name | psql localhost -U localuser db_name as the server is in our DMZ and port 5432 is blocked. What I'm looking to see is if it is possible to pg_dump the

How to execute a shell script on a remote server using Ansible?

三世轮回 提交于 2019-12-02 16:08:24
I am planning to execute a shell script on a remote server using Ansible playbook. test.sh: touch test.txt Playbook: --- - name: Transfer and execute a script. hosts: server user: test_user sudo: yes tasks: - name: Transfer the script copy: src=test.sh dest=/home/test_user mode=0777 - name: Execute the script local_action: command sudo sh /home/test_user/test.sh When I run the playbook, the transfer successfully occurs but the script is not executed. Pasi H local_action runs the command on the local server, not on the servers you specify in hosts parameter. Change your "Execute the script"

How do I push a local Git branch to master branch in the remote?

断了今生、忘了曾经 提交于 2019-12-02 13:46:05
I have a branch called develop in my local repo, and I want to make sure that when I push it to origin it's merged with the origin/master. Currently, when I push it's added to a remote develop branch. How can I do this? $ git push origin develop:master or, more generally $ git push <remote> <local branch name>:<remote branch to push into> Eugene Sajine As people mentioned in the comments you probably don't want to do that... The answer from mipadi is absolutely correct if you know what you're doing. I would say: git checkout master git pull # to update the state to the latest remote master