|
Msg 14650, Level 16, State 1, Procedure sp_send_dbmail, Line 68 |
|
Msg 14650, Level 16, State 1, Procedure sp_send_dbmail, Line 68
Service Broker message delivery is not enabled in this database.
Use the ALTER DATABASE statement to enable Service Broker message delivery
|
 |
|
Comments (0)
|
More...
|
|
Aleksandar Tosic's Blog
|
By Aleksandar Tosic on
Thursday, October 23, 2008
|
|
|
|
|
|
|
|
|
DotNetNuke® Claims Visual Studio Magazine Award |
|
DotNetNuke® Corporation, producers of the highly acclaimed open source web application framework for the Microsoft platform, today announced that the product has been honored with the 2007 Editors Choice Award from Visual Studio Magazine as part of their annual Readers’ Choice Awards. The full list of winners, which appears in the June 2007 issue, is chosen by Visual Studio Magazine’s readers and honors excellent software in 22 development categories. The Editors Choice Award is a special designation given to products which show “special merit or innovation.”
|
 |
|
|
More...
|
|
Stevan Tosic
|
By host on
10/15/2008 10:40 AM
|
|
|
|
|
How to empty a database file - Emptying a file |
|
Emptying a file
The following example demonstrates the procedure for emptying a file so that it can be removed from the database. For the purposes of this example, a data file is first created and it is assumed that the file contains data.
http://msdn2.microsoft.com/en-us/library/ms189493.aspx
USE AdventureWorks;
GO
-- Create a data file and assume it contains data.
ALTER DATABASE AdventureWorks
ADD FILE (
NAME = Test1data,
FILENAME = 'C:\t1data.ndf',
SIZE = 5MB
);
GO
-- Empty the data file.
DBCC SHRINKFILE ('Test1data', EMPTYFILE);
GO
-- Remove the data file from the database.
ALTER DATABASE AdventureWorks
REMOVE FILE Test1data;
GO
|
 |
|
Comments (0)
|
|
Aleksandar Tosic's Blog
Database Files
|
By Aleksandar Tosic on
Wednesday, October 15, 2008
|
|
|
|
|
MSQL_XP - wait type on sys.dm_os_wait_stats |
|
MSQL_XP is the wait type that occurs when a task is executing an extended stored procedure - XP. SQL Server does not have control over an XP even though it is executing within the SQL Server process. Investigation of these waits requires investigating the execution of the extended stored procedure code—the vendor may have provided diagnostic tools for the XP. If such tools are not available and the source code of the XP is not available and the documentation does not provide other troubleshooting information, contacting the vendor may be the only option.
 |
|
Comments (0)
|
More...
|
Aleksandar Tosic's Blog
Blocking
|
By Aleksandar Tosic on
Wednesday, October 15, 2008
|
|
|
|
|
|
Upgrading Editions of Reporting Services |
|
Upgrading from SQL Server 2000
SQL Server 2005 SQL Server 2005
Evaluation Express, Workgroup, Standard, Developer, Enterprise
Express Workgroup, Standard, Developer, Enterprise
Workgroup Standard, Developer, Enterprise
Standard &nbs ...
|
 |
|
Comments (0)
|
More...
|
Aleksandar Tosic's Blog
Reporting Services 2005
|
By Alex on
Wednesday, October 15, 2008
|
|
|
|
|
|
|
|
@@IDENTITY and SCOPE_IDENTITY() |
@@IDENTITY and SCOPE_IDENTITY() will return the last inserted identity value in the current session but in different scenarios they can each return different values.
While both @@IDENTITY and SCOPE_IDENTITY return the last identity value generated in any table in the current session, SCOPE_IDENTITY() will return the value only within the current scope (a scope is a stored procedure, trigger, function, or batch) while @@IDENTITY is not limited to a specific scope.
For example, nested stored procedures or triggers are part of the current session, but not part of the current scope. A scope is limited to the stored procedure or function that is explicitly invoked. This is how the @@IDENTITY and SCOPE_IDENTITY() can return different value when executing same stored procedure.
|
 |
|
Comments (0)
|
|
|
Aleksandar Tosic's Blog
|
By Aleksandar Tosic on
Wednesday, October 15, 2008
|
|
|
|
|
|
|
|
|
|
|
|
proxy account information - xp_sqlagent_proxy_account |
proxy account information - xp_sqlagent_proxy_account
check this
http://msdn2.microsoft.com/en-us/library/aa260700(SQL.80).aspx
to find out if any proxy account is used or not and how toset one.
and this one:
http://msdn2.microsoft.com/en-us/library/aa260289(SQL.80).aspx
to find out when and how to use a proxy account.
Permissions Execute permissions default to the public role in the msdb database. A user who can execute this procedure and is a member of the sysadmin fixed role can start any job. A user who is not a member of the sysadmin role can use sp_start_job to start only the jobs he/she owns.
When sp_start_job is invoked by a user who is a member of the sysadmin fixed server role, sp_start_job will be executed under the security context in which the SQL Server service is running. When the user is not a member of the sysadmin fixed server role, sp_start_job will impersonate the SQL Server Agent proxy account, which is specified using xp_sqlagent_proxy_account. If the proxy account is not available, sp_start_job will fail. This is only true for Microsoft® Windows NT® 4.0 and Windows 2000. On Windows 9.x, there is no impersonation and sp_start_job is always executed under the security context of the Windows 9.x user who started SQL Server.
AND
Sets or retrieves the proxy account information used by SQL Server Agent and the xp_cmdshell extended stored procedure when executing jobs or commands for users who are not members of the sysadmin fixed server role. The proxy account is a Microsoft® Windows® account in whose security context the jobs or command prompt commands are run.
|
 |
|
|
|
|
Stevan Tosic
|
By host on
10/15/2008 10:40 AM
|
|
|
|
|
|
|
|
|
|
Online Index Operations - SQL Server 2005 |
|
The online index feature provides a powerful way to perform maintenance operations such as rebuilding or creating indexes in a production system without sacrificing DML concurrency.
This feature allows concurrent modifications (updates, deletes, and inserts) to the underlying table or clustered index data and any associated indexes during index data definition language (DDL) execution. For example, while a clustered index is being rebuilt, you can continue to make updates to the underlying data and perform queries against the data.
Users are not blocked from querying and updating the underlying table during the index operation. Check these link for more details:
|
 |
|
Comments (0)
|
More...
|
Aleksandar Tosic's Blog
Performance
|
By Aleksandar Tosic on
Wednesday, October 15, 2008
|
|
|
|
|
|
Selecting random pages using tabid in DotNetNuke based on tabname similarity |
|
declare @tabid int
declare @tabname nvarchar(100)
set @tabid = 7
--select * from tabs where tabid = @tabid
select @tabname = tabname from tabs where tabid = @tabid
--select * from tabs where IsVisible = 1 and ParentID is null
select top 10 DIFFERENCE(@tabname,tabname),@tabname,tabname from tabs where IsVisible = 1 and ParentID is null order by DIFFERENCE(@tabname,tabname) desc
This code is used to list similar tabnames (pages) when tabid is provided.
|
 |
|
Comments (0)
|
|
|
Aleksandar Tosic's Blog
|
By Aleksandar Tosic on
Wednesday, October 15, 2008
|
|
|
|
|
|
|
Find most frequently executed queries in SQL Server 2005 - sys.dm_exec_query_stats |
|
Use dm_exec_query_stats to find data for all statements in the cache: number of times the query has been executed, the longest query to execute.
Use these tow objects:
sys.dm_exec_query_stats
sys.dm_exec_sql_text
Run this query to find most frequently executed queries in SQL Server 2005
select* from sys.dm_exec_query_stats as across apply sys.dm_exec_sql_text(a.sql_handle) as b order by execution_count desct
Run DBCC FREEPROCCACHE to to clear the procedure cache before start monitoring.
|
 |
|
|
|
|
Stevan Tosic
|
By host on
10/15/2008 10:40 AM
|
|
|
|
|
Formatting data in Reporting Services 2005 when creting report |
FormatDateTime function i a VBScript function the formats date or time.
Example:
= FormatDateTime(Fields!PublicationDate.Value,2)
Formats
vbGeneralDate 0 Display a date in format mm/dd/yy. If the date parameter is Now(), it will also return the time, after the date
vbLongDate 1 Display a date using the long date format: weekday, month day, year
vbShortDate 2 Display a date using the short date format: like the default (mm/dd/yy)
vbLongTime 3 Display a time using the time format: hh:mm:ss PM/AM
vbShortTime 4 Display a time using the 24-hour format: hh:mm
|
 |
|
Comments (0)
|
|
Aleksandar Tosic's Blog
Reporting Services 2005
|
By Alex on
Wednesday, October 15, 2008
|
|
|
|
|
|