Viewing 15 posts - 421 through 435 (of 1,491 total)
It is an inline number/tally table which you can see if you SELECT * FROM Nums.
Number/Tally tables are very useful and are well documented online.
February 18, 2021 at 4:54 pm
I presume that would mean that I only have to buy one SQL licence (compared to putting each environment on a different SQL VM)
My understanding is that the Developer version...
February 18, 2021 at 4:11 pm
As you have increased the machine's memory to 16GB it may be worth increasing Max Server Memory for SQL Server from 3GB to 8GB. You can do this via script...
February 17, 2021 at 5:42 pm
You do not say what version of SQL Server is on your laptop but the default install for any version other than SQL2019 allows SQL Server to use as much...
February 12, 2021 at 5:00 pm
"The transaction log for database 'tempdb' is full due to 'ACTIVE_TRANSACTION'."
The first thing I would do is look for long running transactions on the server. It might have nothing to...
February 11, 2021 at 5:48 pm
A different login for the qa database should work. When you copied Other_Db to QA_Other_Db you would then only have to alter the login associated with the user which had...
February 11, 2021 at 5:31 pm
>they would like to copyright that data
This sounds pointless.
If you are selling an application to customers and consider some of the data as sensitive you should try:
February 11, 2021 at 3:49 pm
>>I do not have "cross db ownership chaining" turned on ...
I never implied you did it is just what some people do to get around ownership changing problems.I suggest you...
February 11, 2021 at 3:07 pm
Enabling Cross Database 'Ownership Chaining' is probably a bad idea.
Certificates work well with stored procedures.
For application queries it is probably easiest to leave the security model as it is.
https://www.mssqltips.com/sqlservertip/2549/options-for-cross-database-access-within-sql-server/
etc
February 11, 2021 at 11:46 am
Perhaps:
-- Consumable test data
CREATE TABLE #t
(
ID int NOT NULL
,Category int NOT NULL
,Category_Date date NOT NULL
,PRIMARY KEY (ID, Category_Date)
);
INSERT INTO #t
VALUES (11, 1, '20210105')
,(12, 3, '20210105')
,(11, 2, '20210118')
,(12,...
February 10, 2021 at 5:13 pm
The session information is in sys.dm_exec_sessions. eg:
SELECT session_id, login_time, [host_name], [program_name], client_interface_name, DB_NAME(database_id)
,login_name, original_login_name
,last_request_start_time, last_request_end_time
FROM sys.dm_exec_sessions;
February 10, 2021 at 3:05 pm
Reports should not take this long to run so the real answer is to tune the report queries.
I would start by putting all the SQL into stored procedure(s) and only...
February 10, 2021 at 12:37 pm
You should provide consumable test data with dates in ISO format:
SET ANSI_NULLS, QUOTED_IDENTIFIER, ANSI_PADDING ON;
GO
CREATE TABLE #t
(
EmployeeID varchar(20) NOT NULL
,StartDate date NOT NULL
,EndDate date NULL
,LeavingReason nvarchar(80) NULL
,PRIMARY...
February 10, 2021 at 12:23 pm
You are correct. I was trying to make the point that an iso_week runs Monday to Sunday. If the OP wants something else, say Sunday to Saturday, then some sort...
February 5, 2021 at 5:45 pm
Viewing 15 posts - 421 through 435 (of 1,491 total)