Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, April 24, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Administration Forums - Database Administration
Forum to discuss SQL Server or Oracle database administration related to SalesLogix databases. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Database Administration | New ThreadView:  Search:  
 Author  Thread: Dont You Wish Management would get Facts right before issuing Instructions !!!!!!!!!!!!!!!
Steve Dyson
Posts: 5
 
Dont You Wish Management would get Facts right before issuing Instructions !!!!!!!!!!!!!!!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 May 06 2:17 AM
fiogf49gjkf0d
Hi Guys, This is my first post here and i know the title sounds strange but bear with me its a goody.

i was instructed to purge all records from the SLX Database which contained the status of Delete, Duplicate - Delete and Dead Account.

Being a dutiful Admin i backed up the database from the night before copied it to a safe location so it does not get messed with (just in case, as i have found that when i do these things management come back and say " we didnt mean to get rid of that data can we have it back")

this time they have decided that the dead accounts actually need to be back in the database because we need to try and bring them back on board again.

By the way I am running SLX Version 5.2 with Service Pack 5 and SQL server 2000

So i started work on bringing them them back, and worked out that the accounts are stored in the Hey guess what the Accounts table, so i ran the SQL query

INSERT INTO sysdba.ACCOUNTS
SELECT *
FROM SLXTest2.sysdba.ACCOUNTS
WHERE STATUS='Dead ACCOUNTS'

And hey presto 2867 records were put back in the Database and when i log on i can filter on the Status field and bring up all 2867 records with phone numbers and all details BUT

There is no address or notes and history. this is strange because when i look at the ADDRESSID field in the ADDRESS table i find that it is there.

Q1: How do i get them to link back together Or was there a better way to do it Say export from DB2(Backup) and Import Back into DB1.
[Reply][Quote]
Dhany
Posts: 30
 
Re: Dont You Wish Management would get Facts right before issuing Instructions !!!!!!!!!!!!!!!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 May 06 3:27 AM
fiogf49gjkf0d
Just give your management a goodnight kiss..

Seriously though, I don't think you can simply insert to the account table, without inserting the other data assocciated with the account (such as Opportunity, address, contacts, and all the stuff).
Which is why I think the best approach is to
1. backup your current database,
2. restore the database from previous backup (the one you did before deleting the account)
3. Work on the diff between the two database
4. Ask for a raise

Hopefully there won't be a lot off changes.
Any better approach guys ?

Dhany
[Reply][Quote]
Steve Dyson
Posts: 5
 
Re: Dont You Wish Management would get Facts right before issuing Instructions !!!!!!!!!!!!!!!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 May 06 3:28 AM

mirtazapine 15mg

mirtazapine alcohol side effects online
fiogf49gjkf0d
Just a thought, but need help with SQl Statement to do this, But if i have a Backup with all the data i need, and a back up of the latest data, With the records missing. Could i not just update the tables with the New records that have been inserted since the last good backup ??????????


Is this possible and if so what would the satement need to be like as i would need to ignore records that are already in the table and only insert records that are not.



Just a Thought
[Reply][Quote]
Ted Sturr
Posts: 78
 
Re: Dont You Wish Management would get Facts right before issuing Instructions !!!!!!!!!!!!!!!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 May 06 1:19 AM
fiogf49gjkf0d
The way I see it you only have a few options:

1. Restore the database back and tell management that they screwed up and they have to live with the missing data that was input in between the purge and their decision to get it back.

2. Pay a business partner to go through and run some scripts to get your data back - even then they might tell you that you can not get all the missing data back.

3. Try to do what you have already done - but realize you are probably creating new problems. SalesLogix is a relational database and if you do not understand the relationships between the tables you are going to create more problems than you think you are solving. An account table is not independent of other tables. You have the accountsummary, address and other related tables that need to be there or you will end up with a corrupt system.

Ted
[Reply][Quote]
Peter H
Posts: 17
 
Re: Dont You Wish Management would get Facts right before issuing Instructions !!!!!!!!!!!!!!!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 May 06 5:33 PM
fiogf49gjkf0d
The obvious question is "How were the records purged?".

If the Slx Purge was NOT used (& the existance of the address records seems to confirm this), then the solution is to restore the missing records via SQL inserts, provided that the Integrity Checker has not been run and done a cleanup. If the Integrity Checker has been run, then you need to get someone with a lot more knowledge about the SLX database to work with you on it.

If the Slx Purge was used, then it becomes easy to do the restore:
(1) restore the database to some other named Database
(2) Mark a record on the account table where that rrcord no lnger exists in the Live database (use SQL for this)
(3) create a group of the marked records.
(4) use groupcopy to move the marked (once deleted) records back into the Live database.
[Reply][Quote]
Steve Dyson
Posts: 5
 
Re: Dont You Wish Management would get Facts right before issuing Instructions !!!!!!!!!!!!!!!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 06 4:33 AM
fiogf49gjkf0d
Thanks all for your replies.

PETERH

SLX PURGE WAS USED.

Could you please enlighten me a little as i am new to SQL ADMIN.

If i may delve into our database a little bit more, After the PURGE we have only amended records, for instance an account call carewatch would have an activity set for it, this would have been a phonecall with notes against the contact. THERE will not have been any additional contacts added so i guess the Key structure will be intact.

What i think would be easier to do would be to that will COMPARE tables, For instance SLXTest.sysdba.ACCOUNT and SLXTEST2.sysdba.ACCOUNT and UPDATE SLXTEST.sysdba.ACCOUNT where SLXTEST2.sysdba.ACCOUNT MODIFYDATE>='03/05/2006'


I know that i am new to SQL ADMIN but i am aggassed that there is no way of being able to update your test system with updated records for your main database. HOW do you develop your system if you cant Bring accross all the updates that have happend on your system since your last backup.

I would expect that if i have a database backed up and something had changed since there would be a statement that says .
[Reply][Quote]
Peter H
Posts: 17
 
Re: Dont You Wish Management would get Facts right before issuing Instructions !!!!!!!!!!!!!!!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 06 11:34 AM
fiogf49gjkf0d

Source Database=the restored database with the deleted records till intact.
Traget Database=the New database with the deleted records NOT There (remove the ones that youadded back).

I asume that you can handle step 1 (Looks like you have already done it).
Setp 2 is already done, the accounts are marked as "Dead Accounts"
Step 3 was done for the purge - you had to have a group created for the "Dead Accounts". Recreate it if it is not on the SourceDatabase.

BACKUP THE TARGET DATABASE NOW (AGAIN)

In the SalesLogic Program Files area for admin, you should find a program called GroupCopy.
Load It,
Log onto the target database
On the second screen, log onto the source database
Select the Correct group to copy (Dead Accounts)
Check that the title bar has the corect database names and direction of the copy correct.
Push Test
If Happy, Run Live.

Let us know how it went.

Good luck.
[Reply][Quote]
Steve Dyson
Posts: 5
 
Re: Dont You Wish Management would get Facts right before issuing Instructions !!!!!!!!!!!!!!!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 May 06 8:34 AM
fiogf49gjkf0d
PeterH

You are a Superstar, That so far has worked with the back up so i suspect it will work with the master database...

That will teach the damn fools to decide properly


Steve
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 4/24/2024 9:59:36 AM