Greetings,
I am adding foreign keys to a database and saving the generated scripts.
What I do not understand is that all script begin with empty
transactions. Why ?
Example follows :
/*
vendredi 29 juillet 2005 10:54:36
User:
Server: (LOCAL)
Database: NewsPaper
Application: MS SQLEM - Data Tools
*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFI ER ON
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
SET ARITHABORT ON
SET NUMERIC_ROUNDAB ORT OFF
SET CONCAT_NULL_YIE LDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
COMMIT
BEGIN TRANSACTION
COMMIT
BEGIN TRANSACTION
COMMIT
BEGIN TRANSACTION
COMMIT
BEGIN TRANSACTION
COMMIT
BEGIN TRANSACTION
COMMIT
BEGIN TRANSACTION
ALTER TABLE dbo.Article ADD CONSTRAINT
FK_Article_Publ icationLevel FOREIGN KEY
(
PublicationLeve lId
) REFERENCES dbo.Publication Level
(
PublicationLeve lId
) ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE dbo.Article ADD CONSTRAINT
FK_Article_User Info FOREIGN KEY
(
CreatorId
) REFERENCES dbo.UserInfo
(
UserId
) ON UPDATE CASCADE
ON DELETE CASCADE
GO
ROLLBACK 2 2606
"gabriel" <sp**@yahoo.f r> wrote in message
news:42******** **************@ news.free.fr... Greetings,
I am adding foreign keys to a database and saving the generated scripts.
What I do not understand is that all script begin with empty transactions. Why ?
Example follows : /*
vendredi 29 juillet 2005 10:54:36
User:
Server: (LOCAL)
Database: NewsPaper
Application: MS SQLEM - Data Tools
*/ BEGIN TRANSACTION SET QUOTED_IDENTIFI ER ON SET TRANSACTION ISOLATION LEVEL SERIALIZABLE SET ARITHABORT ON SET NUMERIC_ROUNDAB ORT OFF SET CONCAT_NULL_YIE LDS_NULL ON SET ANSI_NULLS ON SET ANSI_PADDING ON SET ANSI_WARNINGS ON COMMIT BEGIN TRANSACTION COMMIT BEGIN TRANSACTION COMMIT BEGIN TRANSACTION COMMIT BEGIN TRANSACTION COMMIT BEGIN TRANSACTION COMMIT BEGIN TRANSACTION COMMIT BEGIN TRANSACTION ALTER TABLE dbo.Article ADD CONSTRAINT FK_Article_Publ icationLevel FOREIGN KEY ( PublicationLeve lId ) REFERENCES dbo.Publication Level ( PublicationLeve lId ) ON UPDATE CASCADE ON DELETE CASCADE
GO ALTER TABLE dbo.Article ADD CONSTRAINT FK_Article_User Info FOREIGN KEY ( CreatorId ) REFERENCES dbo.UserInfo ( UserId ) ON UPDATE CASCADE ON DELETE CASCADE
GO ROLLBACK
It looks like you're using the Table Designer in EM? I have no idea why the
script includes those statements, but in general it's much better to make
DDL changes using a script in Query Analyzer - EM is useful for admin tasks,
but it's not very suitable for design and programming tasks (in fact, some
tasks cannot be done at all in EM). This article gives more details: http://www.aspfaq.com/show.asp?id=2455
Simon
gabriel (sp**@yahoo.fr) writes: I am adding foreign keys to a database and saving the generated scripts.
What I do not understand is that all script begin with empty transactions. Why ?
Because the Table Designer is seriously buggy, and has number of
severe design flaws, and the empty transactions you see are a token
of these.
These empty transactions are harmless, however, say that you change a column
to a table that both references other tables, and are referred by other
tables. Now these transactions will no longer be empty, but will
comprise different parts of the table-update when it all should have
been one transaction.
Don't use the Table Designer to modify tables, use T-SQL instead. OK,
so you could generate scripts from the table designer, if you review
them *carefully*.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David M Loraine |
last post by:
I am a sql novice and would appreciate any help with the following problem.
In a table I have property addresses stored in 6 fields. Field6 always hold
the Post Code. However, fields 4 and 5 are sometime NULL. Using the
desktop integration package we have which interfaces with MS Word when
printing an address in a letter the end results often end up looking like
this.
1 Any Street
AnyTown
|
by: Clay Beatty |
last post by:
When you create database diagrams in Enterprise Manager, the details
for constructing those diagrams is saved into the dtproperties table.
This table includes an image field which contains most of the relevant
infomation, in a binary format.
SQL Enterprise manager offers no way to script out those diagrams, so
I have created two Transact SQL components, one User Function and one
User Procedure, which together provide a means to script...
|
by: Akbar |
last post by:
Hey there,
Big-time curiosity issue here...
Here's the test code (it's not that long)... it's to display a large
number of image links with captions, ideally pulled in from an
external file (that part's not here -- spotlighting the problem code):
--------BEGIN CODE PAGE------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
by: muzamil |
last post by:
To get rid of redundant data in a table, my cleint will be providing
something like this:
IDtokeep Ids to delete
34 24,35,49
12 14,178,1457
54 32,65,68
I have to write a script for each of the above rows which looks like
|
by: Leaf |
last post by:
Greetings,
I've been reading with interest the threads here on deadlocking, as I'm
finding my formerly happy app in a production environment suddenly
deadlocking left and right. It started around the time I decided to
wrap a series of UPDATE commands with BEGIN/END.
The gist of it is I have a .NET app that can do some heavy reading (no
writing) from tblWOS. It can take a minute or so to read all the data
into the app, along with data...
| |
by: Gertjan van Heijst |
last post by:
Hi,
I really hope someone can help me because I've already spend 2 days on
this problem and I'm not getting anywhere. I think the problem is that
I don't really understand how text boxes store 'empty' values. I'm
trying tot do the following.
I have a continous sub form that lists transactions. On the top level
form I have some text boxes to let the user specify the transactions
between which dates should be listed. To do this I have...
|
by: |
last post by:
I was wondering if anyone can help explain this code for me
<table width="<?= $TABLE_WIDTH ?>" border="0" cellspacing="0" cellpadding="0">
<?php
for ($x=1; $x<=pow(2, $COLUMNS); $x++) {
// open the row
printf('<tr>');
// draw each of the columns in this row...
for ($y=1; $y<=$COLUMNS; $y++) {
|
by: wizard |
last post by:
Hello dear friends,
I am writing a small program to test transactions in php. But when I
try to simulate an error condition during transaction, my php script
aborts. It does
rollback work, but I cannot continue the script. Please help. I am a
newbie to both php and postgresql.
PostgreSQL 7.4.17
PHP 5.1.6
|
by: DVH |
last post by:
Hi,
I've a script that sends mail from my site.
I've included a regexp which should return 403 forbidden if you try to
hijack it and send to another address.
How can I test to make sure it works? E.g. can I try to spoof it to send
mail to my other e-mail address?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |