Using Mssql I want to create the flyway_schema_history table on a given filegroup instead of primary. Is there any way I can accomplish getting the flyway_schema_history table to appear in a different filegroup when using mssql?
There is currently no built-in way. You have to manually create the table to accomplish this.
Update: This will be supported from Flyway 6.0.0 onwards.
Related
I have loaded a huge table from SQL Server onto Hive. The mistake I made is I created the table as a Internal table in HIVE. Can anyone suggest any hack so that I can alter the table structure , without dropping the data.
The data is huge and I cant afford to export the data out of source again.
The problem right now, is that since the column orders don't match the SQL server table, a lot of columns display NULL.
Any help will be highly appreciated.
I do not see any problem to use an Alter Table on a internal table. (https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterTable/Partition/Column)
Another - but not recommended - option would be to open your hive metastore(HCatalog) and apply the changes there. Hive reads out the schema information from a relational database (configured during the Hadoop setup, default is MySQL). In this MySQL you can try to change some settings. However, this is not recommended as with a mistake, you can screw your whole Hive databases.
The safest way is creating a new table and using the existing as a source
create table new_table
as
select
[...]
from existing_table
I have normal sqlite database and want to use fts3.
As mentioned in http://www.sqlite.org/fts3.html tutorial FTS table has to be created for using this search functionality.
Is there any way to convert existing table to FTS table?
I think the solution is to populate the FTS virtual table by yourself. I mean to open a new thread which will read from the exist database then write to the FTS table.
Actually, I might find a better way, hope you are still watching this thread:
Please check this thread:
SQLite create pre-populated FTS table
where the selected answer gave a better approach:
first do CREATE VIRTUAL TABLE in your exist database,
then populate the virtual table using the original table within your database.
Sorry for my English.
There is database on SQL Server 2005 Enterprise. I wrote program which splits all tables on fileGroups by datetime. But the problem is that database schema is not designed for it and most information stays on the PRIMARY filegroup.
Please tell me how I can spread (split) tables onto two or more database servers for increased performance?
Are you looking for the syntax on how to move a table from one file group to another? See ALTER TABLE
ALTER TABLE dbo.MyTable
MOVE TO MyNewFileGroup
It sounds to me like you need to look into MS SQL Server's partitioning capabilities. You should not be doing this manually. Let the database solve that issue for you.
I currently have a SQL Server 2008 database in which I am planning to separate out some tables to other databases. I want to be able to replace all references to the separated tables from the original database using views. Is there a better way (other than manually changing all FK and SProc references) to switch all the dependencies to reference the view instead of the table?
Usually the best course is to rename the tables and then name the view what the table used to be named.
You can try using sp_rename to change the name of the tables. I don't know if this will change your references also.
I plan on updating some table names by create a synonym of the old name and renaming the table to what I want it to be. Can replication properly reference a synonym?
Also as a side question, is there an easy way to see if a specific table is actually being replicated? (via a query perhaps)
I don't think so. Replication works by reading the log and there are no log records generated for a synonym. As to your question about finding out which tables are replicated, a query on sysarticles in the table should get you where you want to go. HTH.