-
Is your computer “male” or “female”??
1. Open Notepad
2. Type the following line in notepad:
CreateObject("SAPI.SpVoice").Speak"I love you"
3. Save file as: computer_gender.vbs
4. Run the file ... If you hear a male voice, you have a boy :) If you hear a female voice, you have a girl :)
Note: Turn on the speaker before running the file
Must Try :)
-
Venki
The above post should be in the Jokes thread :)
-
-
-
Microsoft has disclosed one of its research project - 'Drawbridge' operating-system
http://www.zdnet.com/blog/microsoft/...e_skin;content
http://i.zdnet.com/blogs/drawbridgelibraryos.png
Can any MS professional explain me in lay terms what is library OS approach and its specialty
thanks :)
-
Want to listen ti IIT/IISc Engineering lectures?!? NPTEL that is National Programme on Technology Enhanced Learning, a Govt of India HRD Initiative has brought 90 such lectures. They are available online for free and also available for sale in DVD format.
See here :-
http://www.nptel.iitm.ac.in/
http://www.btechguru.com/nptel/courses.php?branch=ECE
-
Advanced tools running on M-Lab to test your Internet connection - http://www.measurementlab.net/measurement-lab-tools
Useful to diagnose your broadband connection. Very useful for IT Admins
-
Hi All
I want to know , what permissions and DBA Roles each SQL logins have againts each databases in SQL server 2008(r2), any ways to find out?
I tried this script (see below) , and I am not sure that this will bring the correct results
CREATE procedure [dbo].[List_DBRoles]
(
@database nvarchar(128)=null,
@user varchar(20)=null,
@dbo char(1)=null,
@access char(1)=null,
@security char(1)=null,
@ddl char(1)=null,
@datareader char(1)=null,
@datawriter char(1)=null,
@denyread char(1)=null,
@denywrite char(1)=null
)
as
declare @dbname varchar(200)
declare @mSql1 varchar(8000)
CREATE TABLE #DBROLES
(DBName sysname not null,
UserName sysname not null,
db_owner varchar(3) not null,
db_accessadmin varchar(3) not null,
db_securityadmin varchar(3) not null,
db_ddladmin varchar(3) not null,
db_datareader varchar(3) not null,
db_datawriter varchar(3) not null,
db_denydatareader varchar(3) not null,
db_denydatawriter varchar(3) not null,
Cur_Date datetime not null default getdate()
)
DECLARE DBName_Cursor CURSOR FOR
select name
from master.dbo.sysdatabases
where name not in ('mssecurity','tempdb')
Order by name
OPEN DBName_Cursor
FETCH NEXT FROM DBName_Cursor INTO @dbname
WHILE @@FETCH_STATUS = 0
BEGIN
Set @mSQL1 = ' Insert into #DBROLES ( DBName, UserName, db_owner, db_accessadmin,
db_securityadmin, db_ddladmin, db_datareader, db_datawriter,
db_denydatareader, db_denydatawriter )
SELECT '+''''+@dbName +''''+ ' as DBName ,UserName, '+char(13)+ '
Max(CASE RoleName WHEN ''db_owner'' THEN ''Yes'' ELSE ''No'' END) AS db_owner,
Max(CASE RoleName WHEN ''db_accessadmin '' THEN ''Yes'' ELSE ''No'' END) AS db_accessadmin ,
Max(CASE RoleName WHEN ''db_securityadmin'' THEN ''Yes'' ELSE ''No'' END) AS db_securityadmin,
Max(CASE RoleName WHEN ''db_ddladmin'' THEN ''Yes'' ELSE ''No'' END) AS db_ddladmin,
Max(CASE RoleName WHEN ''db_datareader'' THEN ''Yes'' ELSE ''No'' END) AS db_datareader,
Max(CASE RoleName WHEN ''db_datawriter'' THEN ''Yes'' ELSE ''No'' END) AS db_datawriter,
Max(CASE RoleName WHEN ''db_denydatareader'' THEN ''Yes'' ELSE ''No'' END) AS db_denydatareader,
Max(CASE RoleName WHEN ''db_denydatawriter'' THEN ''Yes'' ELSE ''No'' END) AS db_denydatawriter
from (
select b.name as USERName, c.name as RoleName
from ' + @dbName+'.dbo.sysmembers a '+char(13)+
' join '+ @dbName+'.dbo.sysusers b '+char(13)+
' on a.memberuid = b.uid join '+@dbName +'.dbo.sysusers c
on a.groupuid = c.uid )s
Group by USERName
order by UserName'
--Print @mSql1
Execute (@mSql1)
FETCH NEXT FROM DBName_Cursor INTO @dbname
END
CLOSE DBName_Cursor
DEALLOCATE DBName_Cursor
Select * from #DBRoles
where ((@database is null) OR (DBName LIKE '%'+@database+'%')) AND
((@user is null) OR (UserName LIKE '%'+@user+'%')) AND
((@dbo is null) OR (db_owner = 'Yes')) AND
((@access is null) OR (db_accessadmin = 'Yes')) AND
((@security is null) OR (db_securityadmin = 'Yes')) AND
((@ddl is null) OR (db_ddladmin = 'Yes')) AND
((@datareader is null) OR (db_datareader = 'Yes')) AND
((@datawriter is null) OR (db_datawriter = 'Yes')) AND
((@denyread is null) OR (db_denydatareader = 'Yes')) AND
((@denywrite is null) OR (db_denydatawriter = 'Yes'))
exec List_DBRoles
-
Has any one worked with Multi Value variables in SSRS 2008 ?
-
Hi All,
I need some help please :(
I have the following Stored procedure
USE [msdb]
GO
/****** Object: StoredProcedure [dbo].[Sp_listjobhist] Script Date: 01/05/2012 10:02:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Sp_listjobhist]
@START DATETIME,
@END DATETIME,
@JOBNAME varchar(255)
AS
BEGIN
SELECT sysjobhistory.server,
sysjobs.name
AS
job_name,
CASE sysjobhistory.run_status
WHEN 0 THEN 'Failed'
WHEN 1 THEN 'Succeeded'
ELSE '???'
END
AS
run_status,
Isnull(Substring(CONVERT(VARCHAR(8), run_date), 1, 4) + '-' +
Substring(CONVERT(VARCHAR
(8), run_date), 5, 2) + '-' +
Substring(CONVERT(VARCHAR(
8), run_date), 7, 2), '')
AS
[Run DATE],
Isnull(Substring(CONVERT(VARCHAR(7), run_time+1000000), 2, 2) + ':'
+
Substring(CONVERT(VARCHAR(7), run_time+1000000), 4, 2
)
+
':' +
Substring(CONVERT(VARCHAR(7), run_time+1000000), 6, 2), '')
AS
[Run TIME],
Isnull(Substring(CONVERT(VARCHAR(7), run_duration+1000000), 2, 2) +
':' +
Substring(CONVERT(VARCHAR(7), run_duration+1000000),
4,
2)
+ ':' +
Substring(CONVERT(VARCHAR(7), run_duration+1000000), 6, 2),
''
) AS
[Duration],
sysjobhistory.step_id,
sysjobhistory.step_name,
sysjobhistory.MESSAGE
FROM msdb.dbo.sysjobhistory
INNER JOIN msdb.dbo.sysjobs
ON msdb.dbo.sysjobhistory.job_id = msdb.dbo.sysjobs.job_id
WHERE sysjobhistory.run_date >= Datepart(yyyy, @START) * 10000 +
Datepart(mm, @START) * 100 +
Datepart
(dd, @START)
AND sysjobhistory.run_date <= Datepart(yyyy, @END) * 10000 +
Datepart(mm, @END) * 100 +
Datepart
(dd, @END)
AND sysjobs.name IN (@JOBNAME)
ORDER BY instance_id DESC
END
(It has 3 variable inputs, @start, @end, @Jobname) , when I exceute it like this
exec Sp_listjobhist '2012-01-03', '2012-01-05', (DARHelpDesk - Update Users,DARHelpDesk - Weekly Report), it comes with the an error.