Is There Any Possibility To Sync Databases Directly?
Aug 31, 2012
Currently our client has a website where they are using aspx as front end and SQL server as back end. We are developing same functionality using php and my sql.Currently 1 phase of development is finished. They are using both applications to do the job. Now in 2nd integration they are asking the data sync from one database to other.
We have decided once the user enters the aspx form the data will be stored in client sql server but we though of writing a script to enter this info into a csv file so that from our side we access that file and update in mysql.
Other than ftp any other better approaches to access that file on client server?Is there any possibility to sync databases directly?
Can we backup our cluster databases directly to tape using native backups (without using any third party tool) ? It's SQL Server 2012 two node Active/Passive cluster. One of the DB will be huge in size, hence checking if we can directly backup from the cluster instance to a tape.
Hello,I've got 2 databases (both on MS-SQL Sever2k). One of them (remote)contains table which is often updated. For various reasons I'd like tomaintain a copy on local MSSQLServer. Is there any built-in mechanism whichallows to do such things?! I can do this manually, by examining the remotetable contents, and downloading new stuff (local table cannot be modified inany other way), but I guess that there is a smarter way. Any ideas?!ThanksPiotrek
If I have 2 mobile databases, 1 on my desktop and the other on a PDA, how do i synchronize both these database? Are there any vb samples where i can refer to?
I need some assistence here.I have two servers. One with MS SQL 2000 Standard edition and MSDE(MSdesktop engine).I need to sync my databases nightly, as a backup.Is there a cheap software that will do this? I don't want to justbackup the entire databases files b/c they are large and I'mtransfering them over DSL.I was thinking transaction logging, but I'm not sure. Is there a easyway to do this?I don't know how to accomplish this task.PLEASE HELP.
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) );
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.
I'm using enterprise manager to remotely connect to a MS SQL Server for one of my client's websites. The problem I'm having is that the connection times out when I try to expand the "Databases" folder. The reason that it's timing out is because the company that hosts the DB has hundreds of other clients who all share the same IP, but each with their own seperate login/password/database, but even though I don't have access to all the rest of the DBs on the server, it still wants to list them all for me. What I'm wondering is is there a way to set EM to ignore all of the databases on the server that cannot be accessed with my credentials? So basically when I expand the Databases folder all that appears is the one that I can access?
I am planning to create an application in SQL Express Advanced SP2, and later upgrading to Standard Edition. The Express SP2 Readme states somewhat unclearly that this might not be possible, that upgrading must be done prior to installing SP2, and then SP2 can be applied. I'm confused about my options.
Right now, I need to use Express Advanced for the reporting capabilities, etc., but the only available download I can find is Express Advanced SP2. If I install and use this, will I later be able to upgrade "seamlessly" to Standard Edition? Or should I install an earlier version of Express Advanced? Also, I haven't seen a lot of advice about the "seamless" upgrade from Express to other editions. If any help can be provided to answer the first question and/or point me toward upgrade documentation, it would be appreciated.
Hi,DDL:-- create table #task (taskID int identity(1,1) primary key, taskNamevarchar(25) unique, taskCompleteDate dateTime, taskComplete bitdefault(0));/*Business Rules:a) if taskCompleteDate is NULL (like default) then, taskComplete maynot be set to 1 (attempt to update it to 1 would fail);b) else automatically set taskComplete = 1*/I was thinking using CHECK constraint (mutual constraint if possible),along the following line:CHECK (if taskCompleteDate is null set taskComplete=0 else settaskComplete=1)Hmm, your thought?Thanks.
This may not be possible, but I wanted to see what some of the experts' opinions are here.
One of our users has created a report in Report Builder. I want to take this report, post it to a folder and allow her employees to run the report.
I've put it in a folder called "Reference Line Reports" and gave browser permission to a list of users. These users are able to run the report (without having access to Report Builder or the report model).
When they try to utilize the "infinite clickthrough" functionality, I get the following error.
The permissions granted to user '<domain><username>' are insufficient for performing this operation. (rsAccessDenied)
If I give one of these users access to the "report builder" they no longer get the error. The problem is that we don't want them to run the report builder (giving unrestricted access). I just want to be able to give them a report builder report with the clickthrough ability.
I would like to disclaim that we have not upgraded to SP1 (or CTP SP2 yet). Has anyone seen a similar problem or know if this was something fixed in sp1?
i have a query and i would like to write the contents of the dataset out directly to a file and not bother with creating another temp table and then exporting it with a command with a dts to a csv file.
it is a type of reporting that i am trying to do but i just need to export the raw data i retreive from the query
Me and my collegues was recently assigned to maintain a SQL Server 2000 instance, which pretty much only holds one database. From what we can tell, a backup of this database has never been created, atleast not through SQL Server. When asking the previous owner, the answer was "We have been taking 'Legato backups' every day!"
We now intend to schedule a SQL Server backup job, but out of curiosity... In case of a disaster, would these "Legato backups" have been any use at all? Please elaborate :-)
I have a delivery extension that prints to network printers. Now I add a subscription like a few minutes in the future via web service for each report to print.
Is there a way I can trigger the delivery directly?
First let me give you a little back ground on me. I'm very new to the ASP, ASP.NET, Visual Studio, Sql Server, Frameworks....thing. I am coming over from a PHP/MySql background of over 5 years. The change over to VBScript and VB has been to tough and I have a basic liking for the Visual Studio 2005 and the ease of putting things together. However, I have come across something that to me seems like it should be relatively simple, but haven't been able to find the documentation or samples to describe what I'm looking to do. Rough Need: 1. Start with a form will a couple labels and a singe textbox to get the lookup date from an user. 2. Query one table/view based on the users choice of date and select only one field of returned data.(Doing this by itself is not a problem and I can display my results in a Gridview, but this is where it starts getting tricky and the gridviews won't work for me.) 3. If there is something returned, I need to start a HTML table layout or possibly some form of a Gridview(I don't see how I would use the Gridview) and start a loop, adding the first returned row from this query into the first cell. 4. Now, based on that same User Date and the returned row value from the previous query, I need to query another Table/view and return another single field, which might return 1 or multiple rows, which I need to start a loop to display unique items in cells under the first on above. 5. Based on the original User Date and each returned row from the first query, I need to query two other Table/views and get some additional information. 4-5 fields will be returned and be displayed on one row in the number of necessary columns. 6. This would finish the first row from the first query, so I would need to loop back up to see if there were any further results and continue looping until the get to the last of the results from the first query. 7. Finally, I would just need to close up the Table/gridview. The basic results I'm looking for would be similar to the following: Results for 10/11/2005
Field name 1 Field name 2 Field name 3 Field name 4 Field name 5
First Result from query 11 of 4 results from Query 2, but only 1 unique result
Info from Query 3
Info from Query 3 Info from Query 3 Info from Query 4 Info from Query 4
Info from Query 3 Info from Query 3. Info from Query 3 Info from Query 4 Info from Query 4
Info from Query 3
Info from Query 3
Info from Query 3 Info from Query 4 Info from Query 4
Info from Query 3 Info from Query 3 Info from Query 3 Info from Query 4 Info from Query 4
Second Result from query 1First result from Query 2 after looping though the first query Second result from Query 2 after looping though the first query
Info from Query 3
Info from Query 3 Info from Query 3 Info from Query 4 Info from Query 4
Info from Query 3 Info from Query 3. Info from Query 3 Info from Query 4 Info from Query 4
Info from Query 3
Info from Query 3
Info from Query 3 Info from Query 4 Info from Query 4
Info from Query 3 Info from Query 3 Info from Query 3 Info from Query 4 Info from Query 4 It seems me from what I have read and slowly figuring out, is that I should be able to directly access the DataSet returned by four SqlDataSources, one for each of the above querys and then just write my own VB to handle the necessary looping, table format and such. I can easily add the for SqlDataSources to the page and add a Gridview for each one and get 4 separate chunks of info, but can't see a way with GridViews to intermingle the info like displayed above. So, if it can be done with Gridviews, then I would love to see how that is done. But, if someone could explain to me how I access the DataSets directly that I get from the 4 SqlDataSources, then that would be ok too. I have figured enough out with VB, that I can write the code to do my looping requirements, if I can just access the information I get back. Thanks for reading all the way through this long post. Jack
Hey all Im trying to make a system in which users logged on can change their password. I dont want to use a grid view because that dosent give me the chance to let them put in their old password first for validation but now I need a way of takeing data out of the textbox with the new password and placeing it in to the field in a database.As I stand at the moment I have a data.dataview variable equal to an SQL Data Source with my query in it, bringing back a record from a users table with the users username, password and a field stating what type of user they are. It filters this by username which is stored as a session variable and username is the primary key. there is then an if statement checking that the string in the password field is equal to what the user has written in the old password box and if they match it uses the command:dv.Table.Rows(0)(1) = txtNewPassword.TextMsgBox("Password Successfully Changed", MsgBoxStyle.Information)When I run this the validation successfully checks the password is correct and then displays the message box saying the password is correct but it hasnt actually changed it. Somone I know told me that I need to use the command sqldatasource.update but I cant see where it fits in. Anyone got any ideas?
I'm currently dumping tables from PostgreSQL 7 to SQL Server 2K and I've been wondering if it's possible to create a trigger between the two databases. ..like if there's an insert to a PostgreSQL table, the trigger inserts the same row to the SQL Server table.
If it is possible, please do send me a sample code.
Hi, I'm currently writing a desktop application that communicates directly with a SQL server database on the local network. Ideally we'd like to connect directly to the database via the Internet. - connecting via the Internet is important because we want easy access from anywhere. - directly is important because fast data transfer is a requirement.
Not knowing much about the security implications of such a connection, I thought I'd ask here. So what are the major risks and objections? Can the connection and data be made secure?
Greetings!I have the 3 raw data tables below, and would like to extract somedata. My current query is really cumbersome, does anyone know a betterway to get all the info (attach the right state to the lowest zip code)in one step? Thanks a lot! Here are the details.- Ideal Output, for each person , keep(1) person_id (From Table A)(2) The earliest open_date of accounts starting with 2 (From Table A)(3) ssn (From Table B)(4) Zip and state info (From Table C), but only keep the lowest zip andstate.-Table A -person_idaccountopen_date10001220000015/15/200310001220000026/20/200410001300000012/2/200210002220000038/12/200410002220000049/15/200410002300000022/16/2005-Table B -person_idzip state1000111111AA1000122222CC1000233333BB--Table C -person_idssn100011234567100022345678-Ideal Output-person_idmin_openssnzipstate100015/15/2003123456711111AA100028/12/2004234567833333BBHere is what I did:Select a.person_id, min(a.open_date), b.ssn, min(c.zip) as zip,cast (0 as varchar) as stateInto output[color=blue]>From TableA as a[/color]Join TableB as bon a.person_id=b.person_idJoin TableC as con a.person_id=c.person_idWhere a.account like '2%'Group by a.person_id, b.ssnOrder by a.person_idUpdate outputSet output.state=b.state[color=blue]>From output as a[/color]Join TableC as bon a.person_id=b.person_idand a.zip=b.zip
Is there a way to read a backup file to see if it contains a file withoutrestoring the backup file? We are missing a record from a table, and I needto find out when it was deleted. We have nightly backup files of thedatabase. Is it possible, knowing the database name, the table name, and theprimary key value of the record, to determine if the record exists in acertain backup file? If not, is there an alternate way to determine when aparticular record was deleted?Thank you!Neil
1. Can we directly install sp2 without SP1 - for sql server 2005.
2 . Iam basically dotnet developer. iam using sql server 2005 both developer and express editions. Do i need to stop sql server service before installing sp2. ?
During sp1 installation, it seems some file are locked and when it prompt, i stopped service and continued installation.
3. Moreover Sql server 2005 express edition comes along with VS2005 didn't have management studio. I feel like having entire features installed in my system. I have downloaded express edition SQLEXPR_ADV.exe. Which is better choice for installation.
Hi all I am using local reports.(.rdlc files) My requirement is when the user selects some options in the form and click on Submit buttion,He should get report in PDF format directly.Is it possible?if possible give me some example code.No need to preview in general format. Help me. Regards.
Private Function MoveToPage(ByVal page As Int32) As Boolean
' Check to make sure that the current page exists in
' the array list
If Nothing Is Me.RenderedReport(m_currentPrintingPage - 1) Then
Return False
End If
' Set current page stream equal to the rendered page
m_currentPageStream = New MemoryStream(Me.RenderedReport(m_currentPrintingPage - 1))
' Set its postion to start.
m_currentPageStream.Position = 0
' Initialize the metafile
If Not Nothing Is m_metafile Then
m_metafile.Dispose()
m_metafile = Nothing
End If
' Load the metafile image for this page
m_metafile = New Metafile(CType(m_currentPageStream, Stream))
Return True
End Function
Private Function MetafileCallback(ByVal recordType As EmfPlusRecordType, ByVal flags As Integer, ByVal dataSize As Integer, ByVal data As IntPtr, ByVal callbackData As PlayRecordCallback) As Boolean
Dim dataArray As Byte() = Nothing
' Dance around unmanaged code.
If data <> IntPtr.Zero Then
' Copy the unmanaged record to a managed byte buffer
My Requirement is to dirctly Print the SSRS Report without using Reportviewer. If anybody know How to Print Report without using Reportviewer, please let me know asap.
I have thousands of records, which are .txt format, to be loaded to the DB and need to mining them. The only way for that is to write a program and read them to the DB or can I load them directly? And also I have to design the tables based on these data myself, right? Thank you.
Hi, when running the following stored procedure: ALTER PROCEDURE [dbo].[GetWerknemersBijLeidinggevende]@LeidinggevendeID int,@Start int = 1,@Limit int = 25,@Sofinummer int = NULL,@Achternaam nvarchar(128) = NULL,@Functie nvarchar(64) = NULL ASWITH Ordered AS ( SELECT ROW_NUMBER() OVER (ORDER BY Achternaam) AS RowNumber,Persoon.*FROM PersoonINNER JOIN DienstverbandON Persoon.ID = Dienstverband.PersoonIDINNER JOIN BedrijfsonderdeelON Bedrijfsonderdeel.ID = Dienstverband.BedrijfsonderdeelIDINNER JOIN LeidinggevendeON Bedrijfsonderdeel.ID = Leidinggevende.BedrijfsonderdeelIDWHERE Leidinggevende.Begindatum <= getdate()AND (Leidinggevende.Einddatum > getdate()OR Leidinggevende.Einddatum IS NULL ) AND Leidinggevende.PersoonID = @LeidinggevendeIDAND ( Sofinummer = @Sofinummer OR @Sofinummer IS NULL ) AND ( Achternaam LIKE @AchternaamOR AchternaamPartner LIKE @AchternaamOR @Achternaam IS NULL ) ) SELECT *FROM OrderedWHERE RowNumber between @Start and (@Start + @Limit - 1) When I run this in the database and fille de LeidinggevendeID parameter with a value I get a few rows returned, however when I run the following code: [DataObject(true)] public class PersoonFactory { [DataObjectMethod(DataObjectMethodType.Select, false)] public static IList WerknemersBijLeidinggevende(int ldgID, int start, int max) { IList list = new List(); SqlDataReader rdr = null; SqlConnection connection = DatabaseProvider.Connection; SqlCommand command = new SqlCommand("GetWerknemersBijLeidinggevende", connection); command.Parameters.AddWithValue("LeidinggevendeID", ldgID); command.CommandType = CommandType.StoredProcedure; try { connection.Open(); rdr = command.ExecuteReader(CommandBehavior.CloseConnection); while (rdr.Read()) { Persoon pers = new Persoon(); pers.ID = rdr["ID"] as int?; pers.Achternaam = rdr["Achternaam"] as string; pers.AchternaamPartner = rdr["AchternaamPartner"] as string; pers.Achtertitels = rdr["Achtertitels"] as string; pers.DatumOverlijden = rdr["DatumOverlijden"] as DateTime?; pers.Geboortedatum = rdr["Geboortedatum"] as DateTime?; pers.Geslacht = rdr["Geslacht"] as string; pers.Middentitels = rdr["Middentitels"] as string; pers.Naamgebruik = (int)rdr["Naamgebruik"]; pers.Sofinummer = rdr["Sofinummer"] as string; pers.Voorletters = rdr["Voorletters"] as string; pers.Voortitels = rdr["Voortitels"] as string; pers.Voorvoegsel = rdr["Voorvoegsel"] as string; pers.VoorvoegselPartner = rdr["VoorvoegselPartner"] as string; list.Add(pers); } } catch { throw; } finally { if (rdr != null) rdr.Close(); else connection.Close(); } return list; } I get 0 rows all of a sudden. Any idea why?
I have an ASP.NET application where I need to filter the records returned from a SQL query using a calculated distance to a point that is set by the user. To do this directly, I would need to include a square root of an expression in the SQL query. It seems like I should be able to do this by writing my SQL query something like: SELECT SQRT(expression ....) AS distance, column2, column3 ... FROM mytable WHERE distance < 50 Unfortunately, SQL queries apparently don't like the SQRT function. I am using .NET 2.0 with VS2005 and a MS Access backend (that will soon be moved to SQL/Server). As an alternate, maybe I can query the data into a temporary record set with a extra field for distance and then step my way through the temporary record set and replace the values in the distance field with a calculated distance. Once the temporary record set is prepared, then I would delete the records that don't pass the distance requirement or otherwise hide them and bind the data to a gridview control. Thanks, David