Replicate Every 15 Minutes: Insane?

Jan 15, 2008

The company I work for has no experience with replication, and neither have I.
Now I recieved a functional specifications document and apparently what they want is use replication to maintain a copy of a production database on the data warehouse server.
The database is 70GB, and they want to do it every 15 minutes (so their reports will contain up-to-date data).

As I said, I know nothing about replication, but to me, this sounds like madness. I fear that this will will (at least) have a negative impact on the performance of the production database.

So is it possible? Does replication have a big impact on the database or is it hardly noticable? I expect about 500 new records every 15 minutes; production database and data warehouse are on different servers; both are SQL2005.

View 6 Replies


ADVERTISEMENT

T-SQL (SS2K8) :: Display Row As 2 Days Ago / 1 Hours 34 Minutes Ago / 11 Minutes Ago

Apr 21, 2015

My table as data as follow,

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[table_Data]') AND type in (N'U'))
DROP TABLE [dbo].[table_Data]
GO
/****** Object: Table [dbo].[table_Data] Script Date: 04/21/2015 22:07:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[table_Data]') AND type in (N'U'))

[code].....

View 6 Replies View Related

CURSOR Is Driving Me Insane!!

Jan 13, 2007

We have a tree structure containing section names.  Each node is a
section name and each section can have subsections.  I have to copy the
tree structure but need to maintain the parent-child relationship
established within the id / parent_id fields.  How do i acheive this?For example i have the treeSection 1   |-Section 1.1Section 2   |-Section 2.1The
"Section" table contains 3 fields: id, parent_id, and caption.  ID is
the identity of the section record and parent_id contains NULL or the
ID of this record's parent to create a child.  So "Section 1" (id=1,
parent_id=null), "Section 2" (id=2, parent_id=null), "Section 1.1"
(id=3, parent_id=1), "Section 2.1" (id=4,parent_id=2).I would
like to copy this sucture to create 4 new sections but they need to
maintain their id/parent_id relationships BUT with new IDs.  For this i
created the following stored procedure:----------------CREATE PROCEDURE [dbo].[CopySection] AS     -- Declare a temporary variable table for storing the sections     DECLARE @tblSection TABLE     (          id int,          parent_id int,          caption varchar(max),     )     DECLARE @newAgendaID int, @newSectionID int;     DECLARE     @tid int, @tparent_id int, @tcaption varchar(max);BEGIN     -- SET NOCOUNT ON added to prevent extra result sets from     -- interfering with SELECT statements.     SET NOCOUNT ON;     -- Copy the desired sections into the local temp variable table     INSERT INTO @tblSection SELECT id, parent_id, caption FROM tblSection ORDER BY parent_id;     -- Using a cursor, step through all temp sections and add them to the tblSection but note its new ID     DECLARE c1 CURSOR FOR SELECT * FROM @tblSection ORDER BY parent_id FOR UPDATE OF parent_id;     OPEN c1;     FETCH NEXT FROM c1 INTO @tid, @tparent_id, @tcaption;     WHILE @@FETCH_STATUS = 0     BEGIN                   -- Insert the new Section and record the identity          INSERT INTO tblSection (agenda_id, parent_id, caption) VALUES (@tparent_id, @tcaption);           SET @newSectionID = SCOPE_IDENTITY();          -- Update the temp variable table with the new identity from the newly created real section in tblSection                -- Update all temp variable records to point to the new parent_id          UPDATE @tblSection SET parent_id = @newSectionID WHERE parent_id = @tid;          FETCH NEXT FROM c1 INTO @tid, @tparent_id, @tcaption;     END     CLOSE c1     DEALLOCATE c1     END----------------The
critical "UPDATE @tblSection" part doesnt seem to update the temp
variable table with the @newSectionID (the actual section identity
obtained after inserting a real record into the tblSection table).  So
in the end the inserted records into tblSection still point to the
incorrect parent_id instead of the copied record's parent_id.Maybe I'm using CURSOR incorrectly or not setting a parameter so that it refreshes its recordset?  I've tried using both table variables and temp tables but no luck.

View 2 Replies View Related

Vista Is Going To Drive Me Insane With SQL

Oct 26, 2007

I upgraded to Vista last week. I immediately lost complete access to SQL Server 2000 (screw the money it cost to buy, I'm past that now). Now I CANNOT access my data!!!!!!!!!!!!!!

How the heck do I install SQL Server Express on a laptop with Vista. It has a dual core intel chip. I have installed/uninstalled every f'ing SQL Server Express out there. I keep getting an error about not allowing remote connections so (error 26). I can't take anymore. I've spent 3 days on this problem.

Can someone give me a link for a download or at least tell me how to get SQL up and running. I need my data!!!!!!!!!!!!!! I need my applications!!!!!!!!!!!!

I'm about to just go out and buy a new computer.

View 4 Replies View Related

Ugh...timeout Error Driving Me Insane

Mar 28, 2006

ok here's the deal...

I've got 2 identical DB's on the same server, one production, one test. No we don't have a test env, but at least I'm not testing on a prod DB (some people here do, trust me).

I've got a prod VB6 app that used SQL sp's. I've pointed the ADO connection string to the test DB while I make the changes I need to make, and I'll obviously change it back before I'm done etc.

I made some VERY minor changes to one of the sp's (added a variable, changed some stuff), tested thoroughly in query analyzer (runs with no errors in <1 sec), altered my ADO command accordingly and when I executed I get this:

run time error '-2147217871 (80040e31):
[Microsoft][ODBC SQL Server Driver] timeout expired

The connection to the server is fine, I've tested that - it trips on the execution of the command:

Set rstCalls = conHelpArchiveConnection.Execute(SQLQ)

so here's my question: The prod version of this app works like a charm, and the test app times out. I'd rather not toy with the connection timeout setting on the server. Any thoughts on what could be causing this?

Any help would be appreciated, I'm ready to throw in the towel. Well at least until tomorrow morning ;)

View 7 Replies View Related

Replicate Schema/Replicate Data Only

Sep 7, 1999

Using SQL 7.0 I'd like to replicate just schema from DB on server A to DB on server B, then be able to replicate data only form DB on server B to DB on server A. I need help!!

Thanks for ANY information you can give me...
~Jepadria

View 2 Replies View Related

How To Re-set A Job To Run 10 Minutes Later

Aug 12, 2005

Hi,

I have a job where the first step starts and checks for a condition. If its not true, I want it to reset itself and start again in 10 minutes. I'm using sp_stop_job and sp_update_jobschedule and, initially, it looks like it works. But since it's a Daily job, the 'Next Run Date' increments to the following day. Even though I'm using sp_update_jobschedule to keep the active_start_date as the same day, it still increments. I've tried updating sysjobschedules directly, but get the same results.

Any thoughts much appreciated! Here's my code:
USE msdb


--This is the part that goes in the job step
--and increments the next_run_time if the condition is true.

If
(Select count('x') from mytable (NoLock)
Where PublicationDate > getdate()) < 1
BEGIN
Declare @ActiveStartDate int
Declare @ActiveStartTime int

Select @ActiveStartDate = active_start_date from msdb.dbo.sysjobschedules (NoLock)
Where schedule_id = 61
Select @ActiveStartTime = active_start_time from msdb.dbo.sysjobschedules (NoLock)
Where schedule_id = 61

EXEC msdb.dbo.sp_stop_job @job_name = 'Owners'
Select @ActiveStartTime = @ActiveStartTime + 1000

EXEC sp_update_jobschedule @job_id = '46C074D4-908D-46AE-8B0C-A23E3AD4A4F6',
@name = 'Daily',
@active_start_date = @ActiveStartDate,
@active_start_time = @ActiveStartTime
End

View 3 Replies View Related

Min/max Of X Minutes

Mar 27, 2006

I am trying to develop a sql statement that will create a recordset of the min (or max) values in x minute increments over a period of time.

e.g. over a period of 7 days, I have data that was collected in 1 minute intervals. I need to know the min (or max) value in each 10 minute interval over that same period of time.

Is there an efficient way of doing this?

View 3 Replies View Related

SQL 7 Replicate Then FTP ?

Aug 18, 2000

I am new (very new) to SQL. I 'm trying to set up SQL 7 to replicate a particular table on a daily schedule and then FTP the file out to a remote directory. Sounds easy! I'm sure it is, I just need someone to walk me through the steps.

If anyone can help me out I would really appreciate it.

View 2 Replies View Related

Why Can't Replicate?

Jul 9, 2004

Hi my friends,

I'm replicating with SQL Server 2000(updated Service Pack 3) get error:

SQL Server Enterprise Manager could not configure 'BREEZE1' as the Distributor for 'BREEZE1'.

Error 14113: Could not execute "'"C:program filesmicrosoft sql server80 ools\binnosql" -E -l60 -t60 -d"distribution" -b -i"c:MSDESQLBinnMSSQL\installinstdist.sql" -o"c:msdesqlinnmssql\installinstdist.out"'". Check 'instdist.out' in the install directory.
'distribution' is not configured as a distribution database.
Deleting database file 'c:msdesqldatamssqldatadistribution.ldf'.
Deleting database file 'c:msdesqldatamssqldatadistribution.mdf'.

I have a feeling this is failing because I have not C:msdesqlinnmssqlinstall directory at all.

Is there something I'm doing wrong...If the SP3 can affect???

View 1 Replies View Related

REPLICATE

Oct 4, 2007

This code :

declare @filenumber as char
set @filenumber = '65'

declare @filenu2 as char(6)

set @filenu2 = CONVERT(CHAR(6),(replicate('0',(6-len(@filenumber)))+ @filenumber ))

select @filenu2 as x



This should return 000065
but it returns 000006
i have stepped through it the replicate should replicate the 0 4 times
(6 - len of @filenumber) instaed its doing it 5 ??

View 8 Replies View Related

Can Not Replicate DDL Changes

Jun 6, 2007

Merge replication. We switched a publication over from push to pull and are now initiating everything within an application. We have just encountered a situation where it is now completely impossible to replicate DDL.



When this was a push subscription, we could execute the following and it would fly straight through the engine and hit every subscriber without having to do anything at all:

ALTER TABLE <tablename>

ADD <columnname> <datatype> NULL



Now that it is a pull subscription when I issue an ALTER TABLE and add a nullable column to the end of the table, it does NOT replicate at ALL. We get the following error message:




The schema definition of the destination table 'dbo'.'Player' in the subscription database does not match the schema definition of the source table in the publication database. Reinitialize the subscription without a snapshot after ensuring that the schema definition of the destination table is the same as the source table. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199478)
Get help: http://help/MSSQL_REPL-2147199478

The process was successfully stopped. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199481)
Get help: http://help/MSSQL_REPL-2147199481

It apears that we are now required to either reinitialize every subscriber every time we add a column or we are required to first distribute the DDL change to each subscriber, make sure they all have it, then add it to the publisher before anyone replicates, and then reinit every single one of them without a snapshot. This makes absolutely no sense at all.



The interesting thing is that we can add articles at will and those get applied with absolutely no problems at all to the subscribers without having to do anything other than add the article and generate a new snapshot.



Version 9.00.3042.00

View 8 Replies View Related

Group On Minutes

Mar 4, 2002

Hi,
I need to write a query whioch give me count on
0-15 minutes and then from 0-720 minutes.
I don't know how to group it.
Any help appreciated.
TIA

View 1 Replies View Related

Datetime To Minutes?

Aug 3, 2004

hey all, i need to find the ratio of difference in 2 datetime variables and the difference of another 2 datetime vars. I figured the best way to do it is to convert the difference in both numerator and denominator to number of minutes.

can anyone help ??

View 1 Replies View Related

CURRENT_TIMESTAMP - 5 Minutes

Sep 25, 2006

:shocked: hi,

I want to use CURRENT_TIMESTAMP - 5 minutes in a select and where clause.

I have tried using

CURRENT_TIMESTAMP - 0.004 AS [Time_-6]

But this is not a round off to a whole minute

Also tried

CURRENT_TIMESTAMP, dateadd(minute, datediff(minute, 0, CURRENT_TIMESTAMP) / 5 * 5, 0)

But this will not do wholes seconds e.g

CURRENT_TIMESTAMP = 10.03.33

CURRENT_TIMESTAMP, dateadd(minute, datediff(minute, 0, CURRENT_TIMESTAMP) / 5 * 5, 0) = 10.00.00

Can anyone help??

View 2 Replies View Related

MS SQL Performance From 10 To 3 Minutes

Sep 27, 2006

Hello all !

I am runing from .NET application an SQL Query
it normally return the rows in 10 seconds
but time to time the application turn 2 or 3 minutes and nearlly crash (or crash)

with exactly the same datas in database

what can be the reasons ?

thank you

View 8 Replies View Related

Got Seconds But Need Minutes

Apr 16, 2004

I have a result that comes out in number of seconds, but need to see it converted to minutes and hours and seconds. Is there a convert function that would do this?

Thanks,
Dan

View 3 Replies View Related

Date - 15 Minutes

May 11, 2008

how can i get my date minus 15 minutes in sql?
is there a dateadd function?

View 2 Replies View Related

Group By Every 15 Minutes?

Sep 20, 2013

I have this script that runs on a LOGGING database and find hourly requests for a particular firm.

The date format is "2013-08-19 13:44:50.177"

How can I group it by every 15 mins?

select
LocalDate [date],
LocalHour [Hour],
count(*) [requests],
avg(web_request_duration) [avg response time],
min(web_request_duration) [min response time],
max(web_request_duration) [max response time]

[Code] ....

View 4 Replies View Related

Set Time Up To Minutes

Oct 28, 2014

I am using below query to get the today date and time(2 hrs more than actual time)

select dateadd(HOUR, 2, getdate()) as time_added

the result of above query is "2014-10-28 13:19:09.343" but I want time up hours like shown below

"2014-10-28 13:00"

View 7 Replies View Related

All Records Within X Minutes Of Each Other

Aug 30, 2005

Consider a table that holds Internet browsing history for users/machines,date/timed to the minute. The object is to tag all times that are separatedby previous and subsequent times by x number of minutes or less (it couldvary, and wouldn't necessarily be a convenient round number). This willenable reporting "active time" for users (a dubious inference, but hey).There are a lot of derivative ways of seeing this information that might begood to get to. What's the fist and last of these sets of times? Whatpercentage of a given period is spanned by active times, and not? What isthe average duration of such periods? What is the average interval betweenweb hits during such periods? During other times?Blah, blah. The basic problem is my principal problem. I don't have muchexperience with cursors, but from what I understand it would be very goodindeed to spare them, given the number of records I anticipate workingwith.I'd be glad of any pointers.--Scott

View 29 Replies View Related

The DB Freezes For 5 Or 10 Minutes

Oct 9, 2007

Hi,
the SQL DB freezes and no one can access the DB for 5 or 10 minutes. Even select queries don t execute, nothing is displayed.

Until we kill the process id that s blocking in the sql activity monitor, only then the DB is released and people can work again.
What does it mean that no query executes until we kill the processes ID? what could it be?

Also, recently we created indexes and ran tuning adviser, is it possible that the creation of indexes cause the freeze of a DB? is that possible?

Thanks a lot for your help

View 6 Replies View Related

Cannot Connect Again After 15 Minutes

Nov 19, 2006

Hi,

I have SQL 2005 full version installed a remote server and when I start my computer I can connect to the database from SQL Managment Studio and a program I'm making. After about 15 minutes I find that I cannot connect using both programs, but if I enter the servers IP address using Managment Studio I can connect (this does not happen with the program I'm making). I have to log of my computer before I can connect again.

Anyone having the same problem or how to fix it??

Thanks

PQSIK

View 1 Replies View Related

What Is The Best Way To Replicate Data?

Oct 18, 2006

Hi everyone, I've recently been thrown into a DBA role (I've never done any DBA work except writing a few SQL queries), so please go easy on me if these are stupid questions. My first task is to find the best way to replicate data between two SQL Server production databases. The data is to come from Production DB #1 to Production DB #2 (for access by a different system). The data has to be super-close -- not necessarily real-time, but within a few minutes. So when data is updated in #1, #2 shouldn't be be lagged by more than 45 minutes (5-10 is ideal). There are hundreds of thousands of records.What would be the best way to do this? Are there options in SQL Server 2005 to do "differential" updates from DB1 to DB2? Or is that how "transactional replication" works?  If we were to implement a "full recovery model", will this impact any sort of replication? Thanks.  

View 2 Replies View Related

Replicate To Laptops??

Mar 30, 2001

WE have a production database that we need to sync with about 100
salesman's laptops. These laptops will not always be online and
would need to sync on the fly.

We are thinking of having a separate distribution database to handle
the load and creating either a pull subscription or even just a DTS
package. We would like to have the salesmen just signon and go to an
ASP page and hit an Icon and either the pull subscription or the dts
package would start the sync..

Anyone tried this before and have any other ideas??

Thanks for any help??
SB

View 2 Replies View Related

Trans Rep Will Not Replicate

Jun 18, 2001

I have set up a simple trans rep from a server in the office to the web. both servers are NT4sp6aSQL 7.0. Tables only.

The publication and distribution db are on the server at the office, and there is a full time connection through the firewall.

The initialization and first replication works perfectly, but after that, there is a message from the snapshot agent that "no subscriptions needed initialization", the logreader says thare are no replicated transactions and the Distribution agent says there are no replicated transactions. What am I missing?

Thanks in advance

View 1 Replies View Related

What Is The Best Way To Replicate The Data?

Nov 15, 1999

Hi, there
I have a situation here....
I have Production DB and Development DB in the same SQL7.0 box....
I want to update the data and SP from Pro. to Dev at least once a day...
So this is my plan.

1. Back up(Pro.) and restore(Dev.) so I can have the same DB in the same box.
2. Using a Replication (Pulication and Subscription) ro update the data and SP.
3. Because DTS can not update the SP, I use the replication instead of DTS.
I need to update the SP, too..(Front end is ACCESS and backend is SQL7.0 DB)

Is there any other methods or way to make ti happen... Any suggestion can help...

Thanks in advance

Jay

View 2 Replies View Related

LogShip/Replicate

Jul 9, 2004

Can you have a database setup for both replication to server A and log shipping to server B?

Thanks,
Ken Nicholson

View 1 Replies View Related

Couldn't Replicate ???

Jan 4, 2006

Hi,

I'm new to replication.
I configured Server named TESTER as publisher & distributer. Create new publication for database named TEST ( type : Transactional ), then Create a new push subcriptions for database TESTREPLICATION ( on the same Server : TESTER). Then I open a table in database TEST to input some data but I couldn't see any tables or data in database TESTREPLICATION ( I chose Continuously, not scheduled).

Yet, after the lunch, I could see the tables, no data. I tried to choose Start Synchronizing but not helped.

Please tell me if I configured incorrectly ?

Thanks,

View 7 Replies View Related

Replicate MS SQL 6.5 DB In Oracle 10.2.0

May 27, 2007

Could someone please point me in the direction on where to look for info on how to:
Replicate an MS SQL 6.5 tables on an Oracle 10.2.0 server every 5-10min?

View 4 Replies View Related

How To Replicate Login Changes?

Aug 10, 2001

Hi:
In the publishing server, admin users could change and non-admin user password and also add login and drop login.

How could it happen to not only replicate the application database to subscriber server but also replicate the changes made in master database?
So that the remote subscriber server will have the most current login updates?

thanks
D

View 1 Replies View Related

Replicate Tables

Oct 18, 2007

Hi,

When I'm using MS SQL transactional replication and select all the tables to be replicated, some of the tables are marked with the red cross signs and aren't being replicated. How do I include these tables into the MS SQL replication? I tried to build indexes and re-created publications, but it didn't work.

Please help!

Thanks in advance,
-Alla

View 1 Replies View Related

How To Replicate A Database

Dec 3, 2012

Is any tool is available for replicating the Microsoft sql database..

View 1 Replies View Related







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