DATA STRUCTURE MIGRATION
Apr 23, 2008Hi
Can Any one help me out of this in my project I have to migrate only datastructure or schema and not the data inside the table using SSIS. How can I do that ?
Hi
Can Any one help me out of this in my project I have to migrate only datastructure or schema and not the data inside the table using SSIS. How can I do that ?
I am currently in the process of migrating data from Sybase to Sql server and would like to know how to test the data migrated.
As of now, we took one table data from both source and destination and compared it in Excel to check if the data migrated looks good (note, we used SSIS to migrate data). However, I would like to check if there are any other best & easy ways to apprach data validation post migration.
I have a cluster hosting multiple GP databases and a second for my data-warehouse I am playing around with (personal project).
I have scripts that pull data from all the DB's to input into the DW's tables(Customers,Reps,Hub....)
An example of my branch script :
select interidas BranchID,
cmpnynamas BranchDesc,
address1as BranchAddressLine1,
address2as BranchAddressLine2,
address3as BranchAddressLine3,
zipcodeas PostalCode
from dynamics..SY01500
Where interid in ('comp1', 'comp2', 'comp4', 'comp5')
what would be the best way to using these scripts pull the data to my testDW and not have duplicate data issues?
I was thinking of using a staging DB on the GP cluster and then building an import data package to run nightly. the issue i had was how do i avoid duplicate data ?
I am trying to migrate our Portals database from SQL2000 to SQL2005, but I received "SQL Type Variant Data" error during the data migration with some database. Can anyone help me with this?
Thanks,
Jay
Ok, I haven't been doing too much database work lately and my brain has gonesoft.I need some help with proper structure.My database is being used to track television shows.Any given show will be associated with at least one production company (callit ProdCo) but possibly up to 3 production companies (never more than that).I have:tblNetworkNetID (numeric, Identity)NetName (char, 50)tblShowDataBookingNum (numeric, Identity)BookingNumExt (numeric, Identity)Now, if I was just dealing with one ProdCo I would add it tblShowData as aforeign key from tblNetwork; no problem.How do I structure it so that I can combine 1 to 3 ProdCo's as one referencein tblShowData.I tried:tblNetworkComboID (numeric, Identity)Net1Net2Net3The problem is, obviously I can only join the FK from tblNetworks to one ofthe NetX fields in tblNetworkCombo.I don't quite know where to go from here. Any help would be appreciated.
View 3 Replies View Relatedi have a database on one server that I want to duplicate on a new server. I do not want to copy the data only the structure.
I created some SQL scripts from the current db as I have read that is what I should do.
My question is where do I use this script on my new server to create the new tables etc..
Do i use the import feature. Where do I run my sql script?
thanks
Are there any known problems with replicating structure changes (New table, etc...), as well as data in MSSQL Server 7.0?
View 2 Replies View RelatedHello E'body,
I have to export a SQL Server Table (Structure+Data) to an access mdb file at run time. How can i do it? please help.
Lax.
I have a database (MSSQL). To demonstrate the problem let me show a fictive Tablestructure. I don't want to discuss about how to save the data differntly, because the structure is fix and I can't change it.To get this result I would do a sql query with a lot of joins like that:
SELECT firstname, lastname, email.value, phone.value
FROM Customer
INNER JOIN
(
SELECT Customer_Properties.id, Customer_Properties.value
FROM Customer_Properties
[code]...
I don't think that this is really performant and the SQL-Queries get very complicated. Give it a other methode for that? I can't change the data structure.
I have a SQL 2005 database that I am using with a website. This basic website will be sold to other companies and ran on their servers with different URLs. Since, All of these databases will store different data, I'm not sure how I can make updates to original database and replicate those structure changes to the other DBs without changing the data also. Is there a way to automate the replication of structural DB changes without replicating the data along with it?
Thanks,
Kirk
I have data in tables with the constraints turn on.
I would like to remove all the data from the tables and add new data, and also reset the
identity back to 1, without dropping the constraints.
Any suggestions??
If I used truncate table, I would have to remove the primary key.
If I remove the primary key I would loss my constraints.
Thanks in advance,
Vic
Dear All,
I'm having to manage data migration from a proprietary db system to an in-house designed sql server db.
Is there anyone out there who dealt with this and used software or services of companies specialising in this?
All ideas are welcome, thanks in advance!
Hi
We are in the process of migrating Data from SQL SERVER 2000 to
Oracle 9i.
Can anyone let me know what are the steps that needs to be followed
in achieving the same.
If there's any specific documentation also available , please let me know
Any pointers would be of great help.
Thanks
Shankar Gokule
I have 2 Tables
Table 1 has
Id
Type
Table 2 has
Id
Type
PartNumber
I need to migrate data from Table 1 to Table 2 based on Type.
Type can be 1 or 2.
Example of Source.
Table 1 has
Id Type
1 1
2 1
3 1
3 2
Table 2 should have 2 records for each Id and based on the Type have different Part Numbers. Part numbers will be the same if in the Source table I had just one record with type 1 and if I had 2 records with type 1 and 2 - Part number will be different.
Example of Destination.
Id Type PartNumber
1 1 10
1 2 10
2 1 11
2 2 11
3 1 12
3 2 13
================================
As you see above
1. I need to duplicate records which had just one type in the Source table.
1 1 10
1 2 10
I will have 2 (1 and 2) types now, but everything else the same for the same id.
In my case I will have Part Numbers as guid. I would create them on my own. They will be the same here.
2. I need to have 2 records as it was before in Source table for id's with 2 types, but with different Part Numbers.
3 1 12
3 2 13
In my case I will have Part Numbers as guid. I would create them on my own.They will be different here.
How do I create 2 records for each Id and certain rules for them? How do I find if there is one or there are two records in Source and how do I apply my rules in looping through records? What control in SSIS tool can I use?
Thanks.
We have SQL Enterprise Manager (8.0). Is there any way to Copy a Table from one database to another with only the Structure (design) - not all the Data?
I can't find any option in the Import Data Wizard that only copies the Table structure.
Any help is appreciated. Thanks
I have written 5 content-management systems and am getting a little bored writing a lot of the same functionality and tweaking it for different datamodels. Is there a way within .NET to have visibility of a database's structure (ie, data type, column names, foreign keys etc)? I'd like to write up a dynamically generated form for any given table, displaying appropriate form controls based on data type and foreign keys.
View 7 Replies View Relatednew to SQL Server 2000. We have an obsolete database that we need to
save off for x number of years. DB2 has utilities (DB2Look/Export)
that allows for the export of the data along with a schema and script
that enables the future recreation of the structure of the databases
and tables to include RI etc. You can save off the architecture and
relationships of the tables as well as the data.
Does SQL Server have anything similar?
Failing that, our plan is to backup the data and logs then image the entire disk.
Thanks in advance.
Gerry
I have a table that looks like this:
ID Type
123 Phone
123 Meeting
123 Phone
and I would like the data to look like this
ID phone Meeting
123 2 1
How do I do this?
Hi all!I have an application that needs to copy the database structure fromone database to another without using the "Generate SQL Script"function in Enterprise Manager. I'd like to do this from within astored procedure. Can someone recommend the best approach for this?I've seen references to using SQL-DMO from a stored procedure using thesp_OA* procs in other postings to this group but was wondering if therewas an easier way? Can I use bcp and then use xp_cmdshell from withinmy stored procedure? It's not clear to me from the documentationwhether bcp copies both structure and data or just data? Is there abetter way?Thanks in advance for any help!Karen
View 1 Replies View RelatedHi SQL gurus,I have a table structure question. I will have a table 'Models' thathas one to many 'incomes' and one to many 'costs'. These 2 entitieshave exactly the same structure, which is 7 smallmoney and a name. Isit better to create a table 'Incomes' and a table 'Costs', with boththe same number of fields like this :Incomes-------------in_idmodelin_1in_2in_3in_4in_5in_6in_7in_nameCosts-------------c_idmodelc_1c_2c_3c_4c_5c_6c_7c_nameor is it better to create one single table that will contain bothentities like that :Incomes_Costs-------------ic_idmodelic_1ic_2ic_3ic_4ic_5ic_6ic_7ic_nameic_isIncomewhich only differs from the 2 above by the isIncome field to know whichrow is an income and which row is a cost.I'd like to know which method is the best in terms of performance andgeneral structure and would greatly appreciate if you explain a littlethe reasons that drove you to suggest me a method over the other.Thanks all for your time!ibiza
View 4 Replies View RelatedHi guys,
Hopefully this is the right place to ask.
Basically we have have two larges databases, one of which is updated from the other monthly.
For exaplination purposes:
DB1 = Source DB
DB2 = Destination DB
The problem that I require a soltion to is, how do I insert rows from a table in DB1 to DB2 and recover and store the identity of the new row against the ID of the existing row. This is so that I can then matain constraints when it comes to inserting rows into the next table and the next and so on.
This process of storing the ID's as lookups will need to be done for almost every table of which there are 20.
The best Idea we have at the minute is to create a table with two colums for each table (drop it and recreate it after each table has exported) that contains the two ID's, new and old.
This will require using a cursor for each row in the existing table, inserting it in the new table and the using @@Scope_Identity to get the new ID and then insert the two values into the temp table.
This too me feels like it will be very slow, particuarly when I bear in mind how much data we have.
Does anyone have any better ideas? (Sorry if the explaination isn't great, its difficult to get accross)
Thanks
Ed
I have been working on my windows app, using SQL Server 2005 (& C#) but I now have loads of junk data, so I want to copy the structure without any data to a new set of files that can become the production version.
I assume I can use backup and restore in future when I want a copy of my production data to use for future testing.
How would I take just one table from my test database and add it to my production database without retyping the design?
Apart from the size limitation is there any advantage in buying a version of SQL Server over using the Express edition?
I'm looking to create a new version of a database but with completely reloaded data - so I want to retain the database structure but none of the data.
Is there an easy way (read: without a DBA on staff) to copy an existing database structure - preferably with views and stored procedures - and not take the data along for the ride?
Thanks in advance for suggestions...!
Has anyone used DTS packages for migrating old data to a new schema?
If so are there any tutorials on this?
I'd prefer not to do this by hand. ;-)
Hello,
I need a sql server 7 script that will migrate data from
my DEV dbase ON THE ALPHA SERVER to my WEB dbase ON THE BETA SERVER in a WINDOWS 2000 network. The data desired is for the field rig_id for rig number 0018. The shell of both dbases are similar.
The table is called rig. An snapshot is below:
DBASE name - DEV
TABLE name - rig
customer rig_id amount
Williams 0011 328
Borsha 0013 256
Kaila 0018 411
Yoida 0021 347
The rig table also exists on the WEB dbase. However, the Kaila data
for rig_id number 0018 needs to be added to the WEB dbase's rig table.
The Williams, Borsha, and Yoida data already exists on both tables.
I need to perform this migration w/ a TRANSACT-SQL stored procedure.
Thanks Very Much IN Advance,
Dave
gunnardl@yahoo.om
Hello All ~
I have to migrate a database from 6.5 to 7.0 server. We don't have an upgrade wizard to i will have to do a turn around like :
> Scripting the objects
> Running the scripts in 7.0
> BCP out the data into 7.0.
But the problem lies here ! how do i BCP the whole database table data in one shot ? bcos i have a lot of tables in the database and i cannot afford to do a table at a time. If anyone has any script which creates pl do pass it on to me.
Hello Everyone,
Does anyone have experience in migrating data (not structure) from an Oracle 7.x database to a new schema built on SQL 6.5? Especially using third party migration tools, for example Data Junction 6.5?
I would be interested in seeing any materials you can provide or advise as I start down this path.
Thanks in advance,
Troy
Hi all,
I'm working on the data migration section of my project at the moment. The customer I'm working for has an existing system of storing client information in an Excel file. Now, I want to move all this information into SQL Server so my new webapp can access the information. The problem is, for the client details, I used an ID system. For example, each piece of client information can be selected from a list. In the client table, this is stored as an ID. Then I have a ReferenceItem table where the IDs are mapped to descriptions. So my Client table has numbers in it, that map to descriptions in a different table.
Now, the existing Excel files have the descriptions, not IDs. What I need to do is to write some kind of script that will automatically go through the table created after I imported the Excel file, check each description and find it's ID and replace that description with the ID.
Now, I don't even know where to start on this one so if anyone has any pointers, could they please let me know?
Thanks
Eoin
Please find the script for migration. Here I have attached two supporting documents. One is database diagram and the Excel sheet itself
USE [COONEW]
GO
/****** Object: StoredProcedure [dbo].[GetScheduledData] Script Date: 14/02/2014 10:35:29 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[GetScheduledData]
[Code] ....
Table A
200 Rows, each row: X, has a unique value. Has 2 extra columns: C1 and D1.
Table B
4000 Rows, each row: Z, has a value that corresponds to Table A's unique values. Has 2 extra columns: C2 and D2.
What I am looking to do is update all 4000 rows in Table B to match the data set in Table A. C1 -> C2, D1 -> D2 following the criteria that X = Z.
All the update attempts I've made so far only update 200 rows within Table B.
Thank you for your help.
Hi guys,
I just moved to SQL 2005 and am facing a difficulty trying to build a DTS Package using SSIS Projects. I need to migrate data from an old Database design to a new Database design in my local pc.
Can anyone provide me some guidelines or tutorials on which components to use and a flow of the entire process which I should follow? I am confused.
Thanks alot in advance, hope to hear from you guys soon.
Hello,
This is my first project with SSIS and I'm having some problems migrating our current data import to it. Generally: right now we're pulling hourly data (which has a timestamp on it) in from a customer's db(which can't be modified, and is big and growing quickly) into our db. To do this we have been using a field to keep track of the last data download time (in our db) and then using that then when querying the customer's db to reduce the number of rows returned.
Will a similar system work in SSIS? I'm having trouble pulling the last download date out of the "target" database and using it in the query on the customer's db. Any advice on what I should be looking into to do this and am I headed in the right direction or just not thinking about this in a SSIS way?
How powerful/common are variables in SSIS and should I be trying to use them here?
Thanks,
Jeff
Hi all,
Hope your team will help me to resolve my problem.
I am working in a data migration project and need information on this work. I am having Multiple source database and my documents are stored in the ftp servers with the file path in my source database table.
I need to migrate these documents to my Destination FTP Servers , Migrate all the records to the destination database.
The source database are sybase(one) and SQL Server 2005(two)
Please provide me some links and your valuable comments to resolve this problem. To achieve this we have to use SSIS.
But i need more information to provide a clear picture in approach document.
What are the prerequisites to be analyzed for this migration work??
Please help me regarding this. Its really urgent for me!!
Regards,
Venkatesan Prabu . J