In such cases we can make use of one of the below mentioned methods to make the data read only and avoid its modification.Method 1 : Making the associated file group READ ONLYIn this method we apply the following steps to make the table data read onlyCreate a new fil...
to the right of the property. Rename the constraint Type a new name in the Name box. Make sure that your new name does not duplicate a name in the Selected Primary/Unique Key or Index list. Set the clustered option In the grid select the Create As Clustered and from the dropdown ...
it's better to take the hit once and just refer to your–much smaller–temp table as many times as you need. One more thing–SQL Server 2000 allows you to usetable variables, and they have proven in many cases to outperform your basic temp table.[BOL points out that table variables, ...
The brutal solution to AJ's problem is to ask no questions and submit KILL on the process. A more social behaviour is to use sp_who2 or similar to figure out the culprit is and talk to that person.Friday, June 2, 2017 9:19 AMThanks Erland and Tibor.Erland: In sp_who2 if you ...
SQL check constraint and user-defined functions A scalar-valued user-defined function returns a single value after its invocation. We can use this type of function in the check constraints to define a data validation rule. At the same time, we can pass the inserted data value to this functio...
It's possible the new constraint conflicts with existing data. For example, if you remove a status from aninlist or use more restrictive inequalities. In these cases, you have to leave the new constraint unvalidated or clean the data first. Which path you take depends on why you're changin...
rows. Fortunately, you can use theON DELETEand/orON UPDATEclauses to specify what happens to a foreign key when the primary key value changes or is removed. In SQL Server, there are a number ofON DELETE/ON UPDATEconstraint actions to choose from when defining the foreign key constraint: ...
This will greatly simplify your application design and also allow you to use distributed caching effectively. And a good distributed cache usually provides you with a SQL-like or LINQ querying capability so you won’t miss the filtering features of DataTable. When using a Data...
The examples in this section use fully qualified column references for clarity, but doing so can be a good habit to practice. Not only can they help to make your SQL easier to understand and troubleshoot, fully qualified column references become necessary in certain operations that refer to mor...
Please start any new threads on our new site at All Forums SQL Server 2000 Forums SQL Server Administration (2000) How to secure a database file?