SQL Server DATE/TIME Workbench
The definitively "hands-on" guide to handling dates and times in SQL Server
2006-10-25
2,883 reads
The definitively "hands-on" guide to handling dates and times in SQL Server
2006-10-25
2,883 reads
Oracle and SQL Server are both database platforms built on SQL, but there are vast differences between them. Janet Wong brings us a tale of her experiences in moving from Oracle to SQL Server as a developer.
2006-10-19
8,135 reads
Whether you use the forums here or post questions in the venerable Usenet usegroups, there are some basic courtesies you should follow. Sushula Iyer takes a minute to list some things that might help you get your next question answered quickly and completely.
2006-10-18
4,618 reads
This script changes the physical, logical and file names of a database. It stores the current database until the next time the script is run, and creates a dummy database for the next update. The intent was to have minimal downtime even though the load (import, snapshot, etc.) may take a long time. Three copies […]
2007-02-22 (first published: 2006-10-17)
668 reads
SQL Server does a great job of handling concurrency & ensuring that users can make changes in multi-user systems without conflict. However there are times a strict calling order is needed.
2006-10-17
20,339 reads
Database concurrency conflicts are somewhat of a plague in software development because they're hard to predict and handle. Unfortunately, they're also hard to prevent.
2006-10-11
2,638 reads
Most of the luhn scripts assume that you are working with credit-cards and then IMPROPERLY calculate their luhn check-digit by starting at the left side (assuming that the core number is always 15 digits). However, if you don't know the length of your core number, then such an approach will fail when the length is […]
2006-10-10
283 reads
generates an runs a select statement to convert all th olumns of a certain datatype in apirticular table to another datatype:eg all columns of type int to varchar etc the sp takes three parameters namely the table name, source data type and detination data type generates a select query ad executes it eg: exec ConvertTableTypes […]
2007-07-10 (first published: 2006-10-10)
191 reads
Properly sizing your SQL Server hardware and testing application loads against them is a complex and difficult topic. Anthony Bressi brings us a great new article that gives you a systematic approach to performing your own stress test.
2006-10-10
24,362 reads
In situations where FK's have been created using the "WITH NOCHECK" option you can get into troubles because the FK-data is not checked ! (so there may be invalid data in the FK-column !)E.g. ALTER TABLE [dbo].[mytable] WITH NOCHECK add constraint [FK__USED_RESO__Actio__1162CF5F] FOREIGN KEY ( Action_Type ) REFERENCES [dbo].[Action_Types] ( Action_Type ) BOL states "... […]
2007-05-29 (first published: 2006-10-09)
556 reads
With Fabric Mirroring, Microsoft is promoting a nice and appealing story for operational reporting...
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...
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