We are working on a project to migrate our Oracle database to SQL Server. There are many off the shelf products that seem to do this such as Microsoft SQL Server Migration Assistant & Navicat premium for example.
One of the requirements of this migration is that we are changing the naming convention of the tables & columns as part of the transition.
In Oracle we currently have adopted the naming convention of:
Table: T_USERS, T_REPORTS, T_USERS_REPORTS etc.
Columns: USER_ID, CREATE_DT etc.
While moving to SQL Server we wish to adopt a SQL Server specific naming convention (Camel case):
Table: Users, Reports, UsersReports etc.
Columns: UserId, CreateDt etc.
Both of these tools mentioned seem to only create a SQL Server object with the exact same table & column names as part of the data migration process. Is it possible to create this sort of mapping with either of these two tools? Or is there a better tool available?
Both of these also do not feature incremental data migration. They are designed to completely clean out all records and then migrate all data. This is obviously not ideal for performance. Is there a tool that has a delta type migration where it will compare existing records on both target and source destinations?
Related
I have a lot of views and tables connected in Microsoft SQL Server. I want to check all the useless columns I have in the native tables. Is there a way to perform an automatic check if a column in a table is used or not in other tables?
Create a database diagram in SQL Server Management Studio. From here you can analyze how the tables/columns are related or not. Info here
Do a business model analysis and see which values are used, which are deprecated and start from there.
If you do any changes on the database, these changes have to be projected in any code connecting to that database.
Do not remove columns in tables just by looking at a database diagram. You would destroy any object-relational mapper.
In MS SQL Server 2012/oracle, I need to create something like a.b.c
where c is the table/view name, b is the package name and a is the
schema name.
I wanted to create a table/view in two levels. I couldn't find any
proper document regarding this. Any suggestion to find the good document
will be helpful.
MS SQL Server and Oracle are very different. They're both relational DBs, but different vendors and don't function quite the same. There are similarities though.
At any rate, you don't create tables under a package. A table is an object much like a package is an object. A package is designed to hold a collection of procedures/functions within Oracle. SQL Server doesn't even implement packages.
So, as an Oracle example, the best you're going to get is Database > account (or schema..) > table.
We have a production SQL Server and my desktop has SQL Server 2008 R2 Management Studio software installed. I have recently been given a task to perform data mining on our server DBs.
We have around 100 or more of tables there and it is getting very difficult for me to see how tables are related or has been created.
For a particular scenario I have cornered to 3 tables amongst the 100's that we have - but I cannot formulate how these tables are related with each other. I mean if only I know that one's table column is PK / FK of other then only I can execute something like below to extract data's -
SELECT *
FROM tablea,tableb
WHERE tableb.id = tablea.id
and do data mining on the result data set.
Please let me know how can I get all the tables and it relation details? What tool I can use such that further on information like above can be extracted or database designs can be known?
I tried to create the DB diagram but it showed me below error:
Do I need to install any other tool?
Below is my MS SQL Studio version details:
I think your solution is to use a database diagram (https://msdn.microsoft.com/en-us/library/ms189078.aspx)
Just drag all tables on the screen and it will show you the relations, this of course only when the primary-keys/foreign-keys are there.
For the error you are getting:
if I google that for you I get:
The backend version is not supported to design database diagrams or tables
The answer marked as the solution is:
This is commonly reported as an error due to using the wrong version
of SMSS. Use the version designed for your database version. You can
use select ##version to check which version of sql server you are
actually using
Are there any automation tools to ease creation of tables and adding standard insert/select/update stored procs, rather than doing hand creation for a large number of tables ?
If i have 100 tables to create (and later ALTER) and their associated stored procs in SQL Server 2008, what is the most convenient way to do it ?
ADDED:
Are there tools to auto-generate nice class skeletons (with data fields) tied-up with corresponding tables ?
I am using C# .NET 4.0 in Visual studio 2010 and Microsoft SQL Server 2008.
We are starting off a new project from scratch, so it would be helpful to get tools for quick bootstrap from Design on paper to initial code.
Any other related suggestions are appreciated!
Use SSMS Database Diagrams to design you 100 tables because one only has to type the column name and can point and click for data type, primary key, nullability, foreign key, etc. Create a diagram for each functional grouping. When the design is done you can write a script which will write the SQL for the stored proc to do the insert/update for the tables.
As you create the script to write the script you could post your work here.
I have to migrate data in sqlserver from one table to another. Most of the standalone table were possible with select and insert into sp's.
The issue is in one table from the old database there is a column with a primary key say unit.
Now this unit is divided into two parts in the new database for example 'industry' and 'resource'.i.e industry + resource together constitute the unit.
How can i go about with the migration of this.
I have done similar "Database Transformation" tasks with SQL Server Integration Services it does require that you have SQL Server Standard or Enterprise (not Express) but because it is part of SQL Server there is no additional licencing, if it isn't installed you may need to re-run the installer and select "Integration Services".
SSIS will allow you to create a data flow, aranging the data more or less how you want it. There are several tutorials on MSDN.