April 25, 2007 at 4:13 am
April 25, 2007 at 5:01 am
You could use the DTS Import/Export Wizard in Enterprise Manager to copy table data. Right-click on the tablename in the list in EM and choose All Tasks > Export Data. The wizard will then take you through copying.
If you need more info on this or were looking for a T-sql based solution post back.
April 25, 2007 at 5:26 am
Thanks for the answer -
What I am trying to do is basically populate a lookup table data on multiple dbs in differant locations. (With data I have in a table here)
I have a mechanism that runs scripts, which create views, sp etc for reports - I was hoping for a script to move the data in. Obviuosly I could right some code to do this - but would like to generate code if possible for all the multiple records, to stop it being a repetitive task.
So with this in mind I am not sure if the DTS will help?
April 25, 2007 at 5:53 am
With that, I'm not sure DTS is the best way to go...
Can I just check with you to make sure that I understand the situation fully:
You have a single lookup table in one database on one server and you want to copy that from it's location (executing a script on THAT server) to other databases on other servers?
You will possibly need to do this in the future for other table/server combinations?
April 25, 2007 at 6:19 am
Almost -
I want a script to generate the table as I have it here - data too.
That script will then be used on the other dbs in other locations. (Once I have the script this is handled OK by others).
So what I need is the script. But since its many records I don't want to/can't manually do it.
Hope I make myself understood.
Cheers
April 25, 2007 at 6:22 am
April 25, 2007 at 6:35 am
Try this one
http://vyaskn.tripod.com/code/generate_inserts.txt
Credit to Narayana Vyas Kondreddi for the script.
April 25, 2007 at 6:48 am
April 25, 2007 at 7:04 am
Thanks Mr Junkie - thats perfect. Thanks Adrian fro helping clarify the problem.
April 25, 2007 at 7:20 am
I discovered a great took that automate this process
try it out here http://www.dbmaestro.com/download.aspx?id=35
With a cllick of a button you can generate those types of reports.
they will let you use it for free for about a month so you can see it for yourself..
I have been using dbMaestro for about a year and I think it is a real timesavor.
just thought it might help you!
April 25, 2007 at 7:28 am
Thanks here too!!
April 26, 2007 at 9:03 am
Just wanted to plug in the following:
You can also use the SELECT INTO clause in order to create an exact copy of a source table to a target table. This is easy if all databases are on the same server; a little more difficult (requires linked servers or such) if the tables are in different databases.
For example, if the databases are on the same server, you can do:
SELECT * INTO MyNewTableOwner.MyNewTableName
FROM MySourceDB.MySourceTableOwner.MySourceTableName
This will carry over the exact DDL definition from the source table to the target table, including all the data.
Last comment-
Margalit- you may want to identify yourself as the Product Manager for DBMaestro. It is a good sync tool like many others (x-sql.com, free tools from Quest Software, features in VS for DB Pros, red-gate's compare/sync, etc.).
April 26, 2007 at 8:22 pm
>>Margalit- you may want to identify yourself as the Product Manager for DBMaestro.
It DID sound like a shameless plug... now I know why... almost as bad as spam but lower.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 27, 2007 at 4:55 am
"It DID sound like a shameless plug... "
All is fair in love and war... (Francais Edward Smedley)
April 27, 2007 at 5:00 am
Viewing 15 posts - 1 through 15 (of 17 total)
You must be logged in to reply to this topic. Login to reply