I have two databases DB1 and DB2
With Tables T11,T12 and T21, T22 respectively.
All the tables in the two databases have the same structure.
I need help on a script to clear the contents of Table T21 and T22 in the DB2 database
And load the contents of Table T11 and T12 ( Table have about 2 Million records of data ) into T21 and T22.
Ok say we've got two databases with two tables and we need to transfer data from one to another. However, the data structure in sourceDB is different to targetDB. Better to illustrate: sourceDB tablesource PIN SYSTEM HEADER PROPERTY VALUE STATUS 1000 AF ADDRESS DETAILS LINE 1 The Grange Active 1000 AF ADDRESS DETAILS LINE 2 69 Tintagel Way 1000 AF ADDRESS DETAILS LINE 3 Woking 1001 AF ADDRESS DETAILS LINE 1 50 Active 8888 AF ADDRESS DETAILS LINE 2 Evans Way 8888 AF ADDRESS DETAILS LINE 3 Islington 8888 AF ADDRESS DETAILS 8888 AF ADDRESS DETAILS 8888 AF ADDRESS DETAILS
Now each matching PIN on the multiple rows in sourceDB above relates to one customer. In order to extract the relevant info for an address for instance for each customer, we need to know the unique PIN, header, property and value fields.
So I created this piece of SQL which gives me the result in targetDB:
INSERT into targetDB.dbo.tabletarget (address1) SELECT value FROM sourceDB.dbo.tablesource WHERE pin = 1000 AND header ='address details' AND property = 'line 1'
targetDB tabletarget PIN ADDRESS1 ADDRESS2 ADDRESS3 SOURCE The Grange
Fine, I've proved I can extract a specific field, but I need to do this for all fields and all customers.
When executing an inline insert into command from isqw/w the command executes perfectly. Yet when I try to create a stored procedure with exactly the same insert into statement it will not create. It does not like the database.owner.table prefix on the selected rows. Any suggestions ??
Hello everyone, Here's my situation... I'm running a web service which involves 51 seperate servers and databases. There are fifty licensee servers (One for each US state) and one corporate server. Each night I need to upload sales and membership data from the licensee's databases to the corporate database to compile reports. The application platform I'm using is ASP.NET 2.0 and the the database is SQL2005 express. I want this process to be run automatically, so I believe it's a scheduled windows service I need to setup up in .NET to make the data transfers. If anyone has already set something up like this, or knows the steps to take? I would love to have your input. Thanks in advance, Robert
Hi, I have several databases on one MSQL Server which I want to transfer to new server. So, basically it is tranferring all contents of sql server databases on one server to another one. I know I can use import Wizard, but it will take long time, is there a more better way to do this.
I would like to make multiples copies of a database. What I used to do in MS-SQL 6.5 was create a backup of the database that I want to make copy from. Create new (empty) databases and restored the backed up database into the new databases. Another way that I used to do is to use the Database Transfer feature in the Enterprise Manager.
I want to do the same thing in MS-SQL 7 (beta 3) but it seems to me that I couldn't do that. First, there is no Database Transfer feature like that in 6.5. Next, I couldn't restore a backed up database to another database.
I know there is the Import/Export utility but it is the last thing I have to use if I don't have any other choice.
I got 2 SQL servers. One is legacy SQL 6.5 and the other one is SQL 2005. They are installed in different machine. How can I copy or migrate the old 6.5 version databases to SQL 2005 server?
Someone said I should upgrade the 6.5 to version 2000 first. Is it the only method? I didn't have SQL 2000 install cdrom and license. How can I do that?
Is it possible/advisable when transfering very large amounts of data from server to server to: trasnfer the data to a new table first second alter new table adding indexes, defaults, ets based on original table
if it is what flow item would be used to transfer/alter the indexes and defaults?
I'm very new to ssis so the more detail you can give the better.
Hi, In SQL Server 2005 Express I currently have 2 databases which I€™m working on, my problem is I want to transfer a table from one of the databases to the other but don't know how to go about achieving this? I want the table structure and all the info held within the table transferred across. Any ideas are welcome.
In the full recovery model, if i run a transaction that inserts 10MB of data into a table, then 10 MB of data is moved in the data file. Does this mean then that the log file will grow by exactly 10MB as well?
I understand that all transactions are logged to the log file to enable rollback and point in time recovery, but what is actually physically stored in the log file for this transactions record? Is it the text of the command from the transaction or the actual physical data from that transaction?
I ask because say if I have two drives, one with 5MB/s write speed for the log file and one with 10MB/s write speed for the data file, if I start trying to insert 10 MB of data per second into the table, am I going to be limited to 5MB/s by the log file drive, or is SQL server not going to try and log all 10 MB each second to the log file?
My vendor requires data to be sent in Excel format. Some of my tables have rows over 65,536 so I need to use Excel 2007 (Max of 1,048,576). Right now my data sits in SQL 2000. I am using MS SQL Enterprise Manager 8.0 to prepare the data. Is there some kind of add on or selection I am missing to use DTS to export from SQL to Excel 2007?Thanks in advance.
I have two database(MYDB1 , MYDB2) on two different server's(SERVER1 , SERVER2) . I want to create an store procedure in MYDB1 on SERVER1 and get some data from a table of MYDB2 on SERVER2. How can i do this?
I have an excel sheet that contain colummns as in a table in a sql database i want to transfer this data from the sheet to the table frombusiness logic code layer not from the enterprise manager by wizardwhat can i do?? ...please urgent
I have created a SSIS package that transfer data from a Foxpro database to an instance of SQL Server 2005 Express. I used the wizard to create the package but I load and execute the package within a custom application that I have written in C#.
The way the custom application is intended to work is that the user can have the database in any location on the computer and all he has to do is specify the location then the application programatically changes the location of the source on the package that it has loaded and then execute it. When I initially run the package the first time (using the original path), it works fine and transfers the data. However, every subsequent time I run the application and specify a different path, the database on the SQL Server side gets created as expected but the data is not transfered!
Where am I going wrong? Do I need to save the package after I modify the source then reload and run it again or do i need to change something else in the Data Flow to make this work?
I am newbie to MDS of SQL,want to know how we can transfer tables from two different SQL Databases to MDS.Suggest me the steps to proceed with any examples.
I have a SSIS project where I am transferring data from DB2 table to SQL Server table. There is a column called REC_ID which I need to encrypt before we store it in SQL Server. Now, SQL Server has buildin encryption functionality and we need to use that as there are views that will decrypt this column and give data to authenticated users.
So, the question is, is there anyway that I can encrypt the column data in my SSIS package using my target SQL server database key and using SQL server encryptbykey function while transferring?
Hi everyone,I need some help transfering my database(SQL2005) to the host's server.In SQL 2000 I had the Management tools > DTS or ImportExport tools.SQL2005 lacks this, all I've got is Express Manager > can't connect to multiple databases.Can connect to one database and has a screen to excute TSQL commands.I don't want to have to recreate the whole database on the server.....This would be crazy... 150 stored procedures and 30 tables. Not to mention all the individual settings for each column.I know there is SQL Studio Management tools for the full version of SQL 2005. Anyone got any idea's ?Any input/suggestions is greatly appreciated.Thanks,JShep
can any body can tell how data trnsfer from oracle database to sql server database. what is the methods i can use? is it required to write scripts. if scripts required, can anybody can give me sample scipt.
SQL v7.0 - DTS Tying to transfer all object info, sp's, constraints and data in to a fresh new database in the same instance, but it's hit and miss when it comes to getting everything transferred. Followed step by step instructions (GUI/Scripts) and sometimes the table structure will transfer without PK's, as well as some data and if you're lucky, some constraints. Stored proc's have a tendency to show up 20 minutes later. I'm testing this on a machine with IE 5, SP2 and fresh new Dll's (just in case something was corrupted). Is there a priority as far as what to transfer first? For example, tables only 1st, then constraints on down to records parent to child? I am assumming you should be able to transfer all at the same time since it's built in to the utility. Or, does it come down to something in the schema? If anyone out there has experienced something similar and found a solution, please advise.
hi, I am having two servers one is 6.5 and another is 7.0. I would like to export a one database from 6.5 to 7.0. when i was trying to transfer the data it is saying u have to upgrade the server of 6.5. pls tell me how i have to transfer data from 65 to 7.0 without bcp.
Hi, here we have 5 servers,application server,datawarehousing server,web server,QA server and production server. so i suppose to transfer(by using DTS) the total data(GDWReports) from production server to QA server. so actually i exported that data from production server to one destination by using export wizard and i tried for import that data to qa server by using VB script.but i got one error that "login failed like that". so how to import the data. pl give the suggestions asap. thanx Janreddy
I would like to ask about the Data transfer . I have huge data in Access database and want to transfer in the MS SQL Server 2000. Can some body help me how i can do it. Thanks
I would like to transfer data from an SQL Server 2000(standard edition) on a server located outside of the department TO a laptop/notebook using MSDE located within the department. This will be 1 or 2 times a year of transfering the data from a server to a laptop. So what are some ways or the best ways of transferring data?
We are working with a Mexican developer to share data between our English database (SQL 2005) and his Spanish database (SQL 2000). We are thinking the best way to gain access to his data (since our website will need data from both databases) is to have them Export data from their Spanish tables into English tables within their database and replicate those tables to our database several times a day. Does this seem like a good idea - any suggestions for a better way to share the data? Thanks
I have a table in a database that has just over 1 million records, eachrecord about 50-60 characters. I need to transfer this data to anotherdatabase. I implemented two options:1) Read the data record by record and insert into the destinationdatabase, using ODBC. I played with different commit intervals, up to100,000. This version takes about 12 minutes. Having indexes on thedestination table or removing them made little difference.2) Dump the data into a flat file, and use bulk copy to read the fileinto the destination table. This takes less than a minute.Are these results within the normal ranges? I am particularlyinterested in a way to improve upon the first method.
hi,My problem is I am creating a new database. I need to all the tablesand procedures fromone databse to another database in sql server 2000, both in sameserver.Kalaivanan.
Hi,We have a unique situation here that is puzzling me. I have a programthat uploads data to our SQL Server. The program runs fine on WIndows95. I have installed it on a Windows 2000 machine and it will connectto our data but will not upload. It processes the file but the datadoes not appear in the database.I have checked the ODBC setup and everything is the same except I usedsqlsvr32.dll instead of sqlsrvr.dll for the 32 bit driver.I know this isn't a lot of information to go on, but the program waswritten by a contractor who has since been replaced and I don't reallyhave an idea of even where to begin checking.Any suggestions would be appreciated.Thank you,
Not certain whether this is the right forum to post this question - please advise.
I am fairly new to SQL Server and need to know the best way to transfer data from one data base to another.
For example:
I have a database running via SQL Server 2005 developer edition and another running using SQL Server 2005 Express edition.
If I do a backup on the developer edition I get an error and failure when attempting to upload the data on to the Express edition.
What am I doing wrong can anyone advise?
Also what is the best way to add/remove/update stored procedures and or change the database table structures for a current database (MySql for example allows one to type command line calls direct to the relevant database to alter database tables).