Laden...
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Renaming a Database | |
If I want to rename the OldSales database to ArchiveSales, how can I do this? (choose 2) | |
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) |
Running Steve's Code Can you run this code in any of your SQL Server 2019 databases without error? CREATE OR ALTER PROCEDURE [dbo].[StevesAmazingProc] AS SELECT Consumer_ID , Trend_Category , Bit_Trace FROM NewWorldDB.dbo.MarketTrend; GOAnswer: Yes. Explanation: You can run this. Due to deferred name resolution the database or table don't need to exist at compile time. Ref: Deferred Name Resolution - https://learn.microsoft.com/en-us/sql/t-sql/statements/create-trigger-transact-sql?view=sql-server-ver16#deferred-name-resolution |
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 - Administration |
Microsoft Recommendations for Update Stats? - I have an application team that is insisting on daily (and for some, weekly) jobs for UPDATE STATISTICS WITH FULLSCAN on all their databases. These jobs were created years ago by a previous DBA team. The jobs are running very long, into business hours often, one database's job is running 1.5 days, and butting heads […] |
SQL Server 2016 - Administration |
Possible SQL 2014 to 2016 Issue - Some Application Functions Slow/Failing - First time here...hoping I can find some direction and answers so I can devise a proper solution. Novice Basic SQL experience over the years while being the "jack of all trades' IT support, not a DB admin by any means. Issue: After vendor Application upgrade and SQL upgrade from 2014 to 2016 we cannot process […] |
SQL Server 2019 - Administration |
Agent job security account - Hi All, I have few sql server agent scheduled jobs which are supposed to run as NT Service\mssqlserveragent account however at times it runs using different account. Being novice in this world , I am not able to figure out where to make the change in agent job security to ensure that it only and […] |
Export database and tables no table data - Trying to move a database from one sql server instance to another on separate servers . I need to only move it like a skeleton no data and looking for steps to export the database and tables. Is this possible? |
SQL Server 2019 - Development |
how can i tell if our db2 driver is ms or ibm or other? - i see this in the definition of a linked server on our wh sql server that i know is db2 based... @provider=N'DB2OLEDB', @provstr=N'Provider=DB2OLEDB;DBMS Platform=DB2/AS400; But unlike the info you can easily see by running the odbc data source administrator for installed odbc driver info, i dont see an oledb admin portal nor do i see […] |
SQL Server Newbies |
normal role member to be able to view list of other role members in his DB - Is this even possible ? Tried with grant but to no avail. [sys].[database_role_members] and [sys].[database_principals] can not be accessed even with grant . |
SQL Azure - Development |
How to manage Time zone changes for countries - Hello Everyone, I am using Microsoft SQL Azure (RTM) - 12.0.2000.8, as of October 2, 2024. This software is copyrighted by Microsoft Corporation in 2022. We have developed a ticketing system currently used by around 30 countries, and we expect this number to grow in the coming days. To maintain each country's local time, we […] |
SQL Azure - Administration |
Azure elastic job issue authenticating to Azure SQL database - Azure elastic agent jobs: I’m getting this error “The server principal “ac1971e9-381b-449b-9e1a-9cc276fc2985@b5313c9d-fb0d-47af-bc87-7c050bffbdc3” is not able to access the database” when an elastic agent job tries to run against a new database that has been added to an elastic pool. The elastic pool is configured as a target group member. For all other databases in […] |
Connecting |
SSMS 20.2 on Windows11 not able to connect to SQL 2005 ?? - We still have a couple of dino's. What should I check to re-enable access to ye good old SQL 2005 on Windows 2003 for my SSMS 20.2? I have already accepted "use server certificate" and "optional encryption" Still doesn't work; "SSL Connection forcebly closed by server" btw: When using SSMS 18.12.1 it works fine |
Integration Services |
Package to Project model conversion - Hi All, With previous customer range we were always required to work in the traditional package model approach were individual packages were stored in deployment folders and combined with configuration files. (Usually old 2008R2 SQL server versions) For my current employee I have the liberty to setup everything from scratch using newest versions of everything. […] |
SQL Server 2022 - Administration |
Converting job_id to join to another table. - I need help, please! I have a monitoring table that pulls in information about program name (plus sp_who2 does as well), and I need to join it to msdb.dbo.sysjobs to get the job name where the program name starts with SQLAgent (like SQLAgent - TSQL JobStep (Job 0x8FA89775AAF135499FA4CC1621B639FB : Step 1)). Nothing I try is […] |
How much transaction logs generated by hourly/daily - For MSSQL is there any queries or methods for me to pull historical data of transaction logs generation? I know that for Oracle database we can run a query to extract the amount of archivelogs generated hourly/daily. Is it possible for MSSQL? I have an hourly TLog backups running on the database, so currently I'm […] |
SQL Server 2022 - Development |
Compare rows within the same table - I have a table. Structure in script below. I have to compare and see if for a job id if the order of taskname is first 'Print' and then 'Distribute' based on the PrintDate column. I have to select rows where the 'Distribute' is coming BEFORE the 'Print' task based on PrintDate column (eg: JobID […] |
A Design Question using a fictious example - Background: I have two tables. Tests and Grades. For each Tests record there are many Grades; one for each student. The Grades table has a field called: StudentsGrade. Each time a Tests record is inserted into the database, an associated Grades record is inserted into the database, one for each student where the value of […] |
Generating (semi-)fake purchase data - I know how to generate fake data (thanks to Jeff Moden's articles!)... the problem is that I'm trying to generate purchase data where the unit price of a product increases on some products over time. Normally, I'd get the changing price information from all the purchase invoices, but I don't have those. So I have […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. [email protected] |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...