I want to store all my loggign exception data in the database. I can log them in file, but with db , added appender attribute in log4net.config , but no success. Can anybody share some advise ? thanks in advance.
this http://logging.apache.org/log4net/release/config-examples.html has provided almost all databases sample config file to store the logging data into the database table. Run scripts for creating the table and add the config file in the project. Be cautious all the parameter name and layout spelling.
I tested for MS SQL, worked for me and will works for any other databse too.
Happy coding
First of all - my VB skills are almost non-existent so any suggestion/ideas should be a little more elaborate if possible. Here is the problem I am facing -
We have linked database tables and queries in Ms Access 2010. Now a copy of the database has been created on a new SQL server. So I want to re-link the tables so that access points to the tables on the new SQL server. Right now, all the tables are corresponding to the database on the old server. Here is what I have tried -
Open XYD_Outreach_Dev.accdb on the network (this is the dev version of access that we use)
Form a new ODBC connection which creates a new_sql_server.dsn file corresponding to the new SQL server (2012)
Go to External Data -> ODBC Database -> Link to the data source by creating......
Link to a table say - tblAbriContacts
This creates a new linked table dbotblAbriContacts
I rename it to tblAbriContacts at which point Access asks me -> table already exists. Do you want to replace it? I click yes and the table gets replaced
I hit the save button, close the application and restart it. The tblAbriContacts is pointing to the old database again
What could be the issue? Please note that I have to do this for all the database, lookup and junction tables.
Do I have to change some connection string which the access points to as soon as it is launched?
If I try the Linked table manager, nothing happens, it says "All selected tables were successfully refreshed". But nothing happens. I guess that's because the tables haven't been moved from the old database. A new copy of everything has been created on the new server.
Please help me out with this. My work is stuck because of this reason.
Can you please check if there is a module or other vba file created and file's on_load event has some code which to assign the connection string for all objects (tables and SPs) and refreshes it every time you restart the application.
If you see the connection string there, you might need to replace it with the new one.
Good Day.
I'm having a funny scenario when when I relocate a ASA database file then data goes missing. I run a PB9 application connecting to a ASA8 database via ODBC. The database contans approx 30 tables. Below are 2 actual scenario's:
I create a db file for a customer. I populate the database (via the app) with specific customer setup data (ABC). I then install the app and database on the customers machine. After a week the customer has added some extra data (XYZ). He then has a problem with something. I ask him to zip up the db file and email it to me. On my side I reinstate his database and find only dataset ABC. XYZ gone. I'm 100% sure I'm not confusing the old and new db files.
Similar scenario as above... except that I relocate his db file remotely via TeamViewer from folder A to folder B on the same machine. Upon reconnection (ODBC) to the relocated db, only data ABC exsits. XYZ is gone.
Both instances the connection to the db is made via default login dba/sql.
Anyone know whats going on or where to look to resolve this?
Thanks and kind regards
Alex
I have oracle DB it is for testing purpose, I have not added any tables. I just want clear all the files like control, redo, archive, date. Ultimately I want fresh db. I know it can done by delete the db and recreate.
I have searched in the internet could not find any relevant information.
Update:
The reason for this requirement is, some of the above mentioned files are corrupted.
Please advice,
Thanks,
Ultimately I want fresh db
Then do the following:
Open DBCA
Select the operation "Delete Database", put the required credentials when asked.
After completion of step 2, go back to first step.
Select the operation "Create Database"
Hey All, I have been working on this problem for a while and the usual google searches are not helping :(
I have a production database in SQL 2000. I want to copy it over the top of a training database to refresh it. I want this to be something that is scheduled to happen once a week to keep the training database up-to-date.
I have a DTS job created for doing this. Within that DTS job I have a single "Copy SQL Server Objects" task. That task is set up to:
Create all copied objects
Drop destination objects first
Copy data
Replace existing data
Copy indexes, triggers, primary and foreign keys
Copy all user tables, views, functions and stored procedures.
When I run this DTS package (in pre-production for testing of course) it gets to 99% done and throws the following error:
Step Error Source: Microsoft SQL-DMO (ODBC SQLState: 42S02)
Step Error Description:[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'dbo.vwEstAssetStationAddress'.
Step Error code: 800400D0
Step Error Help File:SQLDMO80.hlp
Step Error Help Context ID:1131
My searches on the net didn't provide much help. There are reports of these errors getting hit, but none seem to match my circumstances. One suggestion I found was the the sysdepends table had become corrupted, making the DTS job run its scripts in the wrong order. Howeever, I ran the following script to correct that table and it still throws the same error:
USE master
GO
ALTER DATABASE [DATABASE NAME]
SET SINGLE_USER
GO
USE [DATABASE NAME]
GO
DBCC CHECKTABLE('sysdepends',REPAIR_REBUILD )
GO
USE master
GO
ALTER DATABASE [DATABASE NAME]
SET MULTI_USER
GO
I have also seen that having different object owners can cause this error. But I have confirmed that the objects are all owned by the dbo user in this case.
Any suggestions?
I feel stupid, but am posting the answer I just found for posterity (and so all you helpful fellows can stop stressing on my behalf.
Even though I had selected all the user tables, views, stored procedures and user defined functions to copy, I hadn't selected "Include all dependant objects". I had assumed that if you selected two objects to copy, and one was dependant on the other, SQL would always do them in the correct order. Aparrently not. Selecting this little check box made all the difference.
Thanks again to those who helped with suggestions
Somehow the dbo.vwEstAssetStationAddress table is not being found by your DTS package. Unfortunately, the message doesn't say if it was on the source or destination that it couldn't find it.
What are the exact steps, in the order that you have them in your DTS package? I'm assuming that the list of the task items above is not in order. I know this not an answer, but it looks like we are going to need a bit more information to help you further.
Thanks for the response hectorsosajr.
the object aparrently causing the error (dbo.vwEstAssetStationAddress) is a view that references 2 underlying tables. I have tested querying the view, as well as running the SELECT statement that defines it, on both the source and destination databases and it works fine.
The database object copy task in DTS doesn't allow you to specify the order it transfers things in. As far as I understand it, it uses the sysdepends table to determine the requisite order of events.
I was trying to avoid doing it via backup / restore. There are some users of the database that are SQL Server accounts (not Active Directory). This becomes a pain in the but if you need to do it from one server to another as you have to drop those users and recreate them.
Sounds like it is trying to create a stored procedure/view based on a view that doesn't yet exist.
Why not just backup and restore the database under a different name? (if it wasn't production, I would say detach, copy and re-attach). You can do all that under the control of T-SQL.
See if this link helps you find your dependency issue.
I've run another test to try and isolate this. I removed the mentioned view from the destination database totally, then ran the DTS again. It failed with the same error. However, the view that aparrently is an invalid object name was recreated successfully. It seems that the error is coming from something trying to reference that view, but it doesn't actually stop the script when it hits that error.
Cade - I will check out that link. I will also try and establish what is referencing the view and breaking.