Automatically Gathering Server Information Part 1
The first part of Steve Jones's series on having SQL Server automatically report information to a DBA.
The first part of Steve Jones's series on having SQL Server automatically report information to a DBA.
Get started with using WMI (Windows Mgmt Instrumentation) by seeing two good scripts to start with, one to reboot the server, another to list all the services.
Dinesh looks at the date functions, how to work with time zones (or not), and does a brief comparison to see how you do similar tasks in Oracle.
As Chris points out, in most applications these days you end up having to go with optimistic locking, which presents a few challenges. Chris works through the list of options. If you're building web/disconnected apps and need anything besides last update wins, this one is for you.
Sysdepends is a neat idea, but in practice it's not always accurate. This article talks about why it's not always reliable and presents some code (recursive even!) that will let you find all the dependencies by querying the system tables.
This article presents two best practices. One is about how to construct good table aliases, the other is about using ANSI join syntax. Good stuff!
This short article looks at some mistakes developers should avoid when they also have the task of designing the database, database objects, or TSQL used to access it.
Why would you ever create duplicate indexes? Does that even make sense? Steve Jones isn't sure, and that's for another day, but it sure caused him some problems. Follow along and find a solution for tracking these down.
Full text indexing is interesting, but not always easy for the user to apply well. Chris has some ideas about to make that
Red Earth Technologies announces the release of version 1.3 of Superior SQL Builder, its SQL tool that allows users to visually build complete SQL scripts without typing any code.
Superior SQL Builder introduces new SQL scripting technology, allowing users to quickly and easily transform their database data. In version 1.3 this scripting technology has been extended and enhanced so that complex SQL scripts can be built in less time and with greater ease.
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,...
By Tim Radney
As a SQL Server DBA with years of experience tuning production environments, I’ve seen...
Comments posted to this topic are about the item What is the Cloud?
Comments posted to this topic are about the item Changing the Schema
Comments posted to this topic are about the item Index Fragmentation Explained: Page Splits,...
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