Sunday, March 11, 2012

DB Questions

1. If the TempDB Database is deleted from MS-SQL Server what will
happen..?
2. How to insert a not null column in an existing table with
records..?
3. If a table is deleted, what will happen for the Stored procedures
and Views, which that table reffered..?1. TempDB will be re-created automatically when you restart SQLServer. You
can't delete TempDB while SQLServer is running.

2. Either assign a DEFAULT value to the column, or make it nullable to start
with, populate the column and then alter it to NOT NULL.

3. Dependent SPs and views won't be deleted but they will generate an error
when they are used.

--
David Portas
SQL Server MVP
--

No comments:

Post a Comment