|
|
-
11 Liked
| 12 Learned
| 3 Comments
|
|
Many of us have been doing different 'unsupported' work-around options to clear history of server names from the SSMS connection dialog. The new version of SSMS released with Denali CTP 3 allows you to easily delete old entries right from the connectio......
|
|
-
|
|
I usually take a backup and restore it when I need to move a database to another server/location. Just learned from Pinal's blog that SSMS offers a "copy database" option which allows you to copy or move a database from one location to another.
To star......
|
|
-
14 Liked
| 12 Learned
| 4 Comments
|
|
During working with replication, encountered with one error to use actual server name for replication. For solution we need to change the SQL Server instance name as actual server name with following,
[CODE]
EXEC sp_dropserver 'Old Server Name'
EXE......
|
|
-
11 Liked
| 12 Learned
| 1 Comments
|
|
SQL Server History
[code]
Version Year Release Name Codename
--------------- -------- ----------------------------------- --------------------
1.0 (OS/2) 1989 SQL Server 1.0 (16bit) -
1.1 (OS......
|
|
-
15 Liked
| 12 Learned
| 8 Comments
|
|
There is something $IDENTITY to get the identity value for a table contained the identity column.
[Code]
create Table T1(Col1 int identity(1,5),Col2 int)
Go
Insert into T1(Col2) Select 100
Go 100
Select $Identity,* From T1
[/Code]......
|
|
-
18 Liked
| 12 Learned
| 10 Comments
|
|
There are no non-logged user database operations. The only non-logged operations are the version stores in tempdb
TRUNCATE TABLE is minimally-logged:
1) Metadata changes are always logged at TRUNCATE time
2) Extent/page deallocations may be logged......
|
|
-
15 Liked
| 12 Learned
| 5 Comments
|
|
In SQL Server, 'Go N' will execute the bunch of commands within the batch 'N' times
[code]
Create Table #Temp(SerialNo int identity Primary key, Product varchar(500))
go
Declare @Product varchar(500)='Mouse'
insert into #Temp(Product)
select @......
|
|
-
14 Liked
| 11 Learned
| 2 Comments
|
|
I recently saw the following code:
IF EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[dbo].[TableName]')
AND type in (N'U'))
DROP TABLE [dbo].[TableName];
However, this is more complicated than needed. You can just...
|
|
-
16 Liked
| 11 Learned
| 2 Comments
|
|
I just was making some performance tests with some batches going one by one, that was returning only times of durations.
At start of every batch I called statements for cold start, so - in result - it added doubled
DBCC execution completed. If DBCC p...
|
|
-
21 Liked
| 11 Learned
| 17 Comments
|
|
I just stumbled across a weird misconception that I'd like to help you to avoid:
If you consume the results of a (non-inline) table valued function, the results are not in the same order as if you take the content óf the TVF in your query.
So, if you h...
|
|