By using AWS re:Post, you agree to the Terms of Use
/Microsoft SQL Server/

Questions tagged with Microsoft SQL Server

Sort by most recent
  • 1
  • 90 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Announcement: Amazon RDS for SQL Server ending support for Microsoft SQL Server 2012

Microsoft announced they will end support for SQL Server 2012 on July 12, 2022. On that date, Microsoft will stop critical patch updates for SQL Server 2012. We strongly recommend that you upgrade your RDS for SQL Server 2012 database instance to a different major version at your earliest convenience \[1]. Starting September 1, 2021, we will begin disabling the creation of new Amazon RDS for SQL Server database instances using Microsoft SQL Server 2012. Starting June 1, 2022, we plan to end support of Microsoft SQL Server 2012 on Amazon RDS SQL Server. At that time, any remaining instances will be scheduled to migrate to SQL Server 2014 (latest minor version available) as described below. We recommend that you upgrade your Microsoft SQL Server 2012 instances to Microsoft SQL Server 2014 or later at a time convenient to you. You can schedule an upgrade to a different major version by going to the instance modify page in the AWS Management Console and changing the database version to a desired value. If you choose the "Apply Immediately" option, the upgrade will be initiated immediately after exiting the modify page. If you choose not to apply the change immediately, the upgrade will be scheduled during your maintenance window. Upgrade Options: We support five (or four on some regions) different major/minor version combinations of SQL Server 2012. These database instances can be upgraded to the latest minor version of SQL Server 2014, 2016, 2017, and 2019 directly. To find out more information on upgrading please reference this document \[2]. You will still be able to restore a SQL Server 2012 database to any major version supported instance on Amazon RDS SQL Server, even after the deprecation. For more information on restoring a database in RDS see here \[3]. Should you have any questions or concerns, the AWS Support Team is available via AWS Premium Support \[4]. \[1] https://docs.microsoft.com/en-us/lifecycle/products/microsoft-sql-server-2012 \[2] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.SQLServer.html \[3] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html \[4] https://aws.amazon.com/support
0
answers
0
votes
5
views
tobyxu
asked a month ago

How to replicate IF NOT EXISTS in redshift

I am trying to replicate a functionality from SQL Server into redshift where I have to ignore column if the column exists, otherwise add it into the table. I have come across these posts in stackoverflow, however couldn't find a proper solution from them: 1) https://stackoverflow.com/questions/65103448/redshift-alter-table-if-not-exists 2) https://stackoverflow.com/questions/42035068/redshift-add-column-if-not-exists 3) https://stackoverflow.com/questions/42669237/workaround-in-redshift-for-add-column-if-not-exists I am able to get a TRUE or FALSE for columns that I want to check. But I don't know how to ALTER the table to add or remove one. I am also a bit new to redshift, so I would appreciate a response! These are some of my attempts: ````` IF (SELECT EXISTS(SELECT * FROM pg_catalog.pg_table_def WHERE schemaname = 'my_schema' AND tablename = 'my_table' AND "column" = 'my_new_column' )) <> TRUE THEN ALTER TABLE my_table ADD COLUMN my_new_column varchar END IF; ````` ``````` CREATE OR REPLACE PROCEDURE if_else() LANGUAGE plpgsql AS $$ BEGIN IF (SELECT EXISTS(SELECT * FROM pg_catalog.pg_table_def WHERE schemaname = 'my_schema' AND tablename = 'my_table' AND "column" = 'my_new_column' )) <> TRUE THEN ALTER TABLE my_table ADD COLUMN my_new_column varchar END IF; END; $$ ; CALL if_else(); ``````` A few more failed attempts: ``````` CREATE OR REPLACE PROCEDURE alter_my_table() AS $$ BEGIN ALTER TABLE my_table ADD COLUMN my_new_column varchar END; $$ LANGUAGE plpgsql ; SELECT CASE WHEN COUNT(*) THEN 'warning: column exists already.' ELSE CALL alter_my_table(); END FROM pg_catalog.pg_table_def WHERE schemaname = 'my_schema' AND tablename = 'my_table' AND "column" = 'my_new_column' ``````` Thank you for your time.
1
answers
0
votes
5
views
AWS-User-4229592
asked 2 months ago

CDK v1: Deploy RDS SQL Server and use credential in a connection string for fargate docker instance

I have been trying to find an answer in documentation, github, here and the old forums, but I fail to find the answer to my question. In my CDK v1 (python) I create a RDS instance of SQL Server and set credentials with aws_rds.Cerednetials.from_generated_secret(), but when I later on want to provide environment/sercrets values to the docker container I want to run in fargate I have the following environment variable that I need to be set: DB_CONNECTION_STRING, which has the following syntax: Server=<somehost.aws.com>,144;Database=<databasename>; User Id=<databaseuser>;Password=<databasepassword> All the examples I have seen uses multiple variables like DB_USER/DB_PASS/DB_HOST and then you can easily set those with help of secret_value, but there is no example on generating a connection string. How do you solve this? I took a look at aws glue, but it didn't feel like the right optionand I'm not too keen on making a dockerfile to try to pull the official docker image and then create a kind of a wrapper to have environment/sercret variables and then a script that builds up the connection string and sets it before calling the start script for the application (this has other downsides). The reason why I'm not using the CDK v2 is that the current version seems to be broken when you create a new project in WSL (seems to think it's pure ms-windows and fails to create a number of files needed). Thanks in advance for any reply.
1
answers
0
votes
8
views
BashScripter
asked 4 months ago

SQL Server on RDS Issue With Linked Server

I'm testing Linked Server on RDS SQL Server to point to existing SQL Server (non RDS). Test connection throw error with the following message : ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ Named Pipes Provider: Could not open a connection to SQL Server [53]. OLE DB provider "SQLNCLIThe test connection to the linked server failed. 11" for linked server "GFHSVRHRISDEV01.corp.xyz.co.id" returned message "Login timeout expired". OLE DB provider "SQLNCLI11" for linked server "GFHSVRHRISDEV01.corp.xyz.co.id" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.". (Microsoft SQL Server, Error: 53) I have validated the network connectivity as well as domain name resolution using EC2, domain resolution works, telnet to port 1433 also open. As this RDS integrated with the Managed Active Directory, I have also checked that the Conditional Forwarding works to lookup target domain. The target database also already configured to accept remote connection. What would be the possible root cause for this? I'm looking for any hints to further troubleshoot this issue.
1
answers
0
votes
3
views
EXPERT
Tedy_T
asked 2 years ago
  • 1
  • 90 / page