Showing posts with label continuous. Show all posts
Showing posts with label continuous. Show all posts

Thursday, March 8, 2012

continuous variable prediction

Hi All,

I was wondering if there was a way to specify a range when training a model to predict continuous variables. For instance, the predicted variable can only have a range of 1 - 10.

Thanks

Not really, and it's possible that even if you restrict the training data to the range 1-10 you can end up with predictions outside that range (e.g. if you found x=2y and put 8 as your input).

What you can do is use VBA or Excel MIN/MAX functions on your prediction result. For example you can call

SELECT [MAX]( [MIN]( Predict(MyColumn), 10), 1)

FROM MyModel

PREDICTION JOIN ...

continuous replication

Hi,
I have managed to set up continuous replication. However , i found out that
when there error such as "general network error" the replication stopped.
In such cases , won't it automatically re-do the synchronization ? and is
there any way to allow auto-synchronization if the network becomes "alive"
again ?
btw i have set up replication alerts if the agent failed
appreciate ur advice
tks & rdgs
Message posted via http://www.droptable.com
Either have your agent run continuously and restart every 5 minutes, or have
the agent on failure loop back to step 1.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"maxzsim via droptable.com" <u14644@.uwe> wrote in message
news:5a91e9a42b79b@.uwe...
> Hi,
> I have managed to set up continuous replication. However , i found out
> that
> when there error such as "general network error" the replication stopped.
> In such cases , won't it automatically re-do the synchronization ? and is
> there any way to allow auto-synchronization if the network becomes "alive"
> again ?
> btw i have set up replication alerts if the agent failed
>
> appreciate ur advice
> tks & rdgs
> --
> Message posted via http://www.droptable.com
|||Hi ,
Curently this is how the flow for the continuous replications works
1)Distribution Agent startup mesage , on success --> go to next step , on
failure --> go to next step
2)Run agent , on success -->
quit with success , on failure --> go to next step ( but have specified to
retry 10 times btw an interval of 1 mins)
3)Detect nonlogged agent shutdown, on success --> Quit with failure , on
failure --> quite with failure
from ur suggesstion of "having the agent loop back" at which step shld the
loopback occur and MUST all the steps ( 1 - 3) be performed ?
i am thinking of if step 2 fails , then i'll loop back to step1 but i am not
sure what step3 does or upon success from step2 , i can go to step3 ?
need ur advice
tks & rdgs
Hilary Cotter wrote:[vbcol=seagreen]
>Either have your agent run continuously and restart every 5 minutes, or have
>the agent on failure loop back to step 1.
>[quoted text clipped - 11 lines]
Message posted via http://www.droptable.com
|||step 3 on failure should loop back to step 1
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"maxzsim via droptable.com" <u14644@.uwe> wrote in message
news:5a929eb6fdf53@.uwe...
> Hi ,
> Curently this is how the flow for the continuous replications works
> 1)Distribution Agent startup mesage , on success --> go to next step , on
> failure --> go to next step
> 2)Run agent , on success -->
> quit with success , on failure --> go to next step ( but have specified to
> retry 10 times btw an interval of 1 mins)
> 3)Detect nonlogged agent shutdown, on success --> Quit with failure , on
> failure --> quite with failure
> from ur suggesstion of "having the agent loop back" at which step shld
> the
> loopback occur and MUST all the steps ( 1 - 3) be performed ?
> i am thinking of if step 2 fails , then i'll loop back to step1 but i am
> not
> sure what step3 does or upon success from step2 , i can go to step3 ?
> need ur advice
> tks & rdgs
> Hilary Cotter wrote:
> --
> Message posted via http://www.droptable.com
|||tks for ur advice i'll try it out
Hilary Cotter wrote:[vbcol=seagreen]
>step 3 on failure should loop back to step 1
>[quoted text clipped - 29 lines]
Message posted via http://www.droptable.com

Continuous nonstop pumping of data

I have one data pump in a series that was pumping in too many records. Doing an independent query of the source table, I found there was about 140,000 records. My pump uses a variable for the source query, nothing fancy just a simple SELECT * FROM table WHERE DateField > '4/6/2006 12:00:00AM'. The Destination is local on the SQL Server and is set by a variable, and does a fast load. When I went away and checked in BIDS while it was running (the data flow tab where you can see the record count) it was at 28,000,000 and still going!

Any ideas what could be causing this? As I say there are only 140,000 records and no joins in the query--is this a bug someone has run into before?

Thanks,

Kayda

Sounds like you are using a variable to populate the SQL query for the date constraint, but that it isn't getting populated correctly.|||Actually, even without the date constraint the number of records is only 280,000 or so. Actually, I see that this is happening when it loses its connection to the database. This package has to access information through different dialup connections, and these connections are dialed through code in the package. It seems when the dialup connection is dropped then the datapump task that is running just appears to keep going infinitely, saying it is pumping millions of records. Any idea why this would happen and the pump would not just fail?

Continuous Merge Replication questions

Ok excuse my lack of knowledge in this department and hopefully someone
can help easily.
When using Merge replication with continuous updating subscribers, it
appears when there is a network outage (as everywhere will get sooner or
later) that it will not try to update until I manually push synchronize.
So that sort of makes it appear useless in my eyes.
Can someone tell me how I can avoid this problem. The only way I have
been able to get around is by setting the subscriber to update every
minute but this is not ideal.
Can the calls to publish and synchronize be coded? if so please help.
And the other query I have is what is the difference between continuous
updating subscribers and transactional replication? Am I missing something?
Cheers,
Tim
You could hardcode the jobsteps to work in a loop (step 3 -> step 2) to
have it automatically restart.
For subscriber updates, merge is similar to transactional replication with
queued updating subscribers. A few differences...
TR works on a transaction basis while merge works on changed data ie 1000
updates to a row will be 1000 stored proc calls for tr while 1 updated row
in merge.
Text and Image changes are treated differently.
Requirement for PK in TR.
More conflict resolvers in merge than queued updating subscribers.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Wednesday, March 7, 2012

continuous merge replication - event log

Hi

I have set up merge replication and it works nicely.

I have set it up to work continuously, because I thought that if it can't find the subscriber or is offline then that's fine it will just sync again when it's back on line.

This is true

BUT it keeps throwing lots of messages into the event log to tell me the merge has failed.

SO

a. Can i just turn off the error reporting

or

b. How can I get it to sync this way automatically on connection without the error messages

thanks

ICW

Unfortunately there's nothing built in to suppress these messages. Maybe instead of running continuously, you can schedule it to run frequently, like every 10 minutes?

continuous dates

Hi Guys,
I have a sql query that returns a count of a certain column say the
number of bugs per w on a w by w basis. there are some ws
which have no bugs and these ws are not returned. How can I write a
sql query that has all the ws whether there were bugs or not and
return 0 for the ws where there were no bugs.
for example:
at the moment:
w no. of bugs
22/1/06 10
15/1/06 5
1/1/06 2
(w 8/1/06 is missing)
what I expect :
w no. of bugs
22/1/06 10
15/1/06 5
8/1/06 3
1/1/06 2
infact I want all the ws from 1970 to present
Thanking you,
Regards,
NJYou need to provide more information to get an accurate response. It would
greatly help to see the table involved and some sample data. What is the
criteria for determining if there is a bug or not? Are you summing rows
with similar dates or is there a BUG column that has a value in it. Your
example does not make sense in that you state 8/1/06 is missing yet you show
it as having 3 bugs.
Andrew J. Kelly SQL MVP
"NJ" <npaulus@.hotmail.com> wrote in message
news:1137886146.073541.14890@.g43g2000cwa.googlegroups.com...
> Hi Guys,
> I have a sql query that returns a count of a certain column say the
> number of bugs per w on a w by w basis. there are some ws
> which have no bugs and these ws are not returned. How can I write a
> sql query that has all the ws whether there were bugs or not and
> return 0 for the ws where there were no bugs.
> for example:
> at the moment:
> w no. of bugs
> 22/1/06 10
> 15/1/06 5
> 1/1/06 2
> (w 8/1/06 is missing)
> what I expect :
> w no. of bugs
> 22/1/06 10
> 15/1/06 5
> 8/1/06 3
> 1/1/06 2
> infact I want all the ws from 1970 to present
> Thanking you,
> Regards,
> NJ
>|||Thanks for yor reply Andrew
I am summing rows with similar dates. and sorry about the 8/1/06 too it
should have 0 bugs. It doesnt show in the output of the first query
because there are no bugs during the w 8/1/06 to 14/1/06. In my
table everytime there is a bug it is entered into the database along
with the date it happened.
my query then finds the w (starting date of the w when the bug
occured i.e if the bug occoured on the 11 th jan 2006 then it becomes
8/1/06 as 8th is the starting day of the w) and counts all the rows
with similar dates. ie: I group by w. Because of this there are
ws when no bugs occured and hence dont show up in the query result.
however I want to be able to return that date with a 0 for the number
of bugs for that w.
I hope that explains a bit better Andrew.
Regards,
NJ|||Thanks for yor reply Andrew
I am summing rows with similar dates. and sorry about the 8/1/06 too it
should have 0 bugs. It doesnt show in the output of the first query
because there are no bugs during the w 8/1/06 to 14/1/06. In my
table everytime there is a bug it is entered into the database along
with the date it happened.
my query then finds the w (starting date of the w when the bug
occured i.e if the bug occoured on the 11 th jan 2006 then it becomes
8/1/06 as 8th is the starting day of the w) and counts all the rows
with similar dates. ie: I group by w. Because of this there are
ws when no bugs occured and hence dont show up in the query result.
however I want to be able to return that date with a 0 for the number
of bugs for that w.
I hope that explains a bit better Andrew.
Regards,
NJ|||Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. Sample data is also a good idea, along with clear
specifications. It is very hard to debug code when you do not let us
see it.
Guessing at what you have, build a report range table:
CREATE TABLE WRanges
(w_nbr INTEGER NOT NULL PRIMARY KEY,
w_start DATETIME NOT NULL,
w_finish DATETIME NOT NULL,
CHECK (w_start, w_finish));
then do a query like this:
SELECT W.w_nbr, W.w_start, COUNT(B.bug_id)
FROM WRanges AS W
LEFT OUT JOIN
BugReport AS B
ON B.bug_date BETWEEN W.w_start AND W, w_finish
GROUP BY W.w_nbr, W.w_start;|||
--CELKO-- wrote:

>Please post DDL, so that people do not have to guess what the keys,
>constraints, Declarative Referential Integrity, data types, etc. in
>your schema are. Sample data is also a good idea, along with clear
>specifications. It is very hard to debug code when you do not let us
>see it.
>
True. Unfortunately, not letting us see this code of yours
would have been much kinder. Slop, slop, slop.

>Guessing at what you have, build a report range table:
>CREATE TABLE WRanges
>(w_nbr INTEGER NOT NULL PRIMARY KEY,
> w_start DATETIME NOT NULL,
> w_finish DATETIME NOT NULL,
> CHECK (w_start, w_finish));
>
CHECK what?

>then do a query like this:
>SELECT W.w_nbr, W.w_start, COUNT(B.bug_id)
> FROM WRanges AS W
> LEFT OUT JOIN
>
LEFT OUT JOIN?

> BugReport AS B
> ON B.bug_date BETWEEN W.w_start AND W, w_finish
>
W, w_finish? And for that matter, how is BETWEEN going
to work at all?. Do Sunday bugs get counted in two separate
ws, or do they not get counted at all? Who knows?

>GROUP BY W.w_nbr, W.w_start;
>
>
Steve Kass
Drew University|||On 21 Jan 2006 15:29:06 -0800, NJ wrote:

>Hi Guys,
>I have a sql query that returns a count of a certain column say the
>number of bugs per w on a w by w basis. there are some ws
>which have no bugs and these ws are not returned. How can I write a
>sql query that has all the ws whether there were bugs or not and
>return 0 for the ws where there were no bugs.
Hi NJ,
Use a calendar table (www.aspfaq.com/2519).
SELECT c.dt, COUNT(y.BugDate)
FROM Calendar AS c
LEFT OUTER JOIN YourTable AS y
ON y.BugDate >= c.dt
AND y.BugDate < DATEADD(day, 7, c.dt)
WHERE c.dayname = 'Sunday'
(untested - see www.aspfaq.com/5006 if you prefer a tested reply)
Hugo Kornelis, SQL Server MVP