GamersRoost

removing all TRYK items form Database with a select statement

9 posts in this topic

I have stopped using TRYK and would like for all the items in the database to be removed that start with TRYK_.

Can someone suggest how to do this ? (I used the search and cannot find anything).

Thanks,

Josh

Share this post


Link to post
Share on other sites

always make a backup.

Make a backup.

Did I mention you should make a backup?

 

This sql query will delete any row that contains TRYK, (aka resetting any player that has tryk gear)

DELETE FROM exile.player WHERE EXISTS (SELECT TRYK* FROM exile.player);

DELETE FROM exile.container WHERE EXISTS (SELECT TRYK* FROM exile.container);

DELETE FROM exile.vehicle WHERE EXISTS (SELECT TRYK* FROM exile.vehicle);

 

Now, that would work, but then any player/container/ect that had tryk in it is gone, and thats no good. An alternative is to replace the "DELETE FROM" with SELECT, you can then manually go through the data removing any tryk related stuff.

-Or-

So since you made a backup, make a copy of the backup, then open that copy in notepad ++, use find and replace to replace any strings of "TRYK_*", with nothing.

Now, notepad ++ isn't smart enough to see if the last item in a list was tryk, so you will have to manually go over the data and make sure there isn't a comma at the end of our now "tryk free" data. Once the data looks good, turnicate the database (delete all data within) and then import this modified backup that doesn't have any tryk in it.  (if your a linux kind of guy, sed would also work for find and replace)

2 people like this

Share this post


Link to post
Share on other sites
Advertisement

Once you remove the addon from launch parameters and bikeys they will all delete themselves at least it did for me.

Share this post


Link to post
Share on other sites
21 hours ago, prue420 said:

Once you remove the addon from launch parameters and bikeys they will all delete themselves at least it did for me.

Not from the database they won't.

On 19/03/2016 at 3:14 PM, GamersRoost said:

I have stopped using TRYK and would like for all the items in the database to be removed that start with TRYK_.

Can someone suggest how to do this ? (I used the search and cannot find anything).

Thanks,

Josh

We tried to do this, a couple of ways when we removed TRYK.

We did it via scripting in Arma with a forEach to remove all items with Tryk class names - no luck(crashes server)

Deleting from the database all ways left loads in there.

Would suggest trying Wasti's solution and if not - just drop your database and start again - that way you can be sure they're not there and spamming your RPT.

1 person likes this

Share this post


Link to post
Share on other sites
20 hours ago, wasti said:

always make a backup.

Make a backup.

Did I mention you should make a backup?

 

This sql query will delete any row that contains TRYK, (aka resetting any player that has tryk gear)

DELETE FROM exile.player WHERE EXISTS (SELECT TRYK* FROM exile.player);

DELETE FROM exile.container WHERE EXISTS (SELECT TRYK* FROM exile.container);

DELETE FROM exile.vehicle WHERE EXISTS (SELECT TRYK* FROM exile.vehicle);

 

Now, that would work, but then any player/container/ect that had tryk in it is gone, and thats no good. An alternative is to replace the "DELETE FROM" with SELECT, you can then manually go through the data removing any tryk related stuff.

-Or-

So since you made a backup, make a copy of the backup, then open that copy in notepad ++, use find and replace to replace any strings of "TRYK_*", with nothing.

Now, notepad ++ isn't smart enough to see if the last item in a list was tryk, so you will have to manually go over the data and make sure there isn't a comma at the end of our now "tryk free" data. Once the data looks good, turnicate the database (delete all data within) and then import this modified backup that doesn't have any tryk in it.  (if your a linux kind of guy, sed would also work for find and replace)

Epic, I will do this.

Thanks for the reply and taking your time man. I appreciate the confirmation of the select.

The NP++ is also an awesome thought. I'm not sure why i didn't think of that!

 

Share this post


Link to post
Share on other sites
5 hours ago, Taylor Swift said:

Not from the database they won't.

We tried to do this, a couple of ways when we removed TRYK.

We did it via scripting in Arma with a forEach and all the tryk call names - no luck(crashes server)

Deleting from the database all ways left loads in there.

Would suggest trying Wasti's solution and if not - just drop your database and start again - that way you can be sure they're not there and spamming your RPT.

I left the @Tryk so i did not get errors. I just removed them from the loot and from the traders.

Shame about Tryk - since i removed it, i have not had one single crash yet. Thanks for posting about this Taylor.

BTW, thanks for also posting the swimsuit pics on your Twitter FINALLY... and i agree the paparazzi should not make money off that body , I'm just sayin...... haha

 

1 person likes this

Share this post


Link to post
Share on other sites
20 hours ago, wasti said:

always make a backup.

Make a backup.

Did I mention you should make a backup?

 

I use SSH on Windows Server. I have a backup every 15 minutes over a 48 hour window automatically.

I love how you start the reply though. Everyone should take heed to this!

1 person likes this

Share this post


Link to post
Share on other sites

Nice to see you got everything all sorted!

Out of curiosity which of Watsi's methods did you use?

Share this post


Link to post
Share on other sites

Hey Zisb,

I tired the select statements and there was an error with the syntax. My fault I'm sure. I ended up using the NP++ method, combined with a few macros in NP++.

Since i exported a backup (3 actually for testing) - I will be looking at the syntax and get that right as well. I would rather have the server do as is expected than manually do an edit and "hack" it in. Still learning the MY part of SQL. Not much different just some different statements so far.

Thanks for the follow up. The NP++ worked fine. I am now Tryk free (to most players dismay). The full screen NVG's were nice :).

Josh

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.