|
Hi,
We have two different production environments, in literally two different locations physically, with the same table layouts. For purposes of data warehouse, the two environments.
I want to copy over data from server 1 to server 2. The table has only 4000 rows. The date format of this data is of the form
2013-10-01 10:28:35.560 . so, i worry if I try to export this data into excel from server 1 and try to import this data back into server 2's table if I would lose any of the information.
What would be the best way to copy over the table?
Thanks so much!
|
|
|
|
|
Is this a one time or daily.
If daily think about replication.
Can the two systems talk to each other? If you must export to a table one option would be .CSV which would not loose the data like Excel will.
|
|
|
|
|
it is a one time deal only.
And the two systems don't talk to each other.
Thanks!!
|
|
|
|
|
|
The environments don't talk to each other - the servers are physically located in different states.
And if i export to excel, I am worried about losing some of the data, as I have specified above.
Thanks.
|
|
|
|
|
vkEmerson wrote: The environments don't talk to each other - the servers are physically located in different states. Which is why I suggested the Export/Import Wizard.
vkEmerson wrote: And if i export to excel, I am worried about losing some of the data, as I have specified above. Why do you want to use Excel? And if you are storing dates and times in your database as strings you are heasding for trouble.
Veni, vidi, abiit domum
|
|
|
|
|
vkEmerson wrote: What would be the best way to copy over the table? Create a backup of the database on server A.
Restore the backup on server B under a new name. Do a "SELECT INTO" from the new database into the target-table.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You will be surprised at to how many restrictions smaller size companies have
The database size is huge, and no FTP services set up. Not allowed. If I try to copy the file from production server, with a simple copy and paste onto my server, it takes for ever and sometimes just disconnects. And to top this, we cannot do many things on the production server, since they don't want to slow down the website it feeds to
|
|
|
|
|
How about reversing the process first? On the source server, create a new empty database and use SELECT INTO to copy just the table(s) you want. Back up the (much smaller) database, copy the backup to the destination server, restore, and SELECT INTO the destination table.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
vkEmerson wrote: You will be surprised at to how many restrictions smaller size companies have If the restriction makes the request technically impossible, it's usually the restriction that's changed - not the request.
vkEmerson wrote: If I try to copy the file from production server, with a simple copy and paste onto my server How about writing your own BITS client[^]?
vkEmerson wrote: they don't want to slow down the website it feeds to Then why are they allowing copy/paste? One will "have to" write files on the server if the server is to be updated
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Save the .mdf and .ldf from the origin, and then ATTACH them to the target. No connections. No interface required. Other than the ATTACH script. See BOL for ATTACH details. While there, see other methods.
|
|
|
|
|
you can directly use DTS package. I Ensures you not to lose data.
Mani Prabhakar
|
|
|
|
|
you can Save the .mdf and .ldf from the origin, and then ATTACH them to the target
|
|
|
|
|
i have two tables a and b.a has 7 different columns and b has 20 different columns. i want to insert rows from a to b.how to insert.
so plz provide solution
|
|
|
|
|
Read records from table a and insert them into table b, adding the detail for the extra columns.
Veni, vidi, abiit domum
|
|
|
|
|
Here is a sample. have done this using SQL Server but it shouldn't be hard to move it too one of the other databases
create table #tableOne
(
id int,
name varchar(50),
email varchar(100)
)
create table #tableNames
(
id int,
name varchar(50)
)
insert into #tableOne values (1, 'simon','simon@email.com')
insert into #tableOne values (2, 'someone','someone@email.com')
insert into #tableNames values (3, 'fred')
insert into #tableOne
select id, name,''
from #tablenames
select *
from #tableOne
drop table #tableNames
drop table #tableOne
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Are they any non null-able columns in table b ?
IF they are non null-able columns then follow below code
INSERT INTO b(<<Column_Names>>)
SELECT <<Column_Names>> from a [where <<Condition(if any)>>]
Mani Prabhakar
|
|
|
|
|
INSERT INTO b
(field list b)
SELECT
field list a
FROM
a
|
|
|
|
|
Specify Columns Of Table B.
Like
Insert Into B (Col1,Col2,Col3)
Select Col9,Col8,Col7 From A.
Please Note That Data Type of Column Should Be Same.
|
|
|
|
|
how to use fuzzy object oriented database sql?
have to install any other software behind SQL Management Server 2008 ?
this is the query :
Select t.*, t.muAge('mid')asMu_Age, t.muHeight('tall')asMu_Height, t.muWeight('heavy')asMu_Weight, CalcTreshold(&wAge,&tAge,&wHeight, &tHeight,&wWeight,&tWeight) asTre From TBLPersons t Where ((((t.muAge('mid')*&wAge)+ (t.muHeight('tall')*&wHeight)+ (t.muWeight('heavy')*&wWeight) ) / (&wAge+&wHeight+&wWeight) )
>= calctre (&wAge,&tAge,&wHeight, &tHeight,&wWeight,&tWeight ) )
modified 8-Oct-13 3:52am.
|
|
|
|
|
jojoba20 wrote: how to use fuzzy object oriented database sql? Ask the vendor; the people that supply the "fuzzy object oriented database" software should know how to install it.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i dont known any one.
I wanna to get help from Code Project world!
I dont known that does need to install any application or ...
Thanks in advanced!
|
|
|
|
|
jojoba20 wrote: i dont known any one. Then how did you deduce that it must be a fuzzy object-oriented query? Where did you find this code?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
for my collage !
my sir asked me to do that !
and also he doesnt help any!
|
|
|
|