Using sp_addalias
SP_addalias isn't a well known stored procedure to most DBA's - do you know what it does? In what situations you might use it? This short article gives very quick and clean answers to both of those questions.
SP_addalias isn't a well known stored procedure to most DBA's - do you know what it does? In what situations you might use it? This short article gives very quick and clean answers to both of those questions.
Where should SQL Server go in the future? What enhancements are needed? Steve Jones takes another break from his wishes to include some more feedback from users who have some wishes of their own. Read about what real users of SQL Server would like to see included in future versions.
We've had a soft launch under way for the past week, but now we'd like to sell the rest of the books stacked up at Andy's house! $15 plus shipping will get you a book that you'll be proud to put on your bookshelf. Read this to get latest pricing and answers to the most recent questions we've gotten.
This article by Andy Warren offers a free utility that will generate DSN's for all or just a subset of the databases on a server in seconds.
Directly accessing system tables is discouraged - so what's the alternative? Using the Information Schema should allow you to create code that survives upgrades. Beyond that, what can you do with it? Joe has four great examples to get you started.
Chris discusses some issues he had trying to use SQL dates from within Java. Interesting stuff and brings up the point that if you have dates stored in local time, having users in multiple time zones can be a large headache.
Where should SQL Server go in the future? What enhancements are needed? Steve Jones continues to explore his wish list for future versions of SQL Server.
Andy reviewed v1.51 almost two years ago, this week he looks at the latest release that includes one feature he really wanted - the ability to compare and sync text columns.
Chris has been working through the process of upgrading to Win2003 and has the start of a great checklist along with few lessons learned - stuff that will come in handy it's time for you to do your own upgrade.
Frank has been part of our community for a while now, posting more than 1000 times (wow!) in our discussion area. He's decided to contribute more of his time by putting together an article that discusses how SQL has evolved.
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