Updating Local And Remote Databases

Jun 10, 2004

Hello everyone.





I'm currently trying to figure out a good way to keep my Local and Remote Databases in sync. Whenever I make changes to one or the other I spend a lot of time manually adjusting the other to match. I want to be able to set up an update page that accesses my Remote database and Local database and Updates the two accordingly.





I really don't know where to start with this one. I'm not sure at all as to how to simultaneously connect to two different databases, on two different servers, and Udate from one another. Does anyone know any good articles to get me started?





Thanks ahead for your replies.





-Alec

View 1 Replies


ADVERTISEMENT

Interaction Between Tables Of Local And Remote SQL Databases

Nov 21, 2006

Hi all,

I would be very glad if someone can suggest me what techniques I should use in the following scenario:

I have 2 SQL Server databases : DB1 and DB2. DB 1 is on a remote server (hosting server) and DB 2 is on a local server.

Some tables of each db contain tables that are polulated and changed by the appropriate application, i.e.:

DB1.users, DB1.orders,... etc are managed by "webapplication"

DB1.products ... are not managed by "webapplication" : in fact only used to read from

DB2.products, DB2.customers, .... etc are managed by "winapplication"

DB2.orders,....are partially managed by "winapplication"

Since the amount of data can go over 100000 records i'm wondering what would by the best approach to :

- synchronize the data of DB1.products and DB2.products in DB1 on remote server (updated newly added rows and update changed rows,....)

- the products data is only (at the moment) added, edited and deleted on the local server

I think SQLBulkCopy will not do the job. Should it be possible with some query? Or...?

Any suggestions are appreciated!!

O.

View 1 Replies View Related

Other Way To Execute The Xp_cmdshell Command On Remote Databases From Local?

Nov 14, 2007

Hi all,


Criteria:

We connect to the remote database servers through the network from loca by using Query Analyzer.
Previously we were able to execute the xp_cmdshell command from local Query Analyzer to fetch the remote databases data.
But now we are unable to execute the xp_cmdshell command on remote databases from local Query Analyzer
We do not know what happened but i think due to network updates this command is not able to execute...


For ex:
Previously i was able to execute master..xp_cmdshell 'net start' from local Query Analyzer.But now not able to execute


Now my question is, is there any other way(Directly or indirectly) to execute the xp_cmdshell command on remote databases from local?


Note : we are able to execute this command on remote Query Analyzer but not from local QA

Any suggestions would be very very helpful to me?


Thanks in advance,



View 6 Replies View Related

Error 15185: There Is No Remote User 'sa' Mapped To Local User '(null)' From The Remote Server 'DTS_FSERVER'.

Nov 10, 2006

I am trying to add a linked server from a AMD x64 server (Windows 2003) with SQL Server 2005 64 bit to a Server running SQL 2000. These are not in the same domain.

I can create a linked server using the option "Be made using the login's current security context" but can not when trying to specify the security context, i.e. sa and the sa password. When I try I get the following message:

Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'sa' mapped to local user '(null)' from the remote server 'DTS_FSERVER'.

I have several other x64 server that I have no problem creating a linked server and specifying sa and the sa password.

The problem with using "the login's current security context" option is that I get an error when trying to run any Jobs against the linked server. The job fails withe the following error:

Executed as user: NT AUTHORITYSYSTEM. Access to the remote server is denied because no login-mapping exists. [SQLSTATE 42000] (Error 7416). The step failed.

I'm sure the two errors are related. Any ideas what is going on?

View 7 Replies View Related

Updating Local Data On Device From Sql Server, Via Webservice

Dec 12, 2006

I want to update data on the device which has a sql server mobile database.

the main database is sql server.

I use web services to enable the mobile application to access the server.

Can anyone recommend a way of updating the data on the device without using replication? I basically want to read a dataset from the server via webservice and put this in to local db - but not row by row as too many records.

Regards

View 1 Replies View Related

Remote To Local

Jun 19, 2007

I have a remote database on a server.
I am an authenticated user to a database on the server.
I want to get the data in the database to my local computer
I don't have a shell (or any other way) access to the directory
related to sql server

so what can i do to get a copy of the data?

View 1 Replies View Related

2005 Local Databases

Nov 9, 2007

I had both SQL server 2000 & 2005 on my machine. I recently un-installed 2000 for some reason, and now the SQL 2005 does not show local databases. It cannot update local server information or it doesnt let me local as a new server. How do i go about installing local databases in this situation?

Thanks

View 3 Replies View Related

How To Update Remote SQL From Local SQL?

Jan 22, 2008

i have a local SQL Server Express 2005 on my local machine and i want my software to update from the SQL Expres to the SQL Server when the user click the save button to keep an image of the local database on the remote server without having to backup a file and restore it?

*** I am using C# and SQl Server 2005

View 4 Replies View Related

How To Update Web And Local Sql Server Databases?

May 6, 2007

I am new to programming in SQL and in VB.  I use VWD to create web applications with a Hosted SQL database, locally though the databases are created in SQLExpress through Visual Web Developer.
I have used the SQL Publishing Wizard to upload my local data to the web sql server.  But, I'd like to have the same local database as is on the web, which is being updated by users, both data and user / membership data but am not sure how to create an easy, or even programmatical way to update both databases periodically.
Thank you for your help. 
Cjsteury
 

View 4 Replies View Related

Moving Data From Local To Remote

Jun 25, 2006

Hi All,
I am completely new to VS2005 and .net2.0 but I am learning fast! But one thing that I am struggling with is the deployment of my website, or to be more precise the deployment of the data that was created during development on my local machine.
I have used VS2005 to create a simple personal site. I have created a single user (myself) in an admin and friends role. So far so good. The site works great on my local machine, all the default photos provided with the site display correctly etc and I can log in OK.
My remote server (ie my web hosts) provide me with a separate SQL server on which to install my databases. I have created a database on this server and configured it so that it contains all the correct tables and schemas etc. I have modified my web config file to connect to this database and when I browse to my default.aspx page it displays in my browser fine...EXCEPT that none of the data ( ie the photos and user data) is in the database so therefore no pictures display and I can't log in!!
What I can't figure out is how do I get all the data from my local app_data folder into my new remote database!!?? I can't find anything that explains how to do this. Surely this is one of the most important operations of all since data is what .net2.0 is all about!
Thanks in anticipation

View 2 Replies View Related

Remote Connection Not Allowed, But It's Local

Jul 2, 2006

I have a form to submit some data to a database located in the App_Data folder.  I have the following connection string:
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Siven.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
 
On the form I'm using a DetailsView control and using a SqlDataSource as the datasource, pointing to the above connection string.  In realtime, when i submit the data, I receive the following error:
 
Server Error in '/' Application.


An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I'm using discountasp.net as the host, and I did not elect to use the SQL Server databases, I'm just going to use SQL 2005 express.  I dont understand why it's not pointing to the db when it's there (and to make sure, I re-uploaded).  Is there something I missed here?
 

View 1 Replies View Related

Connect To Remote SQL Server From Local Web App

Apr 18, 2007

I have a SQL Server 2005 instance which resides on a dedicated server hosted by a third party. I am able to connect to this server through my local SQL Management Studio, however, my local ASP.NET 2.0 web application cannot connect. I get the error below. The connection string I use is formatted as...
Connection String: 
Server=thesever;uid=myuserid;pwd=mypassword;database=mydatabase
Error:
Failed to connect to database: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
The hosting providr claims that the SQL Server configuration settings are as they should be as fars as TCP/IP and Named Pipes are concerned. Does anyone know what might be going on?
 

View 1 Replies View Related

Local VB.NET App Connection To Remote SQL Server

Nov 1, 2007

I know this is strickly not a website question, but dunno where else to post...To remotely admin and monitor some functions of the website, I wish to use a local application to connect to the MSSQL DB which is held on the remote webhosting serverI have the following code: Dim StrSQLUN As String = "[UN]"
Dim StrSQLPW As String = "[PW]"
Dim StrServer As String = "[IP][INSTANCE]"
Dim StrDB As String = "[DB]"
Dim strTimeOut As String = "Connection Timeout=0;"
Dim pStrSQLConn As String = "Server=" & StrServer & ";Database=" & StrDB & ";User Id=" & StrSQLUN & ";Password=" & StrSQLPW & ";" & strTimeOut

Dim sqlConn As New SqlClient.SqlConnection(pStrSQLConn)
If sqlConn.State = ConnectionState.Closed Then sqlConn.Open()
This has basically been take from the existing code on the website, but changing to the server details. I had just started dev'ing this app when the admins decided to move the SQL server over to a different server. It was working on the old one, but the new one doesn't. It just times out after whatever time you put in the timeout variable. 0=unlimited, and so just sits there.I am also using the MSSQL Server Management Studio locally to connect to the same database, and although slow, does connect after about a minute or so. I thought they would be using the same type of underlying connection to access the server and database? Is this correct?
Can they put restrictions in place for this specific sort of data access?Does anyone have any suggestions on how to resolve this issue??Thanks for any helpAdam.

View 2 Replies View Related

Importexport An SQL Db Between Remote And Local Machines

Mar 11, 2008

Hi Guys!
I'm trying to find a way to either importexport or synchronise an SQL 2005 db between a local and remote server, is there any way to do this programatically or otherwise? doesn't have to be the entire db, (like just aspnet_users and related tables will do)
Thanks for the help all!

View 3 Replies View Related

Restoring From Local BAK Onto Remote Server

Apr 27, 2006

Hi all, I have moved hosting companies and am trying to get my website and MSSQL database sorted on the new server. I am using an enterprise type tool and can connect to the database the new hosting company has created on their SQL server with no problem. I now want to upload the data I had in the database previously. All I have to do this from is .BAK and .TRN files on my local hard drive. Using the restore option from the menu, I tried to select the .BAK file I have saved to restore from it, and got the following error:

"EXECUTE permission denied on object 'xp_availablemedia', database 'master', owner 'dbo'."

I also tried the advice given in this post as the problem seems similar and follows the same pattern: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=40841

but there are loads of users listed for sp_who - it seems to be the users for all the databases on the host's server so I didn't follow the next step to disconnect them!

Any advice as to what I need to do would be much appreciated.

Cheers

Lisa

View 2 Replies View Related

Sql Server Backup - Remote -&> Local

Jul 23, 2005

Hello-I have a Sql Server 2000 database offsite that I would like to back upto a local machine. I am using Enterprise Manager on a local machine toadminister the remote db.Whats the best way to schedule backups so the remote db is backed up tothe local machine?Can this be done in Enterprise Manager?Would you recommend any 3rd party software?Thanks!MB

View 1 Replies View Related

Import Local Database To Remote?

Oct 22, 2015

I have a bak file backup of my database which is a database backup done via SSMS 2008.I have imported this bak file to SSMS 2014 and working currently. The bak file is about 4 gb size.I need to transfer the entire database to remote server which is also sql server 2014. How can i do this efficiently?

View 3 Replies View Related

Local And Remote Connections Question

Apr 3, 2007

Hello all,



We are currently testing all our applications on Vista and SQL Server 2005. Everything is running and working, but our applications that connect to SQL Server 2005 are running very slow. We have our client installed on a vista pc running SQL Server 2005 on the same pc. I was trying to troubleshoot the problem and realized that we had "Local connections only" checked in the Surface Area Configuration tool, and changed it to "Local and remote connections". After making this change all our apps seem to be running much faster. I just didn't expect this to be the problem since we were connecting from the same computer that is running the server. Can anyone explain to me why this has made the difference in performance?



Thanks for your time and attention,



DrewV

View 4 Replies View Related

Remote Message Being Classified As Local

Oct 13, 2006

Hi

I am trying to deploy our service broker application into our live enviroment. I have been using the excellent service listings manager to configure security and routes when deploying to our test enviroments and had no problems. However, after having gone through the same steps in live, i can not get it working.

The messages I try sending from the remote initiating service arrives at the target service, but the ack is not sent back from the target service. I have used profiler to find out what is going on and noticed that on the target after the ack is received, a broker:message classify event occurs with an event sub class of 1 - Local. It then starts going through lots of broker: Message undeliverable events. From what I understand this means that the target service has classified that the reply to the message should be sent to a local service instead of a remote service which is not the case.

I think the remote route is set up correctly on the target server. I have run this query on the target server after one message has been sent

select r.*

from sys.conversation_endpoints e

inner join sys.routes r on e.far_service = r.remote_service_name and e.far_broker_instance = r.broker_instance

and it returns the row from sys.routes that points to the initiating service.

Can anybody help with what else I can do to solve this problem?



Antony

View 3 Replies View Related

Updating Of The Tables In Two Different Databases

Dec 16, 2001

I am using SQL server7.0. I am having two databases ,say database A and database B.Database A is the main database which is used in two /three projects.While database B is created by me for my work.From the database A, I am using the 4/5 tables, which i have copied in to the database B.
So, i want to update these tables in the database B as soon as any change (insert,update or delete ) occures on the tables in the database A.
That's why I am interested in doing these work.I have tried, but it doesn't work.So, I have placed these into these forum.
Is any body is having the trigger, procedure ready for doing these job. then plz,mail it to me

View 1 Replies View Related

Updating Multiple Databases

Jun 25, 2002

I have a problem like this. I have an application which shud be internet hosted. All transactions should be updated to the central server of the net as well as an intranet DB server. (I'll have a DB server - SQL Server 2000 in each intranet). Is this possible.. i'm planning to use ASP to develop the net based application.
Thank you in advance..
Geetha R

View 2 Replies View Related

Databases Updating Simultaneously

Aug 31, 2006

Hi,I have managed to create a second copy of my "live" database, forsoftware testing purposes.Inspecting the properties of the new database, everything seems inorder. The logical file name is the same, which I believe is fine, andthe physical database (and log file name) is different.However, despite the fact that there is no application currentlyaccessing the "testing" copy, both databases are seemingly beingupdated simultanously. I can tell this from the physical file sizes onthe server, which are identical, and growing at the same rate.Does anyone have any suggestions why this might be happening - and howI can stop it?Thanks in anticipation!Phil

View 1 Replies View Related

Remote Data Updating

Apr 25, 2008

Hello all, quick question and then a little background.

Could someone point me in the right direction when it comes to updating remotely deployed instances of a SQL CE database? I don't expect someone to code my project for me, but I'm getting lost in the sea of information and haven't found anything that looks like what we need yet.

What's going on is that I was given the wonderful opportunity to learn SQL.NET programming from the other side of application development. I'm not a beginner programmer by any means, but kind of a newbie when it this level of SQL deployment. What we are trying to do is give our users applications that use a local instance of the larger SQL database we have on the server. We were thinking that deploying SQL CE databases created from the master DB would be a good solution since it is supposed to have updating capabilities, which would be wonderful since then the users wouldn't have to be burdened by having to manually download and update a huge database install file every time we updated the information in the master.

What I'm finding though (after going throught the tutorials), is that the RDA feature (this would only need a pull function) that we were hoping to use requires that you delete the entire table, and then replace. If the master DB has only a few record changes in several scattered tables, it seem that this operation would be similar in size and resource demands as just re-downloading the entire database again (~2.7 gigabytes and growing).

Is there a function that can use a feature on the field properties that can download and replace only those fields/records that have changed intead of basically replacing the entire database?

Sorry if this seems like a painfully obvious question, but I have been looking for a while and haven't been able to find it.

thanks a ton in advance!
Brian

View 4 Replies View Related

SQL Server - Best Practice For Local And Remote Development

Aug 13, 2007

What is the usual way to develop ASP.NET websites locally using a database and then migrate everything to the real webserver?
Here's what I'm doing now -- tell me what I should be doing instead (I'm a newbie developer).


I'm using Visual Studio 2005 Standard with a SQL Server 2005 database, to develop a small C# ASP.NET website. I'm the only developer.

View 3 Replies View Related

Can't Connect To Remote Server, My App Works In Local Only???

Feb 3, 2004

Hello,
i've developed a website using VB.NET, and SQL SERVER 2K, in my dev environment works properly (SQL Server and WEB SERVER are in the same machine).
When i put everything in the target machine, where the webserver is but not the sql, i get the following error:
Sql SErver does not exist or access denied

I've tried so many ways to do this, ODBC, ADO.NET, OLEDB.....and everything ends in the same error.
Also if i try to connect with ODBC (from odbc manager) it seems to work (test connection succesfull), but in asp.net nothing works.
I've tried to access the server with:
INSTANCE_NAME
SERVER_NAMEINSTANCE_NAME
IP,PORT

I think (they are checking this), that the auth mode is set to MIXED MODE.

Any idea to save my life?? ;)

Thanks ppl

View 1 Replies View Related

Backup A Remote SQL Server To Local Computer?

May 4, 2005

Is there an easy way to backup a database on a remote SQL Server to a backup file on my local computer?

View 3 Replies View Related

Linked Server: Works Local, But Not Remote

Nov 14, 2007

I have created a linked server (to an AS/400) via MSDASQL. It works fine when I execute queries locally (i.e. from Management Studio running on the SQL 2005 server).

However, when I execute a query from a remote machine I get an error (see below for the exact message).

I know the ODBC connection is between the SQL server and the AS/400, and that the remote client does not have connectivity to the AS/400. But shouldn't the SQL server be able to pass the query through to the linked server even if the query is initiated from a remote machine?

Does anyone have any suggestions on how I can resolve this problem so that queries against the linked server can be executed from remote machines?


Errors:

OLE DB provider "MSDASQL" for linked server "MERCURY" returned message "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".

OLE DB provider "MSDASQL" for linked server "MERCURY" returned message "[IBM][iSeries Access ODBC Driver]Key value in connection string too long.".

Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "MERCURY".


Environment: SQL 2005, Standard Edition SP2

Thanks in advance for any suggestions.

David Rueter
drueter@assyst.com

View 2 Replies View Related

Connect To Remote MYSQL From The Local Mssql

Dec 21, 2007

how ?

View 4 Replies View Related

Connecting To A Local Instance From A Remote Computer

Sep 18, 2007

Greetings friends,

Not sure if this is the right place for my question but here goes anyway.

I have an instance of SQL Server 2005 installed on my DEV PC. A colleague of mine wants to access my server from his machine which connected to the same network.

I logged on to SSMS and added him as a new login.

Will he be able to connect to it now or do I have to do more than just that?

Your help would be appreciated.

View 6 Replies View Related

How To Access Remote Connections For A Local Database?

May 5, 2008



Hi 2 All,

I have installed MS SQL 2005 in my system. I have created one database in my server. When iam running my application with this connections it is working fine in my local system. When i uploaded the database to some where dataserver, Iam not getting the connectins due to no remote access .

Some body suggested that to start the SQL browser in the SQL Server Configuration Manager.

I go there n tried to start the service when i put the service properties to Automatic or Manual i am getting the error message that is saying that the service is disabled cannot start automatically.

What could be the wrong?

Please suggest me.
Thanks and regards,

View 3 Replies View Related

Local Management Studio Cannot Connect To Remote IS

Feb 20, 2006

I am not able to connect my local SQL Server Management Studio to a remote server hosting our Integration Services. I get the infamous "Access Denied". I have walked through Kirk Haselden's howto at:

http://www.sqljunkies.com/WebLog/knight_reign/archive/2006/01/05/17769.aspx

but the problem persists.

Thanks for any help.

Keehan

View 8 Replies View Related

Updating A Table Depending On 2 Databases

Dec 3, 2007

In a package we have statements pointing to 2(or more) different databases on the server. When moving between environments, is there an easy way to change statements like:

UPDATE t1
SET t1.name = t2.name,
t1.age = t2.age
FROM DB1..Person t1
INNER JOIN DB2..PersonToo t2
ON t1.PersonID = t2.PersonID

I can think only of building the statements replacing the database names with variables, but that's not an easy way. I do not know how to use package variables in this situation.
1 way of doing this may be by using a Lookup or Conditional Split and use the resulting dataflow in a SP or such to update, using parameters...
It all sounds very messy, and I still don't know how
Any ideas?


TIA,

View 7 Replies View Related

Updating Remote Table With OPENDATASOURCE

May 25, 2008

Greetings all

Have another issue with OPENDATASOURCE

The following SQL appears to run successfully:
Update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=******').TRANSFERSTN.TSADMIN.SALESDAY
set STARTDTTM = L.STARTDTTM,ENDDTTM = L.ENDDTTM,CLOSED = L.CLOSED,
CASHEDUP = L.CASHEDUP,CASHINTILL = L.CASHINTILL,CHEQUESINTILL = L.CHEQUESINTILL,
EPSALES = L.EPSALES,EPCUTORETURN = L.EPCUTORETURN,REPFLAG = R.REPFLAG
from OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=******;Password=*****').TRANSFERSTN.TSADMIN.SALESDAY AS R inner join
TSADMIN.SALESDAY as L on R.SALESDAYID = L.SALESDAYID where L.REPFLAG = 1


However, all records in the remote table get updated if there are any records satisfying the REPFLAG clause, if more than 1 then I guess the last record in the source set.

Running the same SQL against 2 tables in the local DB works perfectly.

These are both MSDE V8.00.2039 SP4 connecting via RAS dial up.

Any ideas where to focus my attention will be gratefully received


Thanks

<EDIT>
Haven't solved the issue, but staggered around it. I have simply reversed the tables in the SQL and executed at the remote server instead, so it is updating a local table while getting data from a remote table. This functions as it should. Any clues to the above would still be good tho' - cheers
<END EDIT>

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved