USE MSDB
sp_reassign_dtspackageowner [@name =] 'name', [@id =] 'id', [@newloginname =] 'newloginname'
sp_reassign_dtspackageowner is an undocumented stored procedure which is present in MSDB database.
Saturday, May 3, 2008
Get the List of Failed Jobs
use msdb
SELECT name FROM msdb.dbo.sysjobs A, msdb.dbo.sysjobservers B WHERE A.job_id = B.job_id AND B.last_run_outcome = 0
SELECT name FROM msdb.dbo.sysjobs A, msdb.dbo.sysjobservers B WHERE A.job_id = B.job_id AND B.last_run_outcome = 0
Labels:
SQL Queries
How to get the version of SQL server
Simply execute the below query to get the SQL server version you are running.
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
Labels:
SQL Queries
How to find the SQL Server Version?
Simply execute the below query to get the version of SQL Server you are running.
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
Labels:
SQL Queries
How to change the server wide date format
Many times, when you install windows and sql server 2000 or 2005 in the fresh machine. generally application which is pointing to your database fails to insert the dd/mm/yyyy
date to your database. even you put the write syntex in your application program and the insert query. Why ?
It is due to server level date settings. As a default your server settings would be in mm/dd/yyyy format, which needs to be changed in the server.
How to do this?
Follow these simple steps...
1. Start -> Control Pannel -> Reginal settings ->Customize
after that go the date format and set the short date = dd/mm/yyyy
and long date format = dd mmmm, yyyy
After doing this, Your application will be able to insert the exact date to your database.As there is no sql server level settings to change the date format. But apart from thatyou can use SET option while firing the insert command to your database
Like this...
SET dd/mm/yyyy
Insert into table (date1) value ('29/04/2008')
date to your database. even you put the write syntex in your application program and the insert query. Why ?
It is due to server level date settings. As a default your server settings would be in mm/dd/yyyy format, which needs to be changed in the server.
How to do this?
Follow these simple steps...
1. Start -> Control Pannel -> Reginal settings ->Customize
after that go the date format and set the short date = dd/mm/yyyy
and long date format = dd mmmm, yyyy
After doing this, Your application will be able to insert the exact date to your database.As there is no sql server level settings to change the date format. But apart from thatyou can use SET option while firing the insert command to your database
Like this...
SET dd/mm/yyyy
Insert into table (date1) value ('29/04/2008')
Labels:
MSSQL,
SQL Information
Subscribe to:
Posts (Atom)