Link to home
Start Free TrialLog in
Avatar of atorex
atorex

asked on

SQL 2008 SSIS import

I have a database server with some hardware issues where I cant do a full backup or a log backup, I do have a backup from a couple days back restored on a new server. The troubled server can be queried with no issues so I would like to setup an SSIS job to import all the data from 11/25 to present.
Is this possible and how would I be able to do this.


any help would be appreciated.

Regards,
Atorex
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

I have a database server with some hardware issues where I cant do a full backup or a log backup
Why not? What's the error?

The troubled server can be queried with no issues so I would like to setup an SSIS job to import all the data from 11/25 to present.
Did you try to backup to a network share?
Avatar of atorex
atorex

ASKER

There is a hardware issue preventing a backup, I went that route as it would be the best option, the Array housing the MDF had a failed drive but with this IBM controller sometimes a drive failure causes damage to stripe on the array so I can query data after the failure and have a backup for anything before the failure, this backup has been restored on a second server but I need to pull the remaining data so I can then recreate the Array without loosing data as the only fix for the array is its destruction and recreation.


Regards,
Atorex
So you're facing storage issues. If that then an export may not work depending if you're reading from the bad sectors or not.
Btw, why do you only need data from 11/25 on?

I wrote an article about using the Copy Database Wizard for migrating a MSSQL database. In that article I presented the option of detach and attach method but for you, you should use SMO method (it will take some time depending on the size of your database).
Avatar of atorex

ASKER

the failure was on 11/25 I can query any data after that day, what we had was a hard drive failure we called the vendor to get it replaced and after it was replaced I found out the the array had stripe errors, I have dropped one table on the restored database from the 24th and SSIS's the data from the damaged database and got all the data I need, so this is way I wanted to see if I could get a query/script to use with SSIS that would select data newer than the 25th and import that on to the restored database, this would provide me with the data I need and have a fully functional database, this database is currently at 700GB but I only need like 5 days of data from all tables.
1. restore the last backup you have on Server B. (New Server).

2. Create a linked server between your current server and the new server.

3. Get data for last 5 days from each table using select and insert the same on the other server using linked server. Here basically you have to create a script with your conditions.

4. You are done.

Hope it helps !!
Avatar of atorex

ASKER

thats what I'm trying to do, how would I be able to do a select from DB1 and insert in to DB2, I lack the query skills for that!!!!
ASKER CERTIFIED SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did you try the copy database wizard?
Avatar of atorex

ASKER

Vitor, I have actually done the copy database in the past and it works well, the issue I found with this database is where the stripe is bad I cant read that portion of the database so it errors out like when I attempt to do a backup.
There are IO errors during the copy due to stripe failure on the Array, this is why I was looking for an SSIS option as I have tested the SSIS migration and it worked well, here is what I did.

I restored the last backup on server B and (since I dont have a script to copy data from date a to date b in to the B database) what I did to test is I dropped a staging table on server B and then import the data from Server A using SSIS, this worked perfectly.

SSIS gives the option to script what you want to copy from source to destination server, I'm just a SYS Admin and dont have know how to write this query I'm stuck I know this process will work for what I want but I lack the query skills.

Regards,
Atorex
I'm stuck I know this process will work for what I want but I lack the query skills.
What for you need a query? Don't you want to import all table? Or it's only a set of data?
Atorex, a feedback will be appreciated.
Cheers