Showing posts with label updates. Show all posts
Showing posts with label updates. Show all posts

Monday, March 26, 2012

refreshing index after updates to indexed column in database?

I have just begun to experiment with the full text searching capabilities in
SQL2000. Very happy so far! Nice work. I like the INFLECTIONAL results.
When the user makes a change or addition to a row's full-text-indexed column
(e.g. adds the phrase "now available in brushed aluminum" to the Description
column) what needs to be done so that the full-text indexes reflect the
change/addition and the row will be found in subsequent searches? Is there
a daemon that does reindexing periodically that needs to be configured, or
can updates be made to appear in real time, or does the index have to be
rebuilt in toto manually?
Thanks!
TR
Change tracking does near real time updates. To enable change tracking use the following proc
sp_fulltext_table 'TableName','start_change_tracking'
sp_fulltext_table 'TableName','start_background_updateindex'
You do not need a timestamp column on your table.
If you want to do an incremental index and your table has a time stamp column you have to manually kick off the indexing process. If your table does not have a timestamp column a full population will be run, and again you have to manually kick it off.
use
sp_fulltext_table 'TableName','start_incremental' -- for an incremental population
or
sp_fulltext_table 'TableName','start_full' -- for a full population
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
-- TR wrote: --
I have just begun to experiment with the full text searching capabilities in
SQL2000. Very happy so far! Nice work. I like the INFLECTIONAL results.
When the user makes a change or addition to a row's full-text-indexed column
(e.g. adds the phrase "now available in brushed aluminum" to the Description
column) what needs to be done so that the full-text indexes reflect the
change/addition and the row will be found in subsequent searches? Is there
a daemon that does reindexing periodically that needs to be configured, or
can updates be made to appear in real time, or does the index have to be
rebuilt in toto manually?
Thanks!
TR
|||Thanks!

Friday, March 23, 2012

Refresh default value

Hello,

I have report parameters B with default from query.

This query depend on other report parameters A that updates befor report parameter B.

While user open the report and update report parameter A, the report parameter B get default value with the right default value but when user change his selection in parameter A, the default value in parameter B doesn't changed

Any idea ?

Smashing values that the user selected (either explicitly or implicitly by not changing the default) is usually considered to be a bad thing.There exist uncommon cases where the author of the report can reasonably know the user would expect their previously selected value will be overridden. Unfortunately, RS currently doesn't have a feature which would allow the report author to distinguish the common case from the uncommon case. As a result, there is no choice but to go with a design that optimizes for the common case. (Note: RS 2000 defaulted to smashing the user’s selection with the default when an upstream parameter value changed. The resulted in a large volume of customer complaints).
One option you may want to explore which may help in this particular case: If the Valid Values list changes (as a result of the upstream parameter value changing) and it no longer contains the user’s selection, we are forced to revert to the default. Careful use of the Valid Values list can in many cases simulate the desired behavior of always overriding the user’s selection back to the default.|||

Sorry but I don't understand your answer.

I have parameter "Date Unit" (Shift, Day, Week, Month, Quarter , Year)

I have parameter "From Date"

I want while user select under "Date Unit" :

Shift or Day the from date will be Today - 7 days

Week the from date will be today - 12 weeks

Month, Quarter the from date will be today - 12 month

Year - the from date will ve today - 2 years.

Any option to do that ?

|||You can trying plugging in an expression for the default value of the From Date cascading parameter that checks Parameters!DateUnit.Value but I think this will only work the first time the report is rendered. Once the user changes the Date Unit parameter and the report refreshes, the default value of the From Date parameter won't be reset. I explained the reasons for this behaviour in my previous post.|||

This is my problem

"Once the user changes the Date Unit parameter and the report refreshes, the default value of the From Date parameter won't be reset"

|||

I know this is an older post but I found it while searching for something else. Would this work for your situation?

Write a stored procedure that takes a parameter where that parameter is the "Date Unit" you're selecting as a VARCHAR. In that sproc, you test that value and then return dynamically the correct date you want as the default for your From Date.

The sproc always returns a single row with a single column called DEFAULT_DATE or something, but what it returns is dynamic based on the parameter input. Then you create a dataset using this sproc and set it's input parameter to your Paarameters!DateUnit and set your default for your From Date to use this dataset's DEFAULT_DATE value.

I think I've done that in the past. Every time the user changes the date unit, the from date will change to the appropriate default.

...I think.

:)

sql

Refresh default value

Hello,

I have report parameters B with default from query.

This query depend on other report parameters A that updates befor report parameter B.

While user open the report and update report parameter A, the report parameter B get default value with the right default value but when user change his selection in parameter A, the default value in parameter B doesn't changed

Any idea ?

Smashing values that the user selected (either explicitly or implicitly by not changing the default) is usually considered to be a bad thing.There exist uncommon cases where the author of the report can reasonably know the user would expect their previously selected value will be overridden. Unfortunately, RS currently doesn't have a feature which would allow the report author to distinguish the common case from the uncommon case. As a result, there is no choice but to go with a design that optimizes for the common case. (Note: RS 2000 defaulted to smashing the user’s selection with the default when an upstream parameter value changed. The resulted in a large volume of customer complaints).
One option you may want to explore which may help in this particular case: If the Valid Values list changes (as a result of the upstream parameter value changing) and it no longer contains the user’s selection, we are forced to revert to the default. Careful use of the Valid Values list can in many cases simulate the desired behavior of always overriding the user’s selection back to the default.|||

Sorry but I don't understand your answer.

I have parameter "Date Unit" (Shift, Day, Week, Month, Quarter , Year)

I have parameter "From Date"

I want while user select under "Date Unit" :

Shift or Day the from date will be Today - 7 days

Week the from date will be today - 12 weeks

Month, Quarter the from date will be today - 12 month

Year - the from date will ve today - 2 years.

Any option to do that ?

|||You can trying plugging in an expression for the default value of the From Date cascading parameter that checks Parameters!DateUnit.Value but I think this will only work the first time the report is rendered. Once the user changes the Date Unit parameter and the report refreshes, the default value of the From Date parameter won't be reset. I explained the reasons for this behaviour in my previous post.|||

This is my problem

"Once the user changes the Date Unit parameter and the report refreshes, the default value of the From Date parameter won't be reset"

|||

I know this is an older post but I found it while searching for something else. Would this work for your situation?

Write a stored procedure that takes a parameter where that parameter is the "Date Unit" you're selecting as a VARCHAR. In that sproc, you test that value and then return dynamically the correct date you want as the default for your From Date.

The sproc always returns a single row with a single column called DEFAULT_DATE or something, but what it returns is dynamic based on the parameter input. Then you create a dataset using this sproc and set it's input parameter to your Paarameters!DateUnit and set your default for your From Date to use this dataset's DEFAULT_DATE value.

I think I've done that in the past. Every time the user changes the date unit, the from date will change to the appropriate default.

...I think.

:)

Wednesday, March 21, 2012

Referential integrity during replication

Hello forum

I like to build a custom replication application for a databasee.
To questions concering this. The idea is to use a mechanim, which updates table by table (in sequence).

During the replication proccess I update a table (table1), which has 1 to 1 refenceto a second table(table2). This new record is unsing a reference which hasn't been entered by this time into table 2. This is hurts the referencial integrity, right?

Would it help to use a transaction for the update in table 1 and table 2, when is the integrity checked? At the end of the transaction, by the command commit transaction?

Is it possible to switch on/off the referential integrity check while a database is running? If yes, are there any side effects beside that the integrity is not propre controlles anymore?

Thanks for your help in advance!

DominikWhat about this:

drop table test1
drop table test2
go
create table test2(id int primary key)
create table test1(id int, rid int)
ALTER TABLE test1 WITH NOCHECK ADD CONSTRAINT
FK1 FOREIGN KEY(rid) REFERENCES dbo.test2(id)
go
insert test2 values(1)
insert test1 values(1,1)
go
ALTER TABLE dbo.test1 NOCHECK CONSTRAINT FK1
go
insert test1 values(1,11) -- works