TSQL Challenge 37 - Calculate the downtime and duration of servers bas
This is a challenge to identify the downtime of servers from the log data generated by a monitoring application.
This is a challenge to identify the downtime of servers from the log data generated by a monitoring application.
For security reasons many sites disable the extended stored procedure xp_cmdshell, which is used to run DOS commands or executables. When you really have to run a DOS command or an executable from a stored procedure how can you get around this limitation without a breakdown in security.
One common problem in querying is to reference the previous row in a data set as part of a calculation. David McKinney brings us an interesting solution using SQL Server 2005.
This Friday Steve Jones talks about your career, and training, and what you are doing about it.
It's time to integrate social data, enterprise analytics and enterprise data for better social-media strategy.
Are there some things that are beyond automation in your company? Steve Jones comments on the difficulty of changing things with automation in some cases.
Describes how to convert database mirroring to log shipping in SQL 2005/2008.
This tool is excellent when investigating what is going on in your StreamInsight Streams. I was looking through the menu items recently and went to Query => Event Fields I found that there were a couple of columns not added by default to the event viewer (Reminds me of the fact that the Variables viewer in SSIS hides columns also) Latency NewEndTime EnqueueTime Here they all are together. This gives us even more information about what is going on
Can you set a pagefile on a Windows machine to more than 4GB? Stanley Chan shows us how after an issue with a crashed Windows machine.
Terry Childs gets sentenced for refusing to turn over passwords to his boss. Steve Jones reminds us that we work for someone and that we have to remember that when taking a stand.
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
It is Friday, the queries are running, and nobody is watching the bill. That...
By Steve Jones
Annabel retired from Redgate Software this week. Across most of my career at Redgate,...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
WhatsApp: 0817839777 Kw. Industri Pulogadung, Jl. Raya Bekasi Km. 21, Ruko No.A2/18-19, RW.3, Wil,...
WhatsApp: 0817839777 Jl. I Gusti Ngurah Rai No.8 A-B, RT.8/RW.6, Wil, Kec. Duren Sawit,...
I set up a few users on my SQL Server 2022 instance.
CREATE LOGIN User1 WITH PASSWORD = 'Demo12#1' CREATE USER User1 FOR LOGIN User1 GO CREATE LOGIN User2 WITH PASSWORD = 'Demo12#2' CREATE USER User2 FOR LOGIN User2 GO CREATE LOGIN User3 WITH PASSWORD = 'Demo12#3' CREATE USER User3 FOR LOGIN User3 GOI then created a schema that one of them owned. Under this schema, I added a table with some data.
CREATE SCHEMA MySchema AUTHORIZATION User1
GO
CREATE TABLE Myschema.MyTable(myid INT)
GO
INSERT MySchema.MyTable
(
myid
)
VALUES
(1), (2), (3)
GO
SELECT * FROM MySchema.MyTable
GO
I granted rights and verified that User2 could access this table.
GRANT SELECT ON Myschema.MyTable TO User2 GO SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOThis worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3; GOWhat happens with this code?
SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOSee possible answers