I successfully created a MySQL database on AWS but I don't remember any field that demands database name when I was creating the database. Now I'm faced with an operation that is demanding for my database name. I checked my database instance but my database name column is blank. How do I resolve this?
Related
I'm very new to Azure so please don't judge me too harshly.
So, in this project, I've got SQL Server on-premises 'production' database which is the 'master' data. I'm writing a small .NET application that is published on Azure and it is using tables and stored procedures on Azure database. My idea is to have the data in the tables on Azure database up-to-date with the on-premises 'production' database tables.
I've created Sync Group and Sync Agent and it looks like data is flowing accurately from the on-premises Sql Server tables to Azure database tables.
The only problem I have is that when some records on 'prodution' are deleted these records will not be deleted from the Azure tables.
I guess the questions are: What am I missing in synchronization and is it even the right approach to update the Azure database tables using the 'Sync to other databases' tool?
Thanks in advance!
Make sure you have elected the Azure SQL Database as the Hub in your sync group and the on-premise as a member database.
For the Conflict Resolution Policy of the Sync Group, make sure you have selected "Member wins".
According your problem description, since your Azure SQL Data Sync group has be created, we can get that:
Your on-premise SQL server DB is member database.
The Azure SQL database is Hub database.
The Sync Direction of your Sync must be "Member to Hub" or "Bi-directional Sync",
The only problem I have is that when some records on 'production' are deleted these records will not be deleted from the Azure tables.
For your question, I don't think Conflict Resolution Policy can help you solve it.
There isn't a good solution now, I only can give two suggestions for you:
Set Automatic Sync: Off. Sync the data from on-premises SQL
server to Azure manually. This can help your keep
the data in Azure SQL DB for a long time.
Create a new table in Azure SQL database, don't add the new table to
sync group. Copy the data from your synced table to new table. Using the new
table for test.
Hope this helps.
I need to restore the database from a different environment where different logins are used but I want to keep permission to this database for already existing login on this server.
Now, after restoring my login on the targeted server it lost mapping for this database (and owner role)
I want to restore everything inside the database and same time I don't want to map the database and add owner role to the login.
Is it even possible?
I've tried different ways of restore - deleting before restore, as well as delete but not to close existing connections. The result is the same, I need to map new restored DB again and add the owner role.
Normally database users have to be mapped to instance logins to work, but if you want to make your DB more instance independent and control your database from the inside of it then the solution for you would be a Contained Databases.
From MS BOL:
A contained database is a database that is isolated from other
databases and from the instance of SQL Server that hosts the database.
SQL Server 2017 helps user to isolate their database from the instance
in 4 ways.
Much of the metadata that describes a database is maintained in the database. (In addition to, or instead of, maintaining metadata in the
master database.)
All metadata are defined using the same collation.
User authentication can be performed by the database, reducing the databases dependency on the logins of the instance of SQL Server.
The SQL Server environment (DMV's, XEvents, etc.) reports and can act upon containment information.
Oracle database documentation defines the global database name as below:
The Oracle Database software identifies a database by its global database name. A global database name consists of the database name and database domain. Usually, the database domain is the same as the network domain, but it need not be. The global database name uniquely distinguishes a database from any other database in the same network. You specify the global database name when you create a database during the installation or using the Oracle Database Configuration Assistant.
Oracle Database Installation Guide
Question: How does Oracle enforce unique global database name? For example, say I have a server named ServerA in my network with an Oracle database called DatabaseA, and I try to install another database with same name on ServerB, will the installation error out ?
How does Oracle find out about the other database ?
I am sure there is some design goal and some use cases for these confusing names. Looking for a proper explanation with sample scenarios.
I am a newbie to SQL DBA, I wanted to understand the following concepts
What is the difference between a Database migration & Database Refresh in SQL?
Suppose we want to migrate a database from one instance to other instance, can we follow the below method
Create a new DB in the destination instance with the same name as the source instance
Refresh destination DB with Source DB, & copy all the user access
Database migration:
Moving a database from one server to other usually will do for database upgrades.
Database Refresh in SQL:
Overwrite the existing data in the database with other database data using backup files. Usually will refresh production data to UAT or DEV for data/Issue analysis.
Suppose we want to migrate a database from one instance to other instance, can we follow the below method?
Yes you can follow.
If you are using sql server 2012 and above then you can go for contained database options.
I'm using NetBeans and I need to connect to Oracle Database.
I set up the driver and the connection and it all works fine. I can run queries on this connection just fine (through the IDE).
The problem is this- The tables I want to work with are not defined on the same schema that I use for the connection, although, my schema does have all the premissions to view and alter those tables.
But since the tables don't belong to this schema, they are not presented in the Tables node of the connection in NetBeans, and I can't use the wizard in order to create entities for those tables.
Any solutions?
Thanks, Malki.
Does NetBeans work with synonyms ?
If so you could try creating synonyms in your connection schema pointing to the tables in the primary schema.
If it is just for the purposes of the Wizard, grab your own development database and create copies of the tables there. Generate your app against connections to that database, and then just change your connection when you are done.
You app may want to issue a 'ALTER SESSION SET CURRENT_SCHEMA = ....' on logon so that it looks at the appropriate schema by default, rather than that of the connected user.
Why can't you create another connection with schema containing tables you need?
Why can't you create a connection without specified schema (which will give you access to all schemes the user is authorized to access)?