We help IT Professionals succeed at work.
I am new to AWS RDS. We have SQL server in Azure, not SQL Azure. I think AWS RDS, like SQL Azure is Platform as a Service (PaaS), not  infrastructure as a service;. I want to know if this is correct statement.

I have MS 2016  Always-on cluster. What is the benefits if we want to do AWS RDS.

What is pros and cons for AWS RDS vs not just AWS?
0
I am working through a production issue where the client company migrated from MySQL v5.6  (AWS RDS)  to   Aurora  (AWS), and the MySQL version is 5.7. Initially the migration worked, but ran into locks on the Aurora engine, within 24 hours.

I am looking for the best practice scenario for this migration, and recommendations.
0
I have the following code that creates the data I want
CREATE TABLE #CourseSales
(Course VARCHAR(50),Year INT,Earning MONEY)
GO
--Populate Sample records
INSERT INTO #CourseSales VALUES('.NET',2012,10000)
INSERT INTO #CourseSales VALUES('Java',2012,20000)
INSERT INTO #CourseSales VALUES('.NET',2012,5000)
INSERT INTO #CourseSales VALUES('.NET',2013,48000)
INSERT INTO #CourseSales VALUES('Java',2013,30000)
GO



DECLARE @DynamicPivotQuery AS NVARCHAR(MAX)
DECLARE @ColumnName AS NVARCHAR(MAX)
 
--Get distinct values of the PIVOT Column
SELECT @ColumnName= ISNULL(@ColumnName + ',','')
       + QUOTENAME(Course)
FROM (SELECT DISTINCT Course FROM #CourseSales) AS Courses
 
--Prepare the PIVOT query using the dynamic
SET @DynamicPivotQuery =
  N'SELECT Year, ' + @ColumnName + '
    FROM #CourseSales
    PIVOT(SUM(Earning)
          FOR Course IN (' + @ColumnName + ')) AS PVTTable'
--Execute the Dynamic Pivot Query
EXEC sp_executesql @DynamicPivotQuery

What I need is for the result to be available to join on an actual table Individuals

So I can select like this...

Select i.FirstName, i.LastName, i.BirthDate, r.*
From Individuals i
JOIN @resultdata r on i.IndividualID, r.IndividualID
0
In the function below...

I am building a #temp table that will have from 20k - 5k records in it
I am then doing a select on that table

Select * from #temp
WHERE 1 = 1
      AND dbo.brkOwnsTimeshareContract(ISNULL(b.ExternalID2, '0')) = 1;

Open in new window


It seems slow... and I am wondering if I have a better solution or tweak on either my select or the underlying function itself

The dbo.everyware_t_contract table generally has @ 60k records in it

ALTER FUNCTION [dbo].[brkOwnsTimeshareContract]
    (
        @OwnerID INT = NULL
    )
RETURNS TINYINT
AS
    BEGIN

        DECLARE @OwnerBucket TINYINT = 0;

        IF EXISTS (   SELECT ContractID
                      FROM   dbo.everyware_t_contract c
                      WHERE  c.OwnerID = @OwnerID
                             AND (   c.ContractStatus = 'Active'
                                     OR CHARINDEX('Phase', c.ContractStatus) > 0
                                     OR CHARINDEX('Pender', c.ContractStatus) > 0 
									 OR CHARINDEX('Suspense', c.ContractStatus) > 0 
									 OR CHARINDEX('Not Back', c.ContractStatus) > 0 
									 OR CHARINDEX('Presale', c.ContractStatus) > 0 )
                             AND NOT (   CHARINDEX('club', c.ContractType) > 0
                                         OR CHARINDEX('guest', c.ContractType) > 0
                                         OR CHARINDEX('goc co', c.ContractType) > 0
                                         OR CHARINDEX('goc breck', 

Open in new window

0
I am using MS Sql Server Management Studio 14.0.17224.0
I am connected to an AMAZON RDS SQL Server Instance 2014

When I open the Activity Monitor

Is there any way I can see a specific Stored Procedure that is running?
0
Hello,

I am trying to import a SQL file dumped using MySQL administrator from v5.5.12, first using MysQL8 on Windows 10 then using 5.6.41 on AWS/RDS, the error using MySQL Workbench 8 is:

15:25:12 Restoring C:\path\sql\sqlfile.sql
Running: mysql.exe --defaults-file="c:\users\users\appdata\local\temp\tmpyzknop.cnf"  --protocol=tcp --host=awsendpoint.rds.amazonaws.com --user=myuser --port=3306 --default-character-set=utf8 --comments --database=mysql  < "C:\\Users\\users\\OneDrive\\Documents\\sqlfile.sql"
ERROR 1044 (42000) at line 21: Access denied for user 'myuser'@'%' to database 'mysql'

Operation failed with exitcode 1
15:25:17 Restoring C:\Users\abell\OneDrive\Documents\\sqlfile.sql
Running: mysql.exe --defaults-file="c:\users\user\appdata\local\temp\tmpvhirjz.cnf"  --protocol=tcp --host=awsendpoint.rds.amazonaws.com --user=myuser --port=3306 --default-character-set=utf8 --comments --database=mysql  < "C:\\Users\\user\\OneDrive\\Documents\\sqlfile.sql"
ERROR 1045 (28000): Access denied for user 'myuser'@'123.456.78.9' (using password: NO)

Operation failed with exitcode 1

I've established that the username and password with which I logged on to AWS.RDS via Workbench is the master user for this instance, BUT I also notice it doesn't have DBS and maintenance perms and I am not sure if these are required or how to set them from AWS dashboard ? or how to create a new user for the existing RDS instance MYSQL as permission is denied using the …
0
I am trying to migrate a RDS Database to Azure

Using the Migrate Tool in Azure... I keep getting instructions to download a OVA File

But I cannot open this thing

I assume I need VMWare on my Windows 10 PC?

Any help would be appreciated
0
I am looking at whether my update below is the most effecient way of running the update
Both are populated from live data
@tableROllAPoll will generally have 500-2500 records
@tableActiveRecords will have 300,000+ records

I have the @table structures included as well
DECLARE @tableROllAPoll TABLE
(
    IndividualID BIGINT,
    matchname VARCHAR(1000),
    matchaddres VARCHAR(1000),
    matchEmail VARCHAR(1000),
    HomeNumber BIGINT,
    Mobile BIGINT,
    matchOP VARCHAR(1000),
    MatchAll_IndividualID BIGINT,
    NamePhoneEmail_IndividualID BIGINT,
    NamePhoneAddress_IndividualID BIGINT,
    NameAddressEmail_IndividualID BIGINT,
    PhoneAddressEmail_IndividualID BIGINT,
    NamePhone_IndividualID BIGINT,
    NameEmail_IndividualID BIGINT,
    PhoneEmail_IndividualID BIGINT
);


DECLARE @tableActiveRecords TABLE
(
    OriginID INT,
    OriginName VARCHAR(1000),
    IndividualID BIGINT,
    matchname VARCHAR(1000),
    matchaddres VARCHAR(1000),
    matchEmail VARCHAR(1000),
    HomeNumber BIGINT,
    Mobile BIGINT
);

Open in new window



UPDATE rp
SET rp.NamePhoneEmail_IndividualID = namephoneemail.IndividualID
FROM @tableROllAPoll rp
    JOIN @tableActiveRecords namephoneemail ON rp.matchname = namephoneemail.matchname
                                               AND rp.matchEmail = namephoneemail.matchEmail
                                               AND rp.Mobile = namephoneemail.Mobile
                                               AND rp.Mobile > 0;

Open in new window

0
I need to estimate the hours needed for an AWS project if the employee has Developer, SysOps and Solutions Architect certs.

1. Identity and Access Management
2. Replication of Data Across 2 regions
3. Logging: AWS Service Change Trail, Network Traffic, System logging
3. Virtual Private Cloud
4.  Multi-Tier Stateless Firewall
  • ○ Interface Server DMZ
  • ■ Stateful firewall DMZ ­ Remote Admins
  • ○ Web Accessible/Serving
  • ○ Internal Processing
  • ○ Database/Protected
5. Managed PostgreSQL instance
○ Daily backups
○ Stateful security/firewall
6.  Server Hardening
○ Updated patching and automated security patch upgrade
○ OS based firewall configuration
○ Dependency package authentication and installation
○ System based intrusion detection/prevention
○ Duplication system logs in CloudWatch
○ Automated bots data offload to secure storage
0
In the SQL Selects below the first one will get you an example of my data

The select unions is what I need as output

The Question Types can be literally anything and may be from 3 to 5 types
(IndividualTypeID is tied to an origin so everyone within that origin will have the same origin)

Not all Individuals will have all the Question Types
But they will all be constrained within a "set"
In this case... my example below... 2.
Marital Status and age


DECLARE @table TABLE
(
    IndividualID VARCHAR(100),
    QuestionType VARCHAR(100),
    AnswerText VARCHAR(100)
);
INSERT INTO @table
(
    IndividualID,
    QuestionType,
    AnswerText
)
VALUES
(4819540, 'MaritalStatus', 'Single'),
(4819540, 'Age', '25-75'),
(4819546, 'Age', '18-24'),
(4819599, 'MaritalStatus', 'Married');

SELECT * FROM @table



SELECT 4819540 IndividualID, 'Single' MaritalStatus, '25-75' Age
UNION ALL
SELECT 4819546, '', '18-24'
UNION ALL
SELECT 4819599, 'Married', ''

Open in new window

0
I have dynamic sql that builds a select correctly

DECLARE @DIspo VARCHAR(MAX);
SET @DIspo = '
SELECT ''MAX(cte.'' + COLUMN_NAME + '') AS '' + COLUMN_NAME FROM [tempdb].INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME LIKE ''#table%'' AND COLUMN_NAME IN (SELECT CODE FROM dbo.DispositionTypes
WHERE DispoReport = 1)';
PRINT @DIspo;

Open in new window


When I copy the Printed @Dispo into a query window I get this

SELECT 'MAX(cte.' + COLUMN_NAME + ') AS ' + COLUMN_NAME FROM [tempdb].INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME LIKE '#table%' AND COLUMN_NAME IN (SELECT CODE FROM dbo.DispositionTypes
WHERE DispoReport = 1)

When I do run the select
I get three rows in a table

MAX(cte.DNC) AS DNC
MAX(cte.NI) AS NI
MAX(cte.DEALPUR) AS DEALPUR

What I need to do is in ONE process...
Get back a varchar string I can use elsewhere in a dynamic query process

MAX(cte.DNC) AS DNC, MAX(cte.NI) AS NI, MAX(cte.DEALPUR) AS DEALPUR
0
how to access s3 bucket in the docker file.

its expecting aws configure , i export the  key's but its does not help for me!!!
0
How to connect already running mariadb container

I found this query

$ docker run --name appName --link some-mariadb:mysql -d application-that-uses-mysql

i am confuse with the syntax ?
can any one tell me how to use this ??
0
How to download awscli docker image  (I try docker run awscli it ask password without that is it possible)

How to download mariaDB docker image  (I try docker run mariaDB it ask password without that is it possible)
0
In the sql below it is reading about 2000 records.
Is there any way to read those columns from left to right
Basically I want to choose column 1 if its > 0
If not then column 2
and so on

Just seems like I have a mess here



SELECT RollaPoll_IndividualID ,
            CASE WHEN [1] > 0 THEN [1]
                 WHEN [2] > 0 THEN [2]
                 WHEN [3] > 0 THEN [3]
                 WHEN [4] > 0 THEN [4]
                 WHEN [5] > 0 THEN [5]
                 WHEN [6] > 0 THEN [6]
                 WHEN [7] > 0 THEN [7] ELSE [8] END IndividualID
     FROM   #Results r

Open in new window

0

AWS RDS

16

Solutions

24

Contributors

Top Experts In
AWS RDS
<
Monthly
>

No Top Experts for this time period. Answer questions to earn the title!