Click here to Skip to main content
       

Database

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
QuestionConnection String for Ms access 2010 to Windows 7 64 BitmemberSatyam Tripathi2 Oct '12 - 21:33 
I not have Connection String for Ms access 2010 to Windows 7 64 Bit
there find an error on "provider=Microsoft.Jet.OLEDB.4.0" is
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
AnswerRe: Connection String for Ms access 2010 to Windows 7 64 BitmvpRichard MacCutchan2 Oct '12 - 22:00 
See here[^].
One of these days I'm going to think of a really clever signature.

QuestionBackup/Recover of row data in a multi-Company databasememberDeDawg2 Oct '12 - 10:35 
We have a web application using SQL Server 2008 R2 that contains data for tracking time that another company has expressed interest in using, we initially set up the database such that all end-user tables have a foreign key to what company that row belongs to. Is there a good way to backup/restore the data for a specific company across the tables, such that if the new company says tomorrow that they want their data restored to yesterday; it can be restored without impacting all the other companies data as well? I'm trying to avoid writing some form of stored procedure that selects and then have to do an insert/update/delete to put the data back. Thanks for any insight.
Dennis Daugherty

AnswerRe: Backup/Recover of row data in a multi-Company databasemvpMika Wendelius2 Oct '12 - 11:17 
Could you simply use bcp[^] to 'export' or 'import' the data. For your case, when exporting, you should define a custom query for the bcp to run.
The need to optimize rises from a bad design.My articles[^]

GeneralRe: Backup/Recover of row data in a multi-Company databasememberDeDawg2 Oct '12 - 11:22 
I guess I could if I turned identity insert on and then just delete all for a company and then import ... I'll think on that one ...
GeneralRe: Backup/Recover of row data in a multi-Company databasemvpMika Wendelius2 Oct '12 - 18:22 
Or if you have foreign keys between several tables, you could set the identity insert off to ensure that the keys remain the same as they originally were.
 
Another mechanism you could consider is SSIS where you could break the import/export to proper blocks, define a workflow and if necessary add logic.
The need to optimize rises from a bad design.My articles[^]

AnswerRe: Backup/Recover of row data in a multi-Company databasememberMycroft Holmes3 Oct '12 - 7:39 
Is it possible to supply a separate environment for their needs. Or are they really trying to reset their production environment back to a prior date.
 
We often have a need for a department to want a restore of a previous date for reporting/investigation reasons, this does not need to impact on the production environment as they get another database environment created specifically for their needs.
Never underestimate the power of human stupidity
RAH

GeneralRe: Backup/Recover of row data in a multi-Company databasememberDeDawg3 Oct '12 - 7:43 
This is more for a restore after they do something dumb ... like "I just deleted all the invoices for customer A when I meant B; can you get them back?" My answer would be I can put your data back to 3am last night, you'll loose everything you did today but your invoices will be back.
GeneralRe: Backup/Recover of row data in a multi-Company databasememberMycroft Holmes3 Oct '12 - 8:02 
Ugh, nasty, especially when you mix other clients into the data, I would suggest this could only be fixed by a custom script, charge them a fortune as a lesson and hope like hell you can deliver.
 
I would then implement a logging/audit strategy on the database or separate each client to their own environment. If you screw up another clients data b/c of this issue your whole business case just went out the window!
Never underestimate the power of human stupidity
RAH

Questioncannot find column [modified]membersindhuan1 Oct '12 - 0:19 
Hi
I am trying to execute this query but its giving me an error
 
"Cannot find either column "D" or the user-defined function or aggregate "D.bonus", or the name is ambiguous.
"
Query:
 
MERGE INTO bonuses D
USING bonuses1 E
ON D.employee_id = S.employee_id)
WHEN MATCHED THEN
UPDATE SET
D.bonus = E.bonus
WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)
VALUES ES.employee_id, E.salary*0.1)
WHERE (E.salary <= 8000);


UPDATE bonuses
Set bonus=10000
FROM bonuses D
JOIN cbonuses1 E
ON D.employee_id = S.employee_id)
 
Any idea??

modified 1 Oct '12 - 7:56.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 24 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid