Merge Database Content
Jul 23, 2005
hi,
i have a sqlserver CE and a sqlserver database.
The tables are exactly the same on both databases.
the sqlserver CE database Content will be synchronized with the
sqlserver database with insert orders..
is there a way to merge the two databases?
this would be great cause different content will be inserted in both
databases. After a synchronisation both databases should have the same
content..
i hope you understood my problem. my english is not very well..
christian
View 1 Replies
ADVERTISEMENT
Jun 17, 2015
I have a table which contains single legs. E.g.
Row Leg-ID From To On DateFrom DateTo DOW
1 ABC123 AAA BBB CCC 01JAN15 01JAN15 1
2 ABC123 AAA BBB CCC 07JAN15 07JAN15 1
3 ABC123 AAA BBB CCC 14JAN15 14JAN15 1
4 ABC123 XXX YYY ZZZ 21JAN15 21JAN15 1
I now want to merge those single records, which follow a pattern. For the above case this would be Row 1+2+3, so the result should be:
Row Leg-ID
From To
On DateFrom
DateTo DOW
1 ABC123
AAA BBB
CCC 01JAN15
14JAN15 1
3 ABC123
XXX YYY
ZZZ 14JAN15
14JAN15 1
The pattern is, that the legs from Row 1 and 2 have identical attributes (Leg-ID, From, To, On, DOW) and are on consecutive weeks on the same weekday. I was doing this through a while-look:
check if there is a record matching the following week (a.DateTo = dateadd(d, 7, b.DateFrom))if there is a match, then update the previous week record DateTo with the following week DateFromdelete the following week record but this is very slow, for 50T rows it runs approx. 6 hrs to shrink everything..
View 4 Replies
View Related
Aug 22, 2006
Hi everyone,
I'm just using TEXTBOX control to save data into my DB. My question is, if I have multiple lines of sentences, it does not store as what it looks like. For example;
Hello, Mike
It stores into the database as "Hello, Mike" and if I read from the database, it does not have seperate lines and shows it like this;
Hello, Mike
How can I store the contents into database and make the contents as original? (Sorry for the poor English, but I hope you understand it.)
View 2 Replies
View Related
May 16, 2006
HiI have set up a SQL database to contain alist FAQ's for our company andthen plan to pull this info off using a web page.So far I have entered the data but I am unable to control how it isdisplayed inside SQL ie I cannot enter new blank lines I have triedusing lots of spaces but this does not work when I use the website todisplay the info.Is there a way of formatting and editing the data in the sql databaseas I am unable to do this, if I try to edit the data in the database Ihave to copy it to notepad delete what is in the database, edit thetext in notepad then paste it back in.There must be a better way.Please helpalamb200
View 8 Replies
View Related
Jul 20, 2005
HiI've developed a simple web service that lets people easily set up their ownwebsites, and keep them up-to-date themselves.I'm storing all the content, including images in the SQL 2000 database. Sofar it's working well enough. Is there likely to be a performance orreliability problem as the system grows?You can see it in operation here: www.up-to-the-minute.comIt's early days and any comments and ideas are welcome.John SouthPangbourne UK
View 1 Replies
View Related
May 6, 2015
One of my employes deleted a MSSQL Database instead of detach. Now i tried to recover the .mdf and .ldf file but when i trie to attach it it says. "File is not a primary database file"
View 5 Replies
View Related
Aug 29, 2007
Hi,
I'm using SQL Server 2005 Management Studio Express.
I have a database used for an application and I need another copy of that database so I can fix some bugs.
I tried attaching the mdf to the second database but it gives an error.(a database is allready attached)
I need the 2 databases on the same server.
Thanks,
Medeea
View 5 Replies
View Related
Nov 13, 2007
Hello everyone!I'm having a problem with inserting the content of a text file into a Sql Server 2005 database.I'm reading the text file into a dataset, and works fine. What I can't do is what I suspect is the simple part: Insert all the data into a table that has exactly the same configuration that the file. I've never worked with dataset's before, and I can't seem to find the answer to this!This is what I have done so far: Dim i2 As Integer Dim j As Integer Dim File As String = Server.MapPath("..DocsFactsFORM_MAN_V3_1.txt") Dim TableName As String = "Facts"
Dim delimiter As String = "9"
Dim result As DataSet = New DataSet() Dim s As StreamReader = New StreamReader(File) Dim columns As String() = s.ReadLine().Split(Chr(9)) result.Tables.Add(TableName) Dim strs1 As String() = columns For i2 = 0 To CInt(strs1.Length) - 1 Dim col As String = strs1(i2) Dim added As Boolean = False Dim [next] As String = ""
Dim i As Integer = 0 While Not added Dim columnname As String = String.Concat(col, [next]) columnname = columnname.Replace(Chr(9), "") If Not result.Tables(TableName).Columns.Contains(columnname) Then
result.Tables(TableName).Columns.Add(columnname)
added = True Else
i += 1
[next] = String.Concat("_", i.ToString()) End If End While Next i2 Dim strs2 As String() = s.ReadToEnd().Split(Chr(13) & Chr(10).ToString()) For j = 0 To CInt(strs2.Length) - 1 Dim items As String() = strs2(j).Split(Chr(9)) result.Tables(TableName).Rows.Add(items) Next j So now I have my dataset populated with all the information, but how can I insert it into the database?If anyone can help I would appreciate very, very much!Thank you Paula
View 1 Replies
View Related
Oct 18, 2006
Dear friends,
I have some images inside my database. How can I export the content of an image field to a file in a Windows Directory?
Thanks!
View 5 Replies
View Related
Apr 28, 2008
I am using SQL server to create a rather complicated client database for a nonprofit organization. I have access to an ancient version of the database in Access format, but would rather create a new database from scratch instead of "up-sizing" the old database. Although the old database is mostly useless, it contains a goldmine of names and addresses that I could use to populate the new database that I'm creating. My question is this: Is there any relatively easy way to cut and paste from external data sources into a new SQL database? For example, I would love to just select twenty rows of "first names" from the old database and then paste that into my new table. Can anyone suggest any quick and easy tricks for populating a new database with place-holder content? Thanks!
View 2 Replies
View Related
Jan 15, 2008
Hi everybody,
I have an application in dotnet that uses sql express.
This application will be deployed on the user computer and I have to find a way to prevent the user to be able to read the data and access the structure of the database.
Is there a way to do this ? Even if the user is a local administrator of the computer ?
That's a difficult question, isn't it ? ;-))))
Thank you for your possible ideas,
Ciao,
Aurore
View 4 Replies
View Related
May 21, 2006
Hi. I am currently building a blog application, and I need some advice... I have the post title, post date, post by, etc stored in a database table, however I was wondering whether I should store the actual post content in the database as well or in a text file. For example, if the posts get really long would it slow down database performance or would there not be much of a difference? Furthermore, if I wanted to keep the posts private, a text file would not be ideal as it can be accessed easily by surfers... What do you recommend?Thanks a lot
View 1 Replies
View Related
Feb 23, 2007
I've installed ADS on a windows mobile 5.0 device and am trying to run the sample Wizard application. It connects to the test database on the device OK, but fails to connect to the database on the desktop with the error:
"The HTTP request failed due to incorrect format or content. Try restarting the IIS server"
I've tried changing the port from 1024 in case it was already in use, but this doesn't change the error. Nor does restarting IIS (v5.1). IIS appears to be running correctly on the desktop.
Any ideas what to try next?
thanks
irs
View 8 Replies
View Related
Sep 26, 2007
Code Snippet
Hi there,
I'm struggeling for more than a week now with this problem, without a finding the solution.
I have two databases, MS Access and SQL Server 2005 Express Edition
Using a procedure in Visual Studio i would like to copy all the records from one table in MS Access into an existing table in SQL Server (the tables have the same name and the same layout)
I tried to prepare one Dataset to copy from Access into SQL Server but when i run the command 'DaSQL.Update(DsSQL, "Tabella") nothing happens (not even an exeption has been raised), looking during debug, the DataSet seems filled though...
Please could anyone explain what's wrong and / or is there a more quicker way to copy data from a table to another?
Note i woul have as a final goal to get data from an AS400 database by ODBC, manage it, and put it on SQL Server for a 'data mining' scope (eliminating the use of MS Access, not suited for FE-BE).
the procedure goes like this;
' Create a connection to the MS Access Database
Dim connectionToAccess As New OleDbConnection(DBConnectionAccString)
strsql = "SELECT * FROM [TABELLA]"
connectionToAccess.Open()
Dim DaAccess As New OleDbDataAdapter(strsql, connectionToAccess)
Dim DsAccess As New DataSet("ACCESS")
DaAccess.FillSchema(DsAccess, SchemaType.Source, "Tabella")
DaAccess.Fill(DsAccess, "Tabella")
' Create a connection to the SQL Database
Dim connectionToSQL As New SqlConnection(DBConnectionSQLString)
connectionToSQL.Open()
Dim DaSQL As New SqlDataAdapter(strsql, connectionToSQL)
Dim DsSQL As New DataSet("SQL")
DaSQL.FillSchema(DsSQL, SchemaType.Source, "Tabella")
DaSQL.Fill(DsAccess, "Tabella")
DaSQL.Update(DsSQL, "Tabella")
Note I tried also the following, withou a result;
DsSQL = DsAccess.Copy
DaSQL.Update(DsSQL, "Tabella")
Please is there someone who could respond !!???
View 6 Replies
View Related
Jul 20, 2005
Hello,I work for an attorney staff, so basically the whole day they aresending themselves a lot and a lot of papers (Word docs or Excellsheets).We are going to propose them the use of a Document Exchange andDatabase System (like Lotus Notes or Oracle Managment Content,formerly known as Internet File System IFS ) with .NET interfazes.Basically the idea is that instead of sending papers the whole day,they can use a software to check and manage more quickly theirdocuments.We are looking for a system that allows us to manage:- Security- Versioning- Folders- Check-in/Check-out- Workflow- Search and Retrieval- Extensible MetadataMy question is:1) Is there any Microsoft tool who can help us to achieve that(management of codes, dates, text, names of documents- I mean like aDocument Exchange and Database System) with .NET interface?2) Or do we have to built it from scratch?Thank you very much!Jorge
View 4 Replies
View Related
Feb 20, 2014
We have a Customized share point application with Very minimal data usage and we have used only 5 to 6 lists and libraries only in the share point.
Configuration is
Clients -- fire wall --- Load Balancer ---- WF1 and WF2 --- SQL DB
ROUTING IS VIA FIRE WALL.
SUDDENLY THE SITE GOT DEAD SLOW AND UNABLE TO TRACE THE PROBLEM AS EVERY THING LOOKS FINE.
Checked with the firewall Team and they stated its fine from their end & even we have verified the counters, CPU, Memory & Page life expectancy, buffer counters all looks good and even we do not have huge data in the database. We have only 50 concurrent users are working...
View 2 Replies
View Related
Nov 21, 2007
Hi all,
I just found that the content of my Database "ssmsExpressDB" is gone, but the name "ssmsExpressDB" remains in the Object Explorer of SQL Server Management Studio Express. If I delected the name "ssmsExpressDB" and executed the following .sql:
exec sp_attach_db @dbname = N'ssmsExpressDB',
@filename1 = N'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatassmsExpressDB.mdf',
@filename2 = N'C:Program filesMicrosoft SQL ServerMSSQL.1MSSQLDatassmsExpressDB_log.LDF'
GO
I got the following error message:
Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatassmsExpressDB.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
And I have closed all my projects and I do not know what " The process cannot access the file because it is being used by another process" is all about!? Please help and tell me how I can re-attach the content of my "ssmsExpressDB" in the Object Explorer of SQL Server Management Studio Express.
Thanks in advance,
Scott Chang
====================================================================================
I found the "ssmsExpressDB" is being used by my VB 2005 Express project "Hello-SQLCLR-1": in the Database Explorer, Data Connections place. How can I put it back to the Object Explorer of SQL Server Management Studio Express? Please help and advise.
=======================================================
View 6 Replies
View Related
Apr 17, 2012
I am new to sql and my boss want me to write the program for database and he wants to pull the info from existing table from sql server which is used by Microsoft GP Dynamics and write me code or some kind of front end so when he wants he can pull same data from GP dynamics table and generate some report with other custom table.
How i can do this task? What I have to do in sql so I can use same table to view info in real time so that means if i enter new data in the table it will show up same time in the front end as well.
View 4 Replies
View Related
Dec 14, 2006
can anyone explain me in detail abt web.cofig and machine.config with an easy and suitable example , also i wana know that as u know that asp.net 2.0 provides a builtin ASPNETDB but it contain limited and general entities for any real time application i have other entites for that i have to make another Database so i hav 2 databases for any application but i want to use only 1 DB ,my question is i want to merge aspnetdb.mdb with my new database do u know how can i merge it ?????? but the functionality of ASPNETDB.mdb remain same
View 1 Replies
View Related
Oct 26, 2007
Hi,
I want to share knowledge that we have the abality to merge the two databases in one database. As if your site is already working with data base with out login page. And you are using asp.net built in funtion to create login page there will be a new database will automatically generated with the name of "ASPNETDB.MDF". you will check it in machine.config. If you want to get its data in old one database you only open sdk dos promt and write aspnet_regsql.exe and press enter. A wizard will open for you. in first two wizard you click next without changing it. and in the 3rd page you will enter the database name in which you want to write this ASPNETDB.MDF data. and in the final page you click finished button and close the sdk dos promt.
You should go on web. config file and modify the code for example.<connectionStrings>
<add name="wordexpress" connectionString="server= localhostsqlExpress;Database=wordexpress;Integrated Security=True"providerName="System.Data.sqlClient" />
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="server= localhostsqlExpress;Database=wordexpress;Integrated Security=True"providerName="System.Data.sqlClient" />
</connectionStrings>
And then check your old database you will see that there is new 11 table added.
My question is that I cannot get these table in my old database. I have working with the same procedure. Can any one tell me if there is any mistake from my side.
Naveed Baig.
View 2 Replies
View Related
Jul 20, 2005
I have a Database which is Merge Replicated to 5 sitesI need to add 1 new fieldWhat is the best way of doing this ?I have previously removed the publications, subscribers, added thefield and pushed the whole database outPlease adviseRegards Paul
View 2 Replies
View Related
May 3, 2007
Hi,
I have to set up a project in SQLServer Express that will allow the export of tables from multiple PC's running SQLServer Express each month.
These have to be loaded into a single identical database on SQLServer Express each month for combined reporting.
so its basicaly
insert update on PC
export
import overlaying last months data (handle dup keys from the other pc's etc)
report
I've had a look at the SQLServer replication docs and got confused....
Can I do this with replication ?
So if anyone can point me at appropriate documentation, or suggest a good method for this it would be appreciated
Thanks
View 5 Replies
View Related
Apr 6, 2004
Is there a way to move a SQL replicated database from one server to another without dropping the publication?
I have SQLCE setup with SQL server 2000; I want to redo the server but needs to move my replication to a temp server and then back.
The problem is that I do not want to drop my subscription and recreate it…it needs to stay the same.
View 2 Replies
View Related
Mar 12, 2007
Hi All,
I am replicating an SQL2005 express machine to SQL2005 standard edition server using merge replication.
I have a simple VB application using ADO polling msMerge_history at the subscriber every second so that i can show the end user the progress of the replication.
When the subscription first subscribes and after the initial snapshot is applied replication downloads all changes from the server that have been changed since the snapshot was created.
Towards the end of this download faze the VB polling application fails with "Cannot open database "DBName" requested by the login. The login failed."
This connection fails 4 or 5 times and then normal polling resumes. The scary thing is that sometimes when the polling connection fails the merge replication does not complete and if i check msMerge_Sessions the "runstatus" is stuck at 3 (InProgress).
1) Is the reason the ADO polling connection fails because of some sort of lock between replication and reading the system tables?
2) Is replication getting stuck because of locks?
3) What can i do to get around this?
cheers,
Tim
View 1 Replies
View Related
Jan 2, 2002
Hi everbody,
Integare check job failing on replication(merge) database.Can you tell me how to schedule the this job.
Thanks
Mark
View 1 Replies
View Related
May 25, 2007
Hi,
On the development environment i've got replication running with no trouble but when deploying in the production environment i get the error below
Has anyone seen this before and solved it?
Another question: How to enable verbose history when using the MS SQL Server Management Studio to create a subscription.
Any help is welcome,
Ralf
TITLE: Microsoft SQL Server Management Studio------------------------------A call to SQL Server Reconciler failed. Try to resynchronize.HRESULT 0x80004005 (29006)The schema script 'd:MSSQL
epldatauncTEST_KANSCE TEST20070522165445 blNaw_2.sch' could not be propagated to the subscriber.HRESULT 0x80070003 (0)The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.HRESULT 0x80045017 (0)------------------------------BUTTONS:OK------------------------------
View 6 Replies
View Related
Jun 27, 2007
How can I list all of the Subscriptions in a CE Database that was created with the .Net System.Data.SqlServerCe.SqlCeReplication.AddSubscription method?
After I create the CE database in an sdf file, I can connect to it with SQL Servr Mgmt Studio, then see the list of Subscriptions in the Object TreeView, under "Replication"
But I can't find that Subscription list in any properties or methods of System.Data.SqlServerCe.SqlCeReplication or System.Data.SqlServerCe.SqlCeConnection
Should I be looking in RMO features like Microsoft.SqlServer.Replication??
We want to confirm that a local CE database was last synced from the expected SQL Server database by checking the Publisher property of each subscription in the CE database.
Thanks
View 3 Replies
View Related
Jul 23, 2005
I have database on SQL Server 2000 set up with a merge publication.This publication is configured with a number of dynamic filters toreduce the amount of data sent to each client. Each client has ananonymous pull subscription. The merge process can be triggered by thewindows sync manager and my application.To improve performance I have created some helper tables to hold themapping between user login and primary keys of selected entities.For the replicated data to be correct the contents of the helper tablesneeds to be up to date.I need to fire off a stored procedure on the publisher beforereplication starts to verify that this data is up to date. I can notsee any documented way of doing this however I have been experimentingwith some unorthodox systems.Firstly has anyone any ideas?I have been considering adding a trigger to some of the tables used bythe Microsoft replication code - yes I know this is very nasty.My problems arise because executing this stored procedure will causesome data to be updated. In updating data we could create a newgeneration in the database. I must therefore run my stored procedurebefore any the Microsoft code makes any generation checks / updates.Anyone done anything similar, Anyone have any better ideas?Any comments would be gratefully received.
View 1 Replies
View Related
Mar 31, 2015
I need to move the log file of a disk and onto another disk. The log belongs to a merge subscription database.
I was going to stop/disable the merge jobs on the distributor, detach the database, move the log file to another drive, reattach, and enable the merge jobs on the distributor.
Does that sound ok, or should I employ some other method.
View 6 Replies
View Related
Jan 3, 2008
C# .Net Application as front end
Sql Server2000 as back end
I need to merge an external dataset from .Net app(in XML format) with the information in database with one column in database table as the merging criteria. A situation similar to Left Outer Join, wherein i need all records from external dataset and if matched in database the corresponding values from there too, the only difference here is that the join is not between two Tables its between a table and external dataset.
There is no need to store the external dataset in the database in persistent form, its just a query - merge - response operation.
So, can anyone suggest the best possible solution for this? A table variable / temporary table / some other schema, what and how?
Thanks in advance..
View 8 Replies
View Related
Feb 8, 2006
Hi,
I am developing a application where the database needs to be deployed from the central database server which is sql server 2005, and we have only few fields and few new tables which need to be deployed into pocket pc using sql mobile from sql server 2005. We would like to design the database in sql server 2005 for mobile, which will be only structure and will be deployed into PDA using web service.
Could anyone help on the above problem?
View 1 Replies
View Related
Jan 24, 2007
Hi all,
When I get this message "The merge process is cleaning up meta data in database 'xDatabase'." at distributor MS SQL 2005 replicator monitor on one of his suscription, this proccess generate so proccess charge to the suscriber that users note difference in performance. I wonder if exist a way to change some kind of parameter for this proccess run on specific schedule ?
Any help would be appreciated.
other info I had suscribers that only replicate in one way, maybe this metadata is causing this overcharge.
View 5 Replies
View Related
Jun 23, 2007
Hi, I have compact sql databases which will be local on multiple users
devices. Due to space constraints, for one of the tables i have had to use
auto incrementing integer which works fine for the local database but i
would like to merge all of the users databases into a global database. The
table format can be seen below:
Code SnippetCREATE TABLE Players
(
ID UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
FirstName NVARCHAR(32),
LastName NVARCHAR(32)
);
CREATE TABLE Sessions
(
ID INTEGER NOT NULL IDENTITY,
PlayerID UNIQUEIDENTIFIER ,
SessionDateTime DATETIME,
CONSTRAINT pkSessions PRIMARY KEY (ID),
CONSTRAINT fkPlayerID FOREIGN KEY (PlayerID) REFERENCES Players(ID)
);
CREATE TABLE SessionDetail
(
SessionID INTEGER,
Time real,
Power real,
CONSTRAINT pkSessionDetail PRIMARY KEY (SessionID,StrokeTime),
CONSTRAINT fkSessionID FOREIGN KEY (SessionID) REFERENCES Sessions(ID)
);
The Players table will merge fine as GUIDs are used. However, how will the
sync capabilities of compact SQL handle the sessions table? When it pushes
the local data to the remote database will it change the Sessions.ID column
to a unique field (as no doubt lots of people will have 1, 2, 3 in their
local databases and the global database must have a unique ID), and then
transfer this changed ID back to the local database? Furthermore, if it
changes the Sessions.ID column during the merge it will also need to update
the SessionDetail.SessionID foreign key to maintain referential integrity,
is this also handled?
So my question is, how much of this sync and data merge is automated and are
there any good examples or pointers for my scenario? I cannot reasonably use
a GUID for Session.ID as there will be lots of SessionDetail entries and the
size would be far too much.
Many thanks,
Chris
View 7 Replies
View Related