How to partition existing database? - sql-server

I have a big database about 4.5Tb. Is it possible to partition it and move the half of it to another raid?
Thanks Arman.
PS.
I use Windows Server 2008 Standard with Microsoft SQL Server 2008.

You can set up multiple secondary files with in enterprise manager, if you machine can see multiple logical disks you can provide storage space on a number of disks
See
Understanding Files and Filegroups MS-SQL
Using Files and Filegroups MS-SQL
Once you have created filegroups you can assign tables to specific filegroups. File groups can be made up of files from different disks(or different RAID clusters). So you can spread your database and individual tables over multiple logical disk.
As this question is tagged with Sql-server I am assuming we are talking about Microsoft SQL Server.
Some more reading
Resources for Database Sharding and Partitioning
Sharding
Partitioning
Data Dependent Routing

Related

One-Way Replication Into Different Schema

I'm looking for the best (best practice) option for one way replication between two databases. I would like to keep this purely SQL but, can write something in C# or use an ETL tool if there are no other good options.
Current setup:
DB1 - There are three instances of this database. It is a large relational database, the schema is the same for each but, they are separate data pots (no replication). Two databases on a 2012 server and one on a 2014 server
DB2 - There are two instances of this database on seperate servers (Europe, Americas) and the data is merge replicated between the two. The publisher is the 2014 server.
The Goal:
DB2 is tied to some reports. It has one table and a small application attached to that table. Users from many different countries enter data via a small application into DB2 and generate reports out of the application.
DB1 is a relational database that has a very large application on top of it but with fewer users. If users are using the application for DB1 then they should not need to duplicate their records into DB2.
There should be one-way replication from the multiple seperate DB1s into DB2. How quickly this happens is not too important.
The important things are:
No backwards replication occurs from DB2s > DB1s (Data only flows from DB1s into one of the DB2s)
Create, Update, and Delete actions should occur in DB2 based on the results
of a comparisson with DB1 (the one way replication)
Current Approach:
I currently have a flat sql view on each DB1 database that has the same schema as the table in the DB2 db's that the data needs to go into.
The servers are also joined as linked servers.
My though was to do a sort of manually written replication script on one of the DB2 databases that calls the views from the DB1s and does the CUD actions on a timed basis.
It seems to me that there should be an easier way though!?
Any thoughts on how to do this would be very much appreciated.
Keep in mind that since several of the DB1s exist on a SQL 2012 server that there may be some issues as 2012 might not be allowed to be a publisher for replication to a 2014 server.

Migrate Oracle partitioned tables to SQL Server

I need to migrate about 700 Oracle partitioned tables (RANGE and LIST partitioning) to SQL Server.
Turns out the SSMA (SQL Server Migration Assistant) does not handle Oracle partitioned tables (this is the official answer I got from Microsoft).
Any tool / script / other suggestion to automate this process?
Thanks!
They are correct:
Tried to do this for a project last year for work and found out the same thing:
Tried doing a little research on google to see if things have changed but found out the following:
Migration of Oracle Partitioned Tables is not supported by SSMA. Partitioned tables are migrated as a Non-partitioned simple tables.
Partitioning of the these Tables in SQL server is required to be done manually as per the physical database architecture planning and logical drives of the server system.
Any partition maintenance (adding or dropping or truncating the partitions) related code need to be re-rewritten in SQL Server."

Usage of Database, schemas and tablespace

we are working on data migration of sql server 2000 to Oracle 11g. Sql server has 4 databases which has to be migrated. These 4 databases are used for 6 different standalone applications. Oracle is installed in Unix server. Can we create a single database and different schemas for each sql server database or do I need to create multiple databases or can I use single database, single schema and multiple tablespaces or any other procedure to maintain the performance?
You can create multiple Oracle databases. Or you can create a single database with multiple schemas. Or you can create a single database with a single schema an put everything there if all your object names are unique.
The most similar approach would generally be to create a single Oracle database with four schemas. That gives you four separate namespaces in case you have objects in two different SQL Server databases that have the same name. And a single Oracle database per server generally gives the best performance since you're not allocating multiple SGAs and PGAs in memory or running multiple sets of background processes.
Tablespaces in Oracle are a completely separate concept. They have nothing to do with namespaces or permissions. They simply allow you to determine which objects reside in which physical data files. Barring something extremely unusual, tablespaces have nothing to do with performance. You could have the objects in all four schemas use a single tablespace. Or you could create four separate tablespaces. Or you could create multiple tablespaces that each have objects from different schemas. My guess is that the simplest approach is to create one tablespace per schema so that you can manage each application's disk space allocation separately.

SQL Server tables replication

Is it possible to replicate 2 SQL Servers on table level? (I want to replicate only few tables, not all DB). Both SQL Servers work on different physical servers and should synchronize a few tables.
If it is possible, how to avoid conflicts?
Thanks!
Yes you can use MERGE Replication provided both source and destination table names should be same.I guess transactional replication might support if table names are different.

Best way to migrate export/import from SQL Server to oracle

I'm faced with needing access for reporting to some data that lives in Oracle and other data that lives in a SQL Server 2000 database. For various reasons these live on different sides of a firewall. Now we're looking at doing an export/import from sql server to oracle and I'd like some advice on the best way to go about it... The procedure will need to be fully automated and run nightly, so that excludes using the SQL developer tools. I also can't make a live link between databases from our (oracle) side as the firewall is in the way. The data needs to be transformed in the process from a star schema to a de-normalised table ready for reporting.
What I'm thinking about is writing a monster query for SQL Server (which I mostly have already) that will denormalise and read out the data from SQL Server into a flat file using the sql server equivalent of sqlplus as a scheduled task, dump into a Well Known Location, then on the oracle side have a cron job that copies down the file and loads it with sql loader and rebuilds indexes etc.
This is all doable, but very manual. Is there one or a combination of FOSS or standard oracle/SQL Server tools that could automate this for me? the Irreducible complexity is the query on one side and building indexes on the other, but I would love to not have to write the CSV dumping detail or the SQL loader script, just say dump this view out to CSV on one side, and on the other truncate and insert into this table from CSV and not worry about mapping column names and all other arcane sqlldr voodoo...
best practices? thoughts? comments?
edit: I have about 50+ columns all of varying types and lengths in my dataset, which is why I'd prefer to not have to write out how to generate and map each single column...
"The data needs to be transformed in the process from a star schema to a de-normalised table ready for reporting."
You are really looking for an ETL tool. If you have no money in the till, I suggest you check out the Open Source Talend and Pentaho offerings.

Resources