How do I execute SQL queries against a RDS SQL Server instance - sql-server

I am a newbie to AWS, and frankly to DB administration. I just installed a SQL Server instance, and now I would like to create tables, execute queries, etc.
Are there any free tools I can use to administrate the DB, and execute ddl and dml against this instance, from my Windows EC2 instance?
Also, how do I get that from my EC2 instance?

You can use SQL Server Management Studio.
Here's the AWS Documentation on how to connect.

Related

SQL Server agent backup SSAS database

I want to use the SQl Server agent to backup one of my Analysis servers databases.
However, when I connect to my Analysis Services I have to access to the SQL server agent.
It only shows up when I connect to my Database Engine. So now when I try to schedule a backup it says it cannot find the Database. How am I supposed to do this?
Is the SQL server agent supposed to show up when connecting to my Analysis Services?
SQL Server Agent needs access to the relational database engine, as it saves its configuration and the job execution details which you can see as the job history in tables of a relational database. Actually, it uses the msdb database which is part of every SQL Server relational database instance. Thus, you need to access the relational database engine in order to access SQL Server Agent. But there is no requirement that the machine running SQL Server Agent is the same as the one running Analysis Services. Both can run on different machines, and even have different versions of SQL Server.

Copy table from On premises SQL server to AWS RDS

I need to copy a SQL server table from an on prem DB to AWS RDS(sql server). I'm trying to think of the simplest way to do that. I was thinking of using a link server to access AWS sql from the on prem DB but not sure how to create one. Or should I go with other option like SSIS or bulk copy.
Fortunately, there are various ways of doing this on prem to RDS migration!
Linked Servers can be used for only EC2 SQL Server instance to RDS SQL Server instance for now I think. The detailed information is here: https://aws.amazon.com/blogs/database/implement-linked-servers-with-amazon-rds-for-microsoft-sql-server/
DMS can be used to migrate from on prem to RDS:
https://aws.amazon.com/blogs/database/introducing-ongoing-replication-from-amazon-rds-for-sql-server-using-aws-database-migration-service/
Another solution is to do a periodic native SQL Server backup from on prem and restore the db onto SQL Server instances: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html
Or you can migrate by using transaction logs: https://aws.amazon.com/blogs/database/how-to-migrate-to-amazon-rds-for-sql-server-using-transactional-replication/

Deploying a database to SQL Azure through SSMS fails with views in the database

I'm having issues deploying databases to SQL Azure DB from SQL Server Management Studio using the Tasks > "Deploy Databases to Microsoft SQL Azure" option path. I notice this tends to fail if the database has views. Is this a well-known issue or am I doing something wrong?
Please consider not using SSMS and use Microsoft Data Migration Assistant (DMA) instead. DMA is the easiest way to migrate a database to Azure SQL Database. It gives you an assessment of the database and tells you about possible blocking points and existent incompatibilities of the database with Azure SQL Database. You can download DMA from here.

Cannot view tables on AWS RDS SQL Server Express

I have an AWS RDS sql-micro instance running SQL Server Express. I have been able to successfully connect to the database using both Microsoft SQL Server Management Studio (PC) and RazorSQL (Mac). I would like to view and update records but none of the tables are visible.
Under the 'Tables' folder I can see a 'System Tables' folder and a 'FileTables' folder, both are empty.
I suspect this may be a SQL permissions issue with my user account, but I'm not too familiar with AWS RDS or SQL Server Express.
I don't think this has anything to do with AWS Permissions. Check if the SQL Server user you are using has the correct permissions.

What is best practise to migrate On-premises SQL Server to Azure VM - Dynamic SQL Agent Jobs in AlwaysOn offering

I am trying to migrate On-premises SQL Server to Azure VM.
I am writing in reference to below link
https://azure.microsoft.com/en-in/documentation/articles/virtual-machines-migrate-onpremises-database/#azure-vm-deployment-wizard-tutorial
I am having multiple applications in which few are hosted in Azure and few are On-premises.
All these applications contact on-premise SQL Server for data manipulations.
In some scenario these applications creates dynamic SQL Agent Jobs!
Now my requirement is to move on-premise SQL Server to Azure cloud. I would like to know how can I manage these dynamic SQL Agents in Azure?
In short, My question is: how can I migrate below items?
SSIS packages associated with these databases
SQL Agent Jobs scheduled in server (created dynamically)
File Stream associated with server databases
Also I am planning to use SQL Server "AlwaysOn" offering. So how to synch these SQL Agent Jobs in these shared Virtual Machines?
I was referring https://azure.microsoft.com/en-us/documentation/articles/sql-database-general-limitations/ and it says as follow
Microsoft Azure SQL Database does not support SQL Server Agent or
jobs. You can, however, run SQL Server Agent on your on-premises SQL
Server and connect to Microsoft Azure SQL Database.
SQL Agents can be dynamically created as shown here https://www.mssqltips.com/sqlservertip/3052/simple-way-to-create-a-sql-server-job-using-tsql/ My question is, will these stored procedures run in azure cloud?
Update
It’s challenge but can be done. We need to setup new Job, which constantly monitors and pull the current role of the replica, based on PRIMARY role, we run the job needs to do if it is the primary.
Below link gives me hint
https://dba.stackexchange.com/questions/45137/sql-server-agent-jobs-and-availability-groups but I am looking for step by step blog/article to achieve this.

Resources