|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
The Temp Alias | |
In SQL Server 2019, what happens when I run this code?
CREATE SYNONYM MyTemp FOR dbo.#mytable GO CREATE TABLE #mytable (myid INT, mychar CHAR(10)) GO INSERT MyTemp SELECT 1, 'a' GO SELECT * FROM mytemp GO | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
The Availability Group Secondary Connection In a SQL Server Availability Group, I want to control access to the secondary node(s). What types of connections are allowed for clients? Answer: Not allowing connections, allowing only read-intent connections, or allowing any read-only connections Explanation: You have three choices:
Ref: Types of Connection Access Supported by the Secondary Role - https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/about-client-connection-access-to-availability-replicas-sql-server?view=sql-server-ver16#ConnectAccessForSecondary |
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2016 - Administration |
Copy backup to not destroy backupchain - Hi, A bit unsure about how to make a copy only backup and the right way och doing this. I dont want to tamper with the backupchain and do something wrong. In the general tab\Destination\Back up to: , where i can choose destination i alredy have a path where the backups are stored. Can i […] |
SQL Server 2016 - Development and T-SQL |
Null value when checking unused indexes - I'm using this query to check if I have any unused indexes.. One of the tables it display's has lots of user_updates but the indexname field is NULL... There is a non-clustered index on the table No fill factor and page fullness about 50% and 98% fragmented. Min row size 42 and max 74 avg […] |
Degraded performance with extended event session - We have noticed that our nightly jobs take 2-3 times longer when the following extended event session is running. There is a clear deterioration in server performance across two separate servers running the same XE, even though there is not much data being written to the target files by the sessions (only a few MB). […] |
SQL Server 2012 - T-SQL |
mdf space balance - I have a DB that is running out of space on a drive... If I add another data file will the drive that is running low run out of space, or will it use the new data file just created. How does it balance data consumption. Thx. |
Using Case with DATEDIFF for Aging Report - I need help to create a Aging report, I am not retrieving the correct amounts. I am wondering if I need add debit and credit first and then the dateiff |
SQL Server 2019 - Administration |
Can someone explain where non - clustered index is stored? - I am learning non-clustered and clustered indexing. When reading this article https://www.sqlshack.com/what-is-the-difference-between-clustered-and-non-clustered-indexes-in-sql-server/#:~:text=Clustered%20indexes%20only%20sort%20tables,involve%20any%20extra%20lookup%20step. came across this line by the author Non-clustered indexes are stored in a separate place from the actual table claiming more storage space. Question is, where is this table? I am looking at my Azure Data Studio and am scratching my head looking into […] |
SQL Server 2019 - Development |
Multiply time by hourly rate - Hello all, I have this table with time for each row. It shows hh:mm. I have rows with all kind of time, 6:30, 5:10, 5:00, 6:42 etc, and I have to multiply it by the hourly rate. Could you please help me? I think I have to, first convert this time column into a number […] |
Compare 2 tables and highlight where the column values has been updated - Hi All, I have a requirement to compare data from same table with different snapshot dates and highlight what column values changed from to TO Can any one help me with above requirement please? Regards, R |
Best primarykey and index - Hi all, i've to refactor a database with several tables with around 100.000.000 records each one. Each table has the following relevant columns: - ID (bigint) - Tenant (actually i have 10k tenants) - Year (all info has Always a filter search by year) - other 10/20 simple columns I was thinking to have: 1) […] |
stored procedure not running - Created a stored procedure and logged in SSMS as Administrator and this user is exists in the Security > Logins I'm able to successfully execute the sp using T-SQL. e.g, declare @output_execution_id bigint exec dbo.int_Bill_Run @output_execution_id output Now, when I add it SQL server agent as a job I get errors - Executed as user: […] |
Azure Data Factory |
API Configuration help ADF - Hi I am trying to connect to a HR system to simply pull down some data and copy in ASDB I have managed to get it to work in excel using the following code below in the advanced editor but dont even know where to start in terms of where i put this information in […] |
Reporting Services |
Empty Field is causing entire Page to be blank - I'm a little new to SSRS and am running into a strange issue. I have a Table tied to a data source. Essentially, it is just a letter with text and two fields from the dataset ([Salutation] and [FullName]). The [Fullname] is a field that defines the Associate for the record and it may be […] |
Empty Field is causing entire Page to be blank - I'm a little new to SSRS and am running into a strange issue. I have a Table tied to a data source. Essentially, it is just a letter with text and two fields from the dataset ([Salutation] and [FullName]). The [Fullname] is a field that defines the Associate for the record and it may be […] |
General |
Error when running batch file - I have a batch file, with the command to drop the tables from the server database. The command works in the database but when I ran the file it gives me an error executing my T-SQL Table dropping script: Sqlcmd: 'ds.user': Unexpected argument. Enter '-?' for help. Any idea what might be the problem? […] |
Powershell |
Retrieve Password from CyberArk using powershell - Hi, I am new to Powershell script and i have to create a power shell script to get password for SQL service account from CyberArk.. Could you please suggest how to do that ? |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |