Do Alpacas Dream of farming DBAs?
When IT starts to stand for 'Implement This', even the keenest DBA begins to dream of farming Alpacas as a career-change...and we ask our readers how they would have solved the DBA's dilemma.
2007-09-07
2,439 reads
When IT starts to stand for 'Implement This', even the keenest DBA begins to dream of farming Alpacas as a career-change...and we ask our readers how they would have solved the DBA's dilemma.
2007-09-07
2,439 reads
Warning: This script has no DBA value, but is useful for DBAs who have inclination towards occultƒº.Yesterday I had to decide the name of my new website. Since I wanted the name to be numerological correct. I wrote a T-SQL script for the same.For those of you who are not familiar with Numerology let me […]
2007-11-12 (first published: 2007-09-04)
617 reads
This SP will be create C# classes using all table in the specified Database
2007-11-13 (first published: 2007-09-04)
2,514 reads
Continuing with his series on Alias Data Types, Yakov Shlafman shows us how to work wtih ADTs when constriaints are involved.
2007-09-03
3,697 reads
Organizations with mature business intelligence environments can integrate fraud analytics within their current environment to take advantage of processes and architecture that are already in place.
2007-09-03
1,523 reads
this procedure takes a sql login name and returns information about the login.anyone who knows Sybase will recognise the name and layout. use :- exec sp_displaylogin 'loginname' to get login information returned.this procedure has been tested on SQL Server 2005 sp2any problems email pgr_consulting @ yahoo.com
2007-11-09 (first published: 2007-08-31)
1,220 reads
Get space for all user defined table information like size and row counts.
2013-12-27 (first published: 2007-08-29)
7,698 reads
SQL Server MVP Simon Sabin brings us a very interesting article on a possibilltyfor using enumerated values instead of integer or other coded foreign keys. It is an interesting idea that could go a long way towards making code easier to read.
2007-08-28
13,064 reads
2013-12-19 (first published: 2007-08-27)
20,885 reads
Delete duplicates with a CTE (common table expression).This script uses the same setup as the anonymous post using a cursor (http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1872).
2007-08-23
1,119 reads
If you’ve been watching AI roll through the data community and thinking, “this seems...
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...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Hi All I am trying to find 'bad' characters that users might type in....
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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