Category Archives: DB Notes

Database Articles

SQL Server 2008: SQL Mail does not work with the 64-bit version of SQL Server (Microsoft SQL Server, Error: 17938)

Recently I got email from one of the blog reader that he is getting below error while setting up SQL MAIL as legacy feature in SQL Server 2008.

Error:
SQL Mail does not work with the 64-bit version of SQL Server (Microsoft SQL Server, Error: 17938)

Solution:
SQL Mail is not supported on 64-bit versions of SQL Server. SQL Mail stored procedures cannot be installed on 64-bit versions. If you want to still use it you have to go with the 32-bit edition or start using database mail, which is more easy.

Follow below article link to start converting your SQLMAIL to DB Mail.
http://msdn.microsoft.com/en-us/library/ms187891.aspx

Advertisements

How to make Lite Speed Central database and Local repository in sync?

If you have configured the LiteSpeed in your environment using the Lite Speed Central repository option, there will be a scenario when Lite Speed Central repository misses some data. To make the data available in central repository you can use the LiteSpeed local database and execute the below procedure to ensure that cenral repository comes in sync with the local repository.

exec dbo.xp_replicate_activity_statistics

Permission required for SP_UpdateStats

To update the statistics on the database you should either be DBO of that database or SysAdmin on SQL instance.
SPUpdateStats

If you want to grant the least permission instead of server level permission you make the user DBO of the database. You can do it from database properties windows as below.

DBO

You can also make the user DBO using below command.

USE [My_Policy]
GO
EXEC dbo.sp_changedbowner @loginame = N’jugal’, @map = false
GO

Get the List Of DBCC Commands & Syntax

If you don’t remember all the DBCC commands “NO Issue” execute the DBCC HELP command to get the list of all the DBCC.

DBCC HELP('?')

checkalloc
checkcatalog
checkconstraints
checkdb
checkfilegroup
checkident
checktable
cleantable
dbreindex
dropcleanbuffers
free
freeproccache
freesessioncache
freesystemcache
help
indexdefrag
inputbuffer
opentran
outputbuffer
pintable
proccache
show_statistics
showcontig
shrinkdatabase
shrinkfile
sqlperf
traceoff
traceon
tracestatus
unpintable
updateusage
useroptions

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Don’t remember syntax, execute below command to get the syntax.

DBCC HELP('checktable')

DBCC