Loading...
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
A Simple Choice | |
I have this data in a table? CatID CatName 3 Monitors What is returned when I run this code? SELECT CHOOSE(catid, 'Laptops', 'PCs') FROM dbo.Categories AS c | |
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) |
Mixed Backups I have a complex database with a few filegroups and files. Can I run a backup command like this? (assume file/filegroup names are valid). BACKUP DATABASE [complex] FILE = N'thirdone' , FILE = N'thirdtwo' , FILEGROUP = N'second' TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL16.SQL2022\MSSQL\Backup\complex.bak' WITH NOFORMAT, NOINIT, NAME = N'complex-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GOAnswer: Yes Explanation: This is a valid backup command. File and filegroups can be mixed. Ref: Back Up Files and Filegroups - https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/back-up-files-and-filegroups-sql-server?view=sql-server-ver16 |
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 2017 - Development |
How to convert run_date and run_time columns to datetime from SQL Agent systable - Hello SSC, Hope you are all having a great Monday! I am trying to get the run_date and run_time integer values from sysjobhistory and convert them to datetime. I am running into issues. I have Googled this, but everything that I have seen either looks overly complicated or doesn't work. I am able to get […] |
SQL Server 2019 - Administration |
sqlserver metrics to capture - Can this baselining and benchmarking sqlserver be done using extended events ? what are the various events from underneath which can be captured as metrics to benchmark/baseline a sqlserver ? SELECT xp.[name], xo.* FROM sys.dm_xe_objects xo, sys.dm_xe_packages xp WHERE xp.[guid] = xo.[package_guid] AND xo.[object_type] = 'event' ORDER BY xp.[name]; What are the free options to […] |
Contracting DBA - Permissions for initial analysis - Accidental DBA here. After looking at all the work that needs to be done, I need additional help. Right now I'm in the process of hiring a DBA contractor. What I'd like for this person to do, at least initially, is view maintenance plans, jobs, DMVs, etc., so they can perform their analysis without me […] |
SQL Server 2019 - Development |
blocking folks from using a linked server and plumbing one to specific dsn - hi, as we get further and further into netsuite connectivity, we want to block just about everyone (dbas, myself etc etc) from using a certain linked server that is plumbed to a production accounting instance of netsuite. Presumably plumbed to a dsn set up with the creds to see data there. I think i have […] |
blocking folks from using a linked server and plumbing one to specific dsn - hi, as we get further and further into netsuite connectivity, we want to block just about everyone (dbas, myself etc etc) from using a certain linked server that is plumbed to a production accounting instance of netsuite. Presumably plumbed to a dsn set up with the creds to see data there. I think i have […] |
how to find the 2nd and 2nd to last entry in a table? - Hi everyone I am working on a query where the calculation depends on whether the entry is the 2nd entry from the top or 2nd entry from the bottom. How can I find these two values? Sample data DROP TABLE IF EXISTS #TEST_TABLE CREATE TABLE #TEST_TABLE ( [UNIT] [nchar](1) NOT NULL, [ORDER_DATE] [date] NOT NULL […] |
SQL Azure - Administration |
SQL Server backup to Azure Storage Account - Hi Does anybody know if it is possible to run a backup from a SQL Server instance (IaaS VM) to an Azure Storage Account without using a [Shared Access Signature] or [Access Keys]? IE: can it be done using an Entra Managed Identity? Thanks in advance |
Reporting Services |
SQL Server Reporting Services 2022 Permissions Issue - I'm having a bit of an issue with SSRS permissions. Users (Operations Manager Report Operators) can access files if accessed directly for eg. localhost/reports/browse/folder/AD%20Audit%20Events but if we go to localhost/reports/browse/folder/: Could not load folder contents You are not allowed to view this folder. Contact your administrator to obtain the necessary permissions. Now I re-created the […] |
General |
SSMS Object Explorer Not Showing Tables - If this post doesn't meet protocol here, please tell me how to improve as I'm new here. I thought a screenshot would best help my question. In the ss you can see that I have a database (db?) created named hutchinsCLAN. I created - and even modified - 3 tables for it: clanPEOPLE, clanMARRIAGES, clanDEATHS. […] |
Do You Folks Mind Beginners Here? - I'm a retired IT guy in his 80s fighting boredom by trying to learn new things. SQL is the newest topic. Am I in the right place or do you prefer not to have noobs here? |
Do You Folks Mind Beginners Here? - I just joined and posted a brief profile. This is my first post. Please be gentle. It'll take a minute for me to learn the ropes. I'm retired from IT having entered the field in 1965. I'm 83. I haven't done much more than use canned apps on a PC for the last couple of […] |
Integration Services |
Avoiding duplicates stop and restart an ssis package that is using batch inserts - Hi, I an using VS 2022 to build a package that selects and then inserts a large number of records into a table. The volume of records in the source table exceeds 1 billion. As this will take a long time to process, I have to do this in a maintenance window of 2 hours. […] |
SQL Server 2022 - Administration |
SSMA for Oracle get error for assembly 'Oracle.ManagedDataAccess' - Hi, I am using the SSMA for Oracle v10.0. I have installed the SSMA for Oracle extension pack on the server that the SQL Server 2022 instance is running. The database 'sysdb' was created on the instance and I can successfully execute the 'Migrate Data' on the SSMA on this server. However, if I re-run […] |
SQL Server 2022 - Development |
ROWID in MS SQL - WHERE a.ROWID IN (SELECT rid FROM ( SELECT ROWID rid, row_number() OVER (PARTITION BY c.id ORDER BY c.id) rn FROM details c WHERE a.id = c.id AND c.id > ( SELECT max(id) FROM details d WHERE d.id = c.id AND d.cd = '2030') AND c.cd IN ( '2017','2012','2021')) WHERE rn = 1 ) |
ROWID in MS SQL - How to rewrite a query in MS SQL, please? WHERE a.ROWID IN (SELECT rid FROM ( SELECT ROWID rid, row_number() OVER (PARTITION BY c.id ORDER BY c.id) rn FROM details c WHERE a.id = c.id AND c.id > ( SELECT max(id) FROM details d WHERE d.id = c.id AND d.cd = '2030') AND c.cd IN […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Loading...
Loading...