Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 26.02.2006, 02:53   #1
Megatronpt
Архивный участник
 
Join Date: Jan 2006
Posts: 584
Default SQL - Importing data from older DB.

Hey!

I had some problems today with a renegade..

He used a lot of other players accounts and stripped all chars.

Unfortunately if I rollback people will kill me.. so the only thing I can do is update the dbo.user_item.

I had done it once like this:

[php:1:d862c98d03]
declare
@char_id int,
@item_type int,
@amount int,
@enchant int,
@eroded int,
@bless int,
@ident int,
@wished int,
@warehouse int

select @char_id = char_id from lin2world2.dbo.user_item where item_id = '119173'
select @item_type=item_type from lin2world2.dbo.user_item where item_id = '119173'
select @amount=amount from lin2world2.dbo.user_item where item_id = '119173'
select @enchant=enchant from lin2world2.dbo.user_item where item_id = '119173'
select @eroded=eroded from lin2world2.dbo.user_item where item_id = '119173'
select @bless=bless from lin2world2.dbo.user_item where item_id = '119173'
select @ident=ident from lin2world2.dbo.user_item where item_id = '119173'
select @wished=wished from lin2world2.dbo.user_item where item_id = '119173'
select @warehouse=warehouse from lin2world2.dbo.user_item where item_id = '119173'

update lin2world.dbo.user_item
set char_id = @char_id,
item_type = @item_type,
amount = @amount,
enchant = @enchant,
eroded = @eroded,
bless = @bless,
ident = @ident,
wished = @wished,
warehouse = @warehouse
where item_id = '119173'; [/php:1:d862c98d03]

But this time it is for various accounts and too many chars...

THere has to be an easier way to do this.. can anyone please enlighten me?

THanks in advance!
Megatronpt is offline  
Old 26.02.2006, 15:50   #2
hr
Архивный участник
 
Join Date: Jun 2005
Posts: 285
Default

if you have "Full" (by default) recovery model on lin2world you can try to rollback some transactions with Lumigent Log Explorer. Or check CacheD logs and manually return items.
hr is offline  
Old 27.02.2006, 01:20   #3
Megatronpt
Архивный участник
 
Join Date: Jan 2006
Posts: 584
Default

Thanks... I just have to figure out how.

I'm a noob at this.
Megatronpt is offline  
Old 28.02.2006, 03:43   #4
Megatronpt
Архивный участник
 
Join Date: Jan 2006
Posts: 584
Default

I had an idea.. but I can't make it work.. I'm a noob at SQL..

The main Idea was creating an array where it would be loaded the row that contains a certain item_id according to the char_id(on bck database lin2world2) I was looking for.. then load it into the those I have in that script and update lin2word(running database).

Can anyone give me a hand with this, please?

Thanks in advance.
Megatronpt is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:26.