Hi, I have a database that was created on sql 2000 standard edition. The
system requiered to use remote servers so we decided to use msde.
Checking the information that is in the database we discover that there
is some information that is incorrectly.
For example, we have two tables: table1 and table1details, this has ER
defined between them but there is information that is on the
table1details that doesnt exists on table1.
This means that the ER is not working. We try to delete information in
QA but it wasn't posible.
Do somebody know if there is a problem with msde and ER created on the
database.
or do somebody know if ER is not respected when bulk insert data inserts
data into databases'
Thanks a lot for your help.
*** Sent via Developersdex http://www.examnotes.net ***Hi Maria
If the Foreign Key was created with the NOCHECK option existing data would
not be checked to see that it is valid
From BOL:
"WITH CHECK | WITH NOCHECK
Specifies whether the data in the table is or is not validated against a
newly added or re-enabled FOREIGN KEY or CHECK constraint. If not specified,
WITH CHECK is assumed for new constraints, and WITH NOCHECK is assumed for
re-enabled constraints.
If you do not want to verify new CHECK or FOREIGN KEY constraints against
existing data, use WITH NOCHECK. This is not recommended except in rare
cases. The new constraint will be evaluated in all future updates. Any
constraint violations suppressed by WITH NOCHECK when the constraint is adde
d
may cause future updates to fail if they update rows with data that does not
comply with the constraint.
Constraints defined WITH NOCHECK are not considered by the query optimizer.
These constraints are ignored until all such constraints are re-enabled usin
g
ALTER TABLE table CHECK CONSTRAINT ALL."
It is also possible to load data with BULK INSERT/BCP that ignores constrain
ts
From BOL:
"CHECK_CONSTRAINTS
Specifies that any constraints on table_name are checked during the bulk
copy operation. By default, constraints are ignored. Note that the MAX_ERROR
S
option does not apply to constraint checking."
HTH
John
"MariaGuzman" wrote:
> Hi, I have a database that was created on sql 2000 standard edition. The
> system requiered to use remote servers so we decided to use msde.
> Checking the information that is in the database we discover that there
> is some information that is incorrectly.
> For example, we have two tables: table1 and table1details, this has ER
> defined between them but there is information that is on the
> table1details that doesn4t exists on table1.
> This means that the ER is not working. We try to delete information in
> QA but it wasn't posible.
> Do somebody know if there is a problem with msde and ER created on the
> database.
> or do somebody know if ER is not respected when bulk insert data inserts
> data into databases'
> Thanks a lot for your help.
>
> *** Sent via Developersdex http://www.examnotes.net ***
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment