I'm trying to migrate database from local to AWS Fxs
I can restore normal tables but got this error when migrating memory-optimized tables.
"Can't use file "\....\SQLDB\memory_optimized_file_..." for clustered server. Only formatted files on which the cluster resource of the server has a dependency can be used. Either the disk resource containing the file is not present in the cluster group or the cluster resource of the Sql Server does not have a dependency on it"
Related
I'm working on taking a on-premise server that works with SQL Server 2019 and migrating this to the cloud. The data right now is not the important thing, but rather the schema since this is a proof of concept. The main issue is that the on-premise server uses filestream to sometimes handle files. This will have to change in the future as refactoring and application updates take place.
The easiest way I thought would be to generate a schema .sql script from the old db and run that in the new environment, but this generated a TON of errors (25k).
Most of the errors include:
Failed permissions in database 'master'
Not finding certain objects in the new clean DB
Extended properties are not permitted on an object or it doesn't exist
Invalid data types
Database doesn't exist or permission not allowed
Filestream feature is disabled
So this probably won't work as a drop in solution to get the schema migrated to the new db. I've heard about AWS DMS (data migration service), but I don't know a lot about this. I'm asking, what tools could I look into to migrate over to RDS when RDS doesn't support features native to SQL Server?
One way to import schema is through the generated scripts wizard. You will have to manually tweak some things to make filestream and the local configuration of the sql server work nicely with aws RDS.
Generate and Publish Scripts Guide
Go to the source database
Right click the database in the menu on
the left (Object Explorer) Tasks>Generate Scripts
Select All tables,
procedures, etc.. except for filestream tables.
In the Scripts wizard pop up under Set Scripting Options, choose to make a .sql file, under advanced options, choose Schema Only. This will generate a script with only meta data for the tables and not the data in them
Generate the file.
Copy the .sql file over to the
EC2 instance (probably the Bastion Host) that is connected to the
RDS instance.
Open MS SQL Management Studio and right click on the
top most object in the Object Explorer and open a new query.
Copy and paste the code inside the .sql file into the query window.
Change the file path location of the data and log file to be
D:\rdsdbdata\DATA\TEST_AWS.mdf and D:\rdsdbdata\DATA\TEST_AWS_Log.ldf
respectively. Any other file location will not be recognized by RDS
and will fail to create the table.
Comment or remove the lines of code that include:
a. ALTER DATABASE [TEST_AWS] SET TRUSTWORTHY OFF
b. ALTER DATABASE [TEST_AWS] SET HONOR_BROKER_PRIORITY
c. ALTER DATABASE [TEST_AWS] SET DB_CHAINING OFF Creating global users
d. FileStream
Execute the Script
Consider adding towards the top of the script DROP DATABASE [TEST_AWS] before the creation of the new database just in case you need to run the script multiple times to find the errors. This will save you from overwriting errors or having a unfinished table in memory.
Wanted to know if its ok to add additional data file (.ndf file) to existing database which is configured in always on availability group?
Is it recommended to do during downtime?
The databases which need additional file are very big (2TB to 5TB). The new file will be added to different disk from the rest of the data files on that database. Please advise if I can add the data file through GUI on primary replica server in production environment without downtime? Secondary server has same disks and folder paths. Will there be any issues which I need to be careful? Thank you
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?
I am working on a desktop application that uses a local installation of MySQL to store data across multiple schemata. My goal is to use SymmetricDS to transfer those schemata to an Oracle database on a different machine.
So far I managed to set up a slave node residing on the desktop computer and a master node residing on some server. Using a .properties file in the engine directory, I also successfully transfer data from a single schema and table to the Oracle DB.
The problem I am now facing is that my application will create and possibly delete schemata on the fly.
Does that mean I will have to maintain a .properties file for each schema and somehow implement a wrapper for the symadmin command to register the corresponding engines?
Or is there maybe a better way?
You should able to adjust configuration on the fly. The sym_trigger table has a reference to schema for each table. If the database user SymmetricDS uses has access to newly created schemas (database) then SymmetricDS should be able to create new triggers dynamically that are in new databases. No restart needed.
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.