Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
209
10.7k
<s>[INST]@@SERVERNAME when using sqlpackage.exe in multi instance environment We are using sqlpackage.exe to deploy a database. In the deploy process, we have a script that creates a loopback linked server: EXEC master.dbo.sp_addlinkedserver @server = N'loopback' ,@srvproduct=N'' ,@provider=N'...
<s>[INST]sqlcmd options on print / display Hello i need some help with sqlcmd utility at linux I have this select statement, but it display both at start with the ----- 1> select 'grant select on ' + name + ' to READONLY' + CHAR(10) + 'go' from sysobjects where type = 'U' or type = 'V' or type = 'P...
<s>[INST]TRUNCATE table permissions, Large number of tables So as a DBA I have inherited a app where lots of TRUNCATE TABLE statements are being used in the stored procedures, I could find around 40 different tables being mentioned on TRUNCATE statement in one database itself on various sp's. Currently I have given A...
<s>[INST]SQL Server 2016 Licensing - Restore Only server I have a server that is going to be used for testing the restore of backup from across the environment. It will not be running DBCC CheckDB or anything else once a restore is done, just delete the database and move on to the next restore test. Will I be able...
<s>[INST]Extended Events - Capture connection string used to connect to SQL Fellow SQLers, I am trying to see if I can capture the actual connection string used when a user connects to SQL. I know I can capture their options (Set ….. etc) but cannot find an event that give me the actual connection...
<s>[INST]Backup without "Copy Only" Hi, I wonder if a manual backup of an SQL server database without "Copy Only" mode will interrupt a scheduled backup plan set up for the database? If so, is there a way to fix it? Thanks in advance![/INST]It will not affect the backup schedule. Well, in one situation maybe:...
<s>[INST]SQL Always On Availability Group Deployment Hi there, I would like to setup a SQL AlwaysOn Availability Group on 2 new SQL servers. For the storage part, as I know SQL AG doesn't require shared storage for the database replication. However, if I want to use LUN on my servers to expand the storage, can SQL...
<s>[INST]Encrypt stored proceudres with password. Hi All, Is there a way to encrypt stored procedure code with password ?. I am not talking about the keyword "WITH ENCRYPTION" in the stored procedure when creating it but actually applying a password to it so that I can also decrypt it with that password. Don't want t...
<s>[INST]sql query help needed Hi All, Thank you for helping those who are in need. I need a help in writing a sql query to get the desired out put shown below, I have multiple records with same id in a table other columns may vary, we need to process those grouped records and get a single record pick...
<s>[INST]Can 32 bit connect into SQL Server 64 bit? Can a user connect using 32 bit SQL ODBC driver into SQL Server 64 bit version or do they need to use a 64 bit SQL ODBC driver? Thanks in advance.[/INST]They both can connect to either 32 or 64 bit databases. Use the 32 bit driver when the client application or p...
<s>[INST]How to port my Express database to SQL Server in preparation for making website live I am creating a website in Visual Studio with C# (WebForms). It is a data-driven website, allowing the user to filter data, but not update it (read-only). The data tables, from my perspective, anyway, are huge - well...
<s>[INST]Problem with UPDATE over Linked server using Microsoft OLE DB Provider for ODBC drivers for MS Access Hi, I'm currently using SQL SERVER 2019 with ODBC driver for MS Access (installed via AccessDatabaseEngine2010 64bit) for linked server. On 3 different machines where SQL SERVER 2019 Express is ...
<s>[INST]Last 3 full months vs last year same 3 months dates Hi Guys I am looking for a way to use my date in SQL Server to show me the "last 3 full months vs last year same 3 months dates" not adding the current month - this is something that I want to hard code (Store Proc) and use in SSRS in a Date parameter. O...
<s>[INST]Casting BIGINT as Varchar Err I have a SP like below for the, if I want to pass multiple ids like 1111, 2222 I am getting error even If I cast ID as varchar(100) BEGIN Declare @ID BIGINT SELECT @ID = 1111 SELECT * INTO TAB1 FROM TAB2 WHERE ID IN @ID .. .. SELECT * INTO TA...
<s>[INST]SQL Server Database log file max size setting problem Hi, Database was created with initial log file size 50 MB and max size set to 2 GB. While restoring database from pre production environment to test environment, it failed due to transaction log file full due to "ACTIVE_TRANSACTION". I increased ...
<s>[INST]Rebuild index in SQL server system database Hi, I just want to confirm , is it recommended to rebuild indexes in system database e.g. MSDB or distribution db in transactional replication. Thanks[/INST]There is no need to rebuild index of system databases definitely not for master and model database. ...
<s>[INST]Query for a Stored Procedure SSMS: 18.6 SQL Server: 2014 I am writing a query and I need to have the following in my stored procedure. How do I write it in the query? Any help would be appreciated. Thank you. ========================================================= Parameter that allows ...
<s>[INST]Polybase DMVs erroring out All, I have a **SQLServer 2019** installation on Windows 10 Pro (Desktop at home) and I have enabled **Polybase** on it. However, I get the below error whenever I run any of the Polybase DMVs. **\*select \* from sys.dm_exec_compute_nodes select \* from sys.dm_exec_dms_services\**...
<s>[INST]Alter table switch partition to another filegroup of another table Is it possible to use "Alter table switch partition......." to move the partition to another other table which in different filegroup from the source table ?[/INST]You cannot directly switch a partition from the partitioned table to a table in ...
<s>[INST]Clarifying version of SQL Server Management Studio and inability to use certain functions Hello When I open Management Studio it tells me I'm in version 18.7.1 However when I tried to use the STRING_AGG function earlier in a query I got this error message: *'STRING_AGG' is not a recognized built...
<s>[INST]move sql server install to a new PC Hi, I have bought a new PC and am wondering how to transfer over the install of Visual Studio, SQL Server 2014 and SQL Server Management Studio from my old one. All the searches I do just seem to give me ideas on moving a database, not the install itself. Than...
<s>[INST]Delete records older than 12 months but the date is in YYYYMM format Hi, I have a table that gets updated with fresh data every month I am trying to delete records which are older than 12 months (1 year) from my table.(automate through SP to keep only rolling 12 months data), but the problem is the fiel...
<s>[INST]SQL21 Release and Benefits to SQL19 Good day, I am planning an upgrade in 3 months, was looking at SQL19 with VS19 Communit SSDT 1. I have read SQL21 is on the cards, when would is the release? 2. Benefits from Upgrades from sql19 to sql21 > im looking for speed and paralism fixes? 3. Do...
<s>[INST]SQL Server Create Database Defaults (additional sets) I have posted a previous question with the same title, but below are the last lot of defaults I have found which go against what you would expect for a database default. Is this again for backward compatibility, and is over-ridden by the connection? O...
<s>[INST]How to use different date comparisons based upon a value in sql I have to write an update query. If the special_member account is not canceled then in the where clause I have to use this condition by adding a grace period of 15 to the expiry date and compare it today's date: Convert(date,MEMBER_EXPIRY_DATE + 1...
<s>[INST]Error when programming RMO for SQL 2019: MissingMethodException Hello, I'm trying to execute the following lines of C# code: var connection = new Microsoft.Data.SqlClient.SqlConnection(@"Server=.;Database=master;Integrated Security=true;"); var serverConnection = new Microsoft.SqlServer.Manag...
<s>[INST]Date filter ,just apply on Inv_Typ 'Payable'. i want to apply date filter just on Inv_Typ='Payable' ,not apply on where inv_type ='Received',below is data and query,i tried but it is applying on both inv_type. Create table #tbl_Receivable (Rec_ID int,Inv_ID int ,Customer_ID int,Rec_Date date,Rec_Amount ...
<s>[INST]Aged Data Not Removed in SQL Server Temporal History Table ENVIRONMENT: SQL Server 2017 Enterprise running on Windows Server 2016 Standard Test Case: 1. Create 2 identical temporal tables (differ only by name) where 1 table has HISTORY_RETENTION_PERRIOD set to 1 day. The other table is set to "IN...
<s>[INST]Actual Execution plan for query store is it possible to capture actual execution plan inside query store ? or else need to use back xevent ?[/INST]As noted already, Query Store is the estimated plan. The (at least one) reason for that is that QS aggregates data. Say that it aggregates data over, one hour as ...
<s>[INST]not able to put is equal to sign (=) in query, When i am inserting is equal sign= in query code sample then sign (=) in query is not showing in preview, what can be the issue[/INST]We faced some known issues when we tried to post one question together with some long code. Since I could not see any code f...
<s>[INST]sql permissions to run only update stats hi all, we would like to give some business users with access to run only update stats. I am thinking of creating a role for these users and somehow assign them the rights to run "update stats" would you please share can I grant the users permisisons to run the...
<s>[INST]compatibility_level and LEGACY_CARDINALITY_ESTIMATION Hi everyone, we migrated from sql 2012 to sql 2016 and since then we have been facing some performance issue. We decided to change the compatibility level to 110 (sql 2012) and set the LEGACY_CARDINALITY_ESTIMATION= ON. It helped but then we were still...
<s>[INST]Query takes long time to run SQL Server: 2014 Problem: I am running a query that joins 3 views and produces results. Query takes over 8 minutes to run, but it runs without an error and produces correct output. Can you please take a look at my query and tell me why it takes 8 mins for it to run? Serv...
<s>[INST]sql server windows ad role permisions I would like to grant a specific windows role automatic permissions to be the "dbo" every time a new database is created, can this be accomplished using the model database, thanks[/INST]Yet an alternative is to use a server-level DDL trigger that adds the role to the datab...
<s>[INST]How can i deny access to any sql management from lan and public network? Hello, Can i deny access to any sql management from lan and public network? I mean the user SA to be able to be used to read and write in the bases but not to connect with the sql management or similar app. Thank you, Giorg...
<s>[INST]How to calculate 90th Percentile on time (either MM:SS or seconds ) SELECT DISTINCT ,DATEDIFF(s,MV_Incident.IncidentStartedDateTime,MV_Incident.IncidentDate) AS CalltakerProcessingTime ,DATEDIFF(s,MV_Incident.IncidentStartedDateTime,MV_Incident.FirstUnitDispatchedTime) AS TotalProcessingTime ,DA...
<s>[INST]Best way to create a second instance current and available 24x7. Hi everyone! What would be the best solution to make a production database available to another SQL Server instance (on a different server) in read-only mode, without interruptions? I mean, current and available 24x7. Mirror, replic...
<s>[INST]Concurrency question Hi, I need to make sure that 2 connections to the table never get the same id for processing... For example: create table dbo.concurrency(id int identity, task varchar(80), status varchar(80)) go insert dbo.concurrency(task, status) values('task A','active') insert dbo...
<s>[INST]Always-on : Log Send Queue THere is a performance counter for Always-on Log Send Queue The amount of log records in the log files of the primary database, in kilobytes, that are not yet sent to the secondary availability replica. which means it shows only the data lost for async replica ? [/INS...
<s>[INST]How to run sql agent job in ssms every 30 minutes except during a certain time? I have a Sql server agent job which currently runs every 30 minutes, every day, etc. I'd like to modify it so that it will run every 30 minutes, every day except between 7:00 pm and 11:30 pm. Is this possible with the job sch...
<s>[INST]Find leaf level from organization table Hi! I need to find leaf levels in an organizational table with some type of query. The rownr are unike. But the leaf level could be found in any level and consist of one or multiple rows before going up one one or many levels and then down to leaf level again. In this...
<s>[INST]What must updated null flag updated or conflict flag updated? I work on SQL server 2012 .really I don't understand what statement below do updatedand when when NullFlag updated and when conflict flag updated can you explain to me according to sample below result of query data details rows witho...
<s>[INST]Datetime Convert I am using the CONVERT function in TSQL to get a date, time and AMPM as follows CONVERT(CHAR(20), CURRENT_TIMESTAMP, 22) but it gives me 08/07/20 4:41:48 PM Is there a setting that would give only 4:41 PM without the seconds? [/INST]If no such feature, then consider two alter...
<s>[INST]Old version SQL server license questions We have some SQL servers on prior 2012 versions (1 version 2005 and 5 versions 2008 R2, standard editions)  still being used for our business, I have two questions: 1. Microsoft extended support for 2005 and 2008 R2 version SQL server  has already ended by now,  d...
<s>[INST]SQL Server database backup Hi Expert, We are not taking any Full backup for databases except TLog backup. Commvault backup is running every day on most of the production Server and I asked Commvault Admin to verify how it is running. He said Commvault is taking only Disk level backup such as MDF and LDF. In...
<s>[INST]How to count Leadfinish where have values and not null ? I work on SQL server 2012 I Face issue I can't count values on Lead finish in case of no null so How to do that Please ? so suppose I have values on LeadFinishPlatingID as : companyID LeadFinishPlatingID 345 12333 345 ...
<s>[INST]While loop is too slow in sql to get last 3 weeks data. Getting last 3 weeks data by using while loop but its too slow. Declare @beginDate int = 0; Declare @pendDate int = 1; Create Table #NOC(WeekDates date,PeopleID int,DatefBirth date,Age int,Operator varchar(8),Location varchar(...
<s>[INST]Clone sql server and use developer edition? I have a production enterprise 2019 sql server and I want to create a dev environment of this server by cloning it using Hyper-V. I am wondering if the SQL Developer edition license would allow me to run this dev environment without purchasing another enterprise 2019...
<s>[INST]List with required settings per object Dear colleagues, Is there a list or table available with the required settings per database object? I know the required settings for, say, a filtered index. It would be nice, however, to know which constructions I cannot use when, for instance, ANSI_WARNINGS = OF...
<s>[INST]Multiple server names in list Ever since upgrading to SQL Server 2019 and SSMS 18.6, when I sign in, the dropdown list of server names (in the authentication window) is doubled. I have 2 instances defined. Now I each of them twice for a total of 4 instances in the list. Everything seems to work okay, but it's ...
<s>[INST]How to select data based dynamically based on start and end of AffectedProduct ? I work on SQL server 2012 I need to get data from #partsdata table where part number matches Affected Product both start and End as Example where I have Affected Product as APAMS-\*\*\*G then I will get Parts That have start ...
<s>[INST]Legacy SQL DB question - Windows 2003, SQL 2000 instance Hi all I'm getting rid of a few Windows 2003 Servers littering this estate I've just started managing, and 100's of Windows 2008 servers. On a specific Windows 2003 server I have around 15 Databases on SQL version 8 (SQL 2000). The owner of t...
<s>[INST]Create users(AD) for Alwayson enviroment Hi our environment is SQL Server 2016 SP2 CU14 Enterprise /Wndows 2012 R2 and Always on setup. Looking to have application users to create which need to remain permission same of the database same as prod primary and not blow away every time when failover fail back...
<s>[INST]Incorrect syntax error near 1059 when build dynamic query? I work on SQL server 2012 I face issue error say incorrect syntax near 1059 when build dynamic query I try to build query dynamic 'Series' as [Series], 'Number of DAC's (1059)' as [Number of DAC's (1059)], 'Number of Bits (153)' as [Number of ...
<s>[INST]Always Encrypted Testing We want to test setting up an Always Encrypted database and set columns as needed. Can we revert back to unencrypted after testing is done?[/INST]you can backup the database prior to testing and then restore a backup. (You don't have to drop the database first.) Everything about Alway...
<s>[INST]Adding data code run without error, yet datat didn't added into Database, just temporarily on testing. HI As per subject. this is my code private void Form2_Load(object sender, EventArgs e) { koneksicustomer = new SqlConnection("Data Source=.;AttachDbFilename=R:\...
<s>[INST]Cannot setup a linked server Hi, I am trying to set up a linked server from a standalone SQL server to a 2 node Clustered SQL instance using a SQL login. It works fine from the SQL Cluster to the standalone server, but I get a 'login failed for user X' when creating it on the standalone to the cluste...
<s>[INST]Best way to create a emergency online "backup" database Let's imagine a physical database running Sql Server (latest version). We are NOT 24x7. However at worst we don't want to lose anything more than 24 hours of work. Regular offsite backups are being done and that will continue independent of what we...
<s>[INST]How to update status to only repeated row not all rows? I work on SQL server 2012 I face issue when I have two rows repeated on companyname and familyname it update two rows to repeated have temp table when two rows repeated and this is wrong correct and desired result i need is to update status to second ro...
<s>[INST]Understand instance names on a SQL Cluster Hi!, I have a 2 node SQL Clustered instance. The name of the instance is PO. The two nodes of the cluster are: SQLCL1-1 SQLCL1-2 The 'Client Access Name' on the cluster is NFFBO-SQLCL1 Some of the apps and users connect to the current on...
<s>[INST]upgrading SQL Native Client 10.0 to 11.0 Hello, What is the process to upgrade from SQL Native Client 10.0 to 11.0 ? I apologize if this is a question that has been asked already. Thank you, Veena[/INST]Install the client and modify the connection string of the application to use the new clien...
<s>[INST]How to get result from Update statement ? How to get result of Update statement in output statement I work on sql server 2012 update r set r.PartsLCUpdated=1,r.PartsLCDate=getdate(), r.IsValid=g.IsValid, r.HasReplacementCode=g.NewHasReplacementCode, r.JobUpdateHasreplacement=g.JobUpdateHasreplacement outpu...
<s>[INST]sql server sa account modify permisions is it possible to alter the permissions of the actual sa account in sql server[/INST]No. It is not possible to alter the permissions of the SA account in SQL Server. You can disable the sa login, if you want.</s>
<s>[INST]Find records deleted by cascade delete Environment : SQL Server 2017, Windows 10, Visual Studio 2019 C++ Hi All, When I delete a record from a table, few record are getting deleted from some other table due to cascade delete relationship. I want to know records deleted by cascade delete. Is there any...
<s>[INST]Logshipping Licensing Hi, We have production database for which logshipping is configured in another server. There are two mode of logshipping - 1\) Standby mode/Read-only mode 2) Recovery mode As per my knowledge if we use secondary server (logshipping configured DB) for read-only purpose then it needs l...
<s>[INST]what Microsoft.VisualStudio.OLE.Interop corrupt Hi all, in the SQL Server Management Studio 2014, after right click a table and choose Edit top(n) Rows, this exception pop up. it used to work well until our database has moved to 2017 server. Do I need to upgrade my management studio also? thanks, TITLE: Mic...
<s>[INST]Should non production SQL instances accessed with MSDN subscription be Developer Edition? Hi, I need to build 10 non-production SQL instances that will be accessed by Developers and Testers (each with an MSDN subscription). The Prod Instances are a mix of standard and Enterprise edition. Does the ...
<s>[INST]How to grant Schema Owner to a user ? Hi, There is a request for becoming Schema Owner for "dbo" for a particular database. Currently, he already gets the following database role 1) db_datareader 2) db_datawriter 3) db_dlladmin He mentions that without being the Schema Owner, he cannot ame...
<s>[INST]SQL Server Stored procedure Hi All, I have around 2000 tables. I have to rename the original table as a _old_todaydate and I have to create new table with the same name of original table without data with the help of SP by passing two input parameters.. Original table: TEST Rename table shoud be: ...
<s>[INST]SQL Server 2019 Developer - help with error in Log Hi, I made the transition by attaching databases from Server 2008 to SQL Server 2019 Developer. One of the databases uses Service Broker. I noticed that in the Log file (which grew very large in a short time) the following error appeared: The activated pro...
<s>[INST]SQL Server Cursor performance - dependece of cursor type and ORDER BY clause Hi! Today I encountered an intresting problem. I have table with 2 000 000 rows of data. There are three indexes. One cluseter index [Id] and two non-clustered index [Date] and [No]. I have opened SQL Server Cursor to fetch data...
<s>[INST]Which is faster ? View or Stored procrdeure Let's say we have we simple query to get data from a table. `select firstname from Customer` We have a View with this query and stored procedure . Which is faster and why ? [/INST]I would expect identical perfor...
<s>[INST]Bulk load data conversion error (truncation) Hello, we have a SQL Server Agent job that successfully BULK Insert from a .txt file when created by Windows machine. App team is changing their process to create this same .txt file but via Linux. But when I run the same job with same .txt file created fr...
<s>[INST]Add AG replica "the edition of this SQL Server instance is different from the edition of the instance hosting the primary replica"" I am creating availability groups, I have three nodes in the cluster (one node in Azure, two on prem). Added the on prem node without any issues, when adding the azure node as a r...
<s>[INST]error incorrect syntax near '/A' when make dynamic query ? I work on SQL server 2012 i face issue error incorrect syntax near '/A' Msg 102, Level 15, State 1, Line 4 Incorrect syntax near '/A'. so How to solve this issue please ? create table #Allfeatures ( ZPLID INT, ZFeat...
<s>[INST]issue Conversion failed when converting the nvarchar value '280VDC' to data type int why and how to solve I work on SQL server 2012 I Face issue display for me as Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the nvarchar value '280VDC' to data type int. How to solve this issue ple...
<s>[INST]Split one String into Multiple Columns - SQL Hi Developers hope all is well i just want to understand something i have one column that has a string length Example of the data set below Data Set If I take this route ill get there quicker Now what i need to do is take th...
<s>[INST]Configure a Windows Firewall for database port Hi, We are using SQL Server 2012, 2016 & 2017 in our production environment. We used default port 1433. Now we want to change the default port 1433 to any non-default port i.e 1455. Do we need to just change the port through SQL Server configuration manager o...
<s>[INST]Incorrect syntax Near 1000 when have number with comparison operators ? I work on Sql server 2012 I face issue When extract Numbers with comparison operator give me error incorrect syntax Near 1000 because I get number but cannot also get comparison operator with it . I need to get (> numbers or \<numbers o...
<s>[INST]Export from SQL Server to Excel, all text fields have a leading single quote Using SQL Server 2019 I'm exporting data from a table to Excel, however, ALL cells with data have a leading single quote. The corrupts all the data. How can this be avoided? Thank you.[/INST]I have not used the Export wizard to...
<s>[INST]SSMS import wizard using CSV file with full date is not loading milliseconds to SQL Server table I have some large CSV files that I'm trying to import into a SQL Server table using ssms import wizard. One of the columns is a date column formatted as yyyy-mm-dd hh:MM:ss:xxx. I've tried every date format in th...
<s>[INST]What to buy for 40 v-core enviroment? My Client have to but SQL 2019 license. Virtual machine is built from 4 X CPU's with 10 physical cores each, so 40 physical cores together. EULA, as I understand suggest to count it as v-cores equal with threads in CPU's. For me it is 80 v-cores, co 40 x 2 core licenses of...
<s>[INST]Drop or keep less frequently used indexes In a database, there many indexes created for most of the tables. some indexes are highly frequently used while some are used once in a month. Due to many indexes the insert is very slow. But the indexes are used once every month by monthly report queries. So do I dro...
<s>[INST]Why wont my log backups shrink the log file? Hi, I have a database with a half a terrabyte log file. It says the log is 96% full. It wont shrink and I cant put it in simple mode because it is involved in replication. I take log backups every 2 minutes. I have done a full backup and the log still wont sh...
<s>[INST]How do I pass as a parameter a column name while performing SELECT SUM? Hello everyone, can not get this working, there are no any exceptions, however this code returns "0". When I put a real column name (e.g. Quantity) instead of @ColumnName, this returns correct sum. I checked in Debug, the property Column...
<s>[INST]How to get Total Count of table in column in sql server 2016 i am trying to get count of rows in tables with below code. SELECT count (*) from Resistortable SELECT count (*) from capacitortable Is there any way to get result like below. Resistortable|capacitortable 200 ...
<s>[INST]How to Insert Book details using While Loop where status is not null? I work on SQL SERVER 2012 . I face issue I can't use While loop to insert Books details that status is not NULL to table #BookHaveGeneralStatus . Meaning if any book have only one status not null on Books Details then insert it on table ...
<s>[INST]Restoring Datawarehouse DB from one SQL Server to DEV & UAT on a different SQL Server Currently in our Production server there is a webservice call being made. The call works fine on PROD, but not in UAT and DEV. This is due to inconsistencies in the third party managed database. Every month, there is a ...
<s>[INST]Script Generator via SMO and C# Hi I would like to produce SQL Data Script via SMO with C# 1. I am trying first to generate data script with one table. And i need to produce only insert script with a few rows only of a table , not all table data. How add filter ? like a primary key id or something ? 2. My c...
<s>[INST]SQL Agent job by non-admin : Linked servers cannot be used under impersonation without a mapping for the impersonated login On SQL 2014 all users can run queries in SSMS using linked servers without issue. However since they are not sysadmins, their SQL Agent job fails with: “Linked servers cannot be used unde...
<s>[INST]Always encrypted and triggers We are planning for encrypting columns in a table that has trigger for INSERT and UPDATE. When I try to encrypt a few of the columns I get an error shown below. I think I understand it because the trigger is not on the client side but I don't know how to work around this. War...
<s>[INST]sql 2008 decommission - Database oddity HI all Getting rid of my final SQL 2008 Instance, 25 old DB's I'm moving to sql 2017, making sure they are accessible and in Compatibility 100 mode, then backing them up from SQL 2017 and then archiving the backup files away. One of those Databases, I cannot find an ow...
<s>[INST]Log file size is bigger than the datafile size One of the database has datafile size 6.5 GB and Transactional Log 21 GB. What should be the process of reducing the log file size? Backup job is enabled in Transactional and Full backup on 2016 server.[/INST]Just to be clear. The log file NEVER gets physicall...
<s>[INST]Execute a single stored procedure using parallelism Hello Experts, I am working on a SQL server 2019 environment with Maxdop set to 8 and Cost threshold at default 5. Application executes a stored procedure SP1 on a Database called DB1. Maxdop for DB1 at database level is 1. Sp1 execution takes ...
<s>[INST]Display Numbers as below style in sql server I need small help regarding sql statement: In Sql server: The value as 1500 Then number should be display as 2 different options like: For Example: Then need to return data set as 1-1000 1001-1500 That Means Here i am splitting 2nd opt...
<s>[INST]How to prevent update to category only by part id when it be blank or NULL on inputdata table ? I work on sql server 2012 I face issue I need to do update data found on table #DataUpdated based on part id exist on table #inputdata . my issue on category on inputdata will update #dataupdated table when it have...
<s>[INST]Incorrect Syntax Error In stored Procedure sql server 2016 Hi, The Stored Procedure is looks as: CREATE PROCEDURE Test_Res @COMPID int = '93', @DefaultorMissingvalue varchar(max) = NULL, @Startdate VARCHAR(50), @Enddate VARCHAR(50), @ICLAS_to_include varchar(max), @IID...
<s>[INST]Dynamic sql error in Select when empty string pass in sql server 2016 I am very new to dynamic sql. SQL SERVER 2016 The below code is written using dynamic sql, unfortunately throwing error. please help. CREATE PROCEDURE [USA_PHILIPS].[usp_stock] @VCM int, @ID varchar(25), --Always define your v...
<s>[INST]SQL Server 2019 - Scheduled jobs Bizarre incident - Next run date of all the jobs moved 6 months Forward by itself We are using SQL Server 2019 Enterprise Edition (Version 15.0.4073.23). Have about 100+ scheduled jobs which are hourly, daily, weekly or Monthly. Jobs stopped working today and on troublesho...
<s>[INST]How to delete Max PartDetailsId for Reapeated parts Based on CompanyId and PartId ? I work on SQL server 2012 . I face issue I can't delete max PartDetailsId from part details based on part ID and company id that related to main table parts . if Part ID repeated on partdetails then I get max PartDetailsId by...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
4