Database Automated Part-archiving

Apr 16, 2007

Hi all,
i am a student doing my final year project and i have the duty to develop a automated part-archiving for our MsSql Server 2000 Database, but its not so simple :eek: .

the environment:
- MsSql Server 2000
- Suns App-Server Glasfish
- Java (J2EE)
- Hibernate

the requirements:
1.)
Some tables should be synchronized and redundant (the same data in both databases)

2.)
If the maindatabase is changing the schema the archivedatabse must do the same changes.

3.)
The datas in some tables (the ones that aren't synchronized) which are older then 2 Years should be moving (copy, paste) to the archivedatabase every 24 hours.

4.)
If there are is a access for a data which are not in the maindatabase, it is necassary to get it from the archivedatabase.


I don't find a way to realise this ...
can some one give me a hint?

... Sorry for my bad english, i hope i explained my problem good enough.

Thanks for ur answers

View 10 Replies


ADVERTISEMENT

I Have A Database On A Network Drive That I Use For Archiving Purposes, But When The Server Is Rebooted The Database Becomes Suspect.

Mar 31, 2007

I created the db with the attached script and I am able to access ituntil I reboot the server. I've tried enabling flag 1807 via the SQLserver service and the startup parameters of the instance. In allcases the database always come up suspect after a reboot. There wasone instance where I was able to recover, but I am not sure how thathappened.Does anyone have an idea of how I can reboot the server without thedatabase becomming suspect?USE MASTERGODBCC TRACEON(1807)GO--DBCC TRACEOFF(1807)--DBCC TRACESTATUS(1807)GOCREATE DATABASE ReadyNAS ON( NAME = ReadyNAS_Data,FILENAME = '\NAS1NASDiskSQL ServerReadyNASReadyNAS_Data.mdf',SIZE = 100MB,MAXSIZE = 20GB,FILEGROWTH = 20MB)LOG ON ( NAME = ReadyNAS_Log,FILENAME = '\NAS1NASDiskSQL ServerReadyNASReadyNAS_Log.ldf',SIZE = 20MB,MAXSIZE = 100MB,FILEGROWTH = 10MB)

View 5 Replies View Related

Archiving Database

Jan 22, 2008

Hi,

Actually i have done a program (vb.net) to archive the database.

Due to some policy issues, i not allow putting the EXE file into the database server.

So, i only can using the SQL Agent.

My question is:
(1) Since i already prepare set of program (vb.net), how can I put into the sql agent?

(2) I found some articles, SSIS can be done. How to do it?

How you all have a clear guide for me.

Thanks anyway.

View 5 Replies View Related

Managed Procedure To Automate Archiving Files In A Database

Sep 3, 2007

I need to archive files in a database by checking an archive date for the file contained in a field in a table of a database, if the archive date  is greater than todays date then archive the file by moving it to an archive folder.  I am thinking the best way might be to use a manged stored procedure, but I also need to run this procedure once every 24 hours at about midnight so how would I do thi? Another way might be by using DTS or something. Has someone else done this and how did they go about it?

View 1 Replies View Related

Automated Database Copy

Jan 16, 2008

I have a database (actually several of them) on a production server. I want to be able to create an automatic process so every evening the production database is copied to a different server that runs staging sites.

I know that this is possible through database mirroring, but I don't want the database to be constantly mirrored. I would prefer to have a script that ran every night that just make an exact copy over to the staging server.

Is there any way to automate this, possibly through the copy database wizard? Does anyone have any good suggestions as to how I can make this work? If not, does anyone know of a good straight forward article on database mirroring that will get me started quick?

Thanks.


http://www.dynamicajax.com

View 5 Replies View Related

Restore Database Via Automated Order

Jul 20, 2005

Hi folks,I got a script which restores a database. It works fineif it is running in my Query Analyzer.It fails when I put this script in an automated schedule using theSQL agent.This is my scriptRESTORE DATABASE [RestoreTest]FROM DISK = N'E:sqlbakRestoreTest.BAK'WITH FILE = 1, NOUNLOAD , STATS = 10, RECOVERYand this is the error message from the scheduler (Sorry its in German)Executing as User dbo. Exclusiv access to database not possiblebecauseit is in use (which is not).. Rest may be clear ;-))Ausführt als Benutzer: dbo. Exklusiver Zugriff auf die Datenbank istnicht möglich, da die Datenbank gerade verwendet wird. [SQLSTATE42000] (Fehler 3101) RESTORE DATABASE wird fehlerbedingt beendet.[SQLSTATE 42000] (Fehler 3013). Fehler bei SchrittDo you have any suggestion to me ?

View 5 Replies View Related

Need To Create Custom Function For Enterting Automated Database Records

May 12, 2007

Hi All,I need help in creating a function in VB for my ASP.NET application where I want to add records to database on the first day of every month.I have got no idea about what I have to do for achieving this goal.Its basically for a customer based application where Interest will be paid into customers' account and I need to implement this for every customer on 1st day of every monthThe thing I am not sure about is how can I get the application to add a record for each customer on the first day of each month, i.e. how can I get the application to check that its 1st day of month and then the application adds records automatically for each customer based on my specified rules.If any of you could help me with this, I'll really appreciate it.Thank you.

View 5 Replies View Related

SQL 2012 :: Possible To Send Pivot Query Results As Automated Database Email?

Nov 26, 2014

possible to send Pivot query results as automated database email ?

View 3 Replies View Related

How To Automated Send Email To Inform The Status Number Of Data In Database Using Stored Procedures?

Feb 23, 2008

Hi ,

I'm just new in this SQL 2005, and I do not reallly sure the subject is right or not but as example in this link below

http://msdn2.microsoft.com/en-us/library/ms190307.aspx

I want updated to few of person of any changes in database just by sending to their emails in every 2 hours as an example. I go through the example given but I do not know the step how to run stored procedures. The Information that I want to give to them is like as:

Date From : 23/02/2008
Date To: 24/02/2008
Number of user : 3

My draft table is like this

Sequence_No Submitted_Dt Name
-------------------- ------------------- ------------------------


1 2/21/2008 4:16:45 PM John
2 2/22/2008 4:16:45 PM Dean
3 2/23/2008 4:16:45 PM Rick
4 2/24/2008 4:16:45 PM Van


thanks to all of your corcern to help me

Regards;

View 13 Replies View Related

Weekly Update Part Of Database With Data From Original Database

Mar 26, 2008

Hi!

I have an original database that I want to copy once to another database. Then I want to update the data weekly with the data of the original database. I don€™t change any tables or columns in that part of the database. Just some tables more in the €˜new€™ database (than the tables from the original database) with some references to the tables that have to be updated weekly.
How can I do this? (if you know what I mean... it's a sort of a datawarehouse where different sources come together.. that part that represents the original database is just a part of the datawarehouse. That part is exactly the same structure as the original database.)

Thanks,

Sandra

View 1 Replies View Related

Web Part Deserialization Error When Trying To Change Report Viewer Web Part Programmatically.

Oct 29, 2007



I have SSRS 2005 SP2 configured to work in Sharepoint integration. Everything works fine except that I am not able to programmatically change any property of report viewer web part (instance) that I have added on on home page of my sharepoint site.
I can do same thing via sharepoint UI but not through program. When my programs runs it fetches all web parts been added on home page, then I need to iterate through each one and find report viewer web part.
While iterating, as soon as I arrive to report viewer web part it is named as "Error web part" with error message as
"Windows SharePoint Services cannot deserialize the Web Part. Check the format of the properties and try again"

If someone has a solution, please respond at your earlist.

Thanks

Shankar

View 1 Replies View Related

Split A Decimal Number Into The Integer Part And The Fraction Part

Dec 7, 2007

I have a table with a column named measurement decimal(18,1).  If the value is 2.0, I want the stored proc to return 2 but if the value is 2.5 I want the stored proc to return  2.5.  So if the value after the decimal point is 0, I only want the stored proc to return the integer portion.  Is there a sql function that I can use to determine what the fraction part of the decimal value is?  In c#, I can use
dr["measurement "].ToString().Split(".".ToCharArray())[1] to see what the value after the decimal is.

View 3 Replies View Related

SQL 2012 :: Function With 2nd Part Working On Results 1st Part

Jan 28, 2015

I have made the following Scalar-valued function:

CREATE FUNCTION [dbo].[TimeCalc]
(
@OriginalTime AS INTEGER
, @TenthsOrHundredths AS INTEGER -- code 2: 1/10, code 4: 1/100
)
RETURNS NVARCHAR(8)

[Code] ....

What it does is convert numbers to times

E.g.: 81230 gets divided by 10 (times in seconds: 8123). This 1 1 full minute, and the remainder = 2123 making it 1.21.23 mins)

So far so good (function works perfectly)

My question: sometimes times are in 1/100 (like above sample), sometimes in 1/10.

This means that, e.g. with a time like 3.23.40 the last zero must be deleted.

My thoughts are to use the results from the Return Case part, and as the code = 4: leave it as it is,

is the code 2 the use LEFT(... result Return Case ..., Len(..result Return Case.. - 1))

There are 5 codes: 0 1 2 3 and 4

View 9 Replies View Related

Display First Part Of Data In Database

Mar 28, 2008

I have a tabe in my sql server 2005 database which contains a long description and I want to display the first 100 charactors  on my web page but not sure how to do this I can only display the whole description. I'm not sure if I need to write the query to the database so it only brings the first 100 charactors back or query the whole description and then take the first 100 charactors in asp.net and display that can any one help

View 3 Replies View Related

How To Run 'create Database' As Part Of A Script?

May 26, 2008

I'm trying to write a script can be run in two iterations on a system, based on the existence of a database. The first iteration will create the database if it doesn't exist, the second will create tables and content. However I'm unable to script this properly as 'create database' seems to break any loop I add it into since it apparently can not run in a transaction. I'm obviously missing something really fundamental here, does anyone have any idea how to make this work?


USE [MASTER]
IF NOT EXISTS(select 1 from [master]..[sysdatabases] where name='testdatabase')
BEGIN
CREATE DATABASE [testdatabase]
END
ELSE
BEGIN
CREATE TABLE [testdatabase].[dbo].[testtable](
[Id] [int] NOT NULL
)
END

View 2 Replies View Related

Can't Delete Database That Has Been Part Of Replication

Feb 7, 2007

I had a publication (merge) setup for a database. Deleted the publication and tried to delete the database. Sql server says it can't be deleted because it's has replication setup. Bug??

View 1 Replies View Related

How To Export Part Of A Database To A New Database Through Asp.net

Aug 27, 2006

Hello,I want to connect to an SQL Server Database called MyDBTest, through an asp.net web form, select particular columns from particular tables, and then export these tables (with the selected columns only) to another SQL Server database called MyDBTest1 Is it possible?Thank you in advance! :)

View 7 Replies View Related

Recovery :: Mirror Of A Database Part Of AlwaysOn AG

Sep 14, 2015

We have an AG scenario where we are using WFC on a 2 node cluster. We are then using AG for mirroring the databases to both nodes and have a listener.

What I want to do next is to establish another copy of the database at a remote location. But I don't want to add the 3rd system to the WFC. I am not a big fan of WFC and I have seen it causes many more problems. The 3rd system will be in a remote location and the network not 100% reliable. I have seen in the past that it causes the entire cluster to hang and causing my production to crash which I don't want.

I there a way to add a 3rd node to the mirror configuration. I don't know if I can add a 3rd node to the AG unless it is part of the same cluster.

I know I can configure log shipping, I am fine with it but in the source, I have no control of which node the DB will be. I am not sure if a log shipping scenario can be configured using the listener instead of the physical host.

View 3 Replies View Related

Multi-part Identifier Could Not Be Bound With The Master Database

May 12, 2008

Using
- SQL Server 2005
- Management Studio Express.

Here's the SQL statement





Code Snippet

SELECT TOP 1000

[test].[CatalogStudioId],

[test].[CollectionId],

[test].[unique],

[test].[att1]


FROM CatalogStudioEntity.dbo.[test]
WHERE [test].[att1] LIKE '%1%'

Now, before you respond, allow me to say that I know using the table name to qualify the columns is redundant, and I know there are other options (such as aliasing the table). Don't respond to tell me this. However -- as far as I know -- this is a valid T-SQL statement and I should be able to get this query to run.

The interesting part is that if management studio is connected to the CatalogStudioEntity database, this query runs fine. If connected to the master database, I get the "multi-part identifier [x] could not be bound" error. The error is listed for every column.

My issue with this is that the table in the FROM clause is qualified with the database name, so whether I'm connected to that database or to "master" should not matter.

I have an application that generates select statements like the one above, and all of the machines so far that we've developed, beta tested and deployed this application on all don't have this problem. It's this one specific installation of SQL Server 2005 on this new machine where this problem arises.

Before I go back and retool the application to output whatever arbitrary syntax this specific machine seems to want, I want to try and troubleshoot and understand why it's acting like this.

Any ideas or thoughts would be greatly appreciated.

View 3 Replies View Related

Applying DBCC DBREINDEX On A Database That Is Part Of Transaction Replication

Mar 4, 2007

I am about to apply DBCC DBREINDEX to a large database that is part of transactional replication and synchronised every 3 minutes. What are the likely implication and what precautions I must take.





Thanks in advance

Regards

R Suresh

View 1 Replies View Related

How To Packaging A SQL Server Database For Installation As Part Of A Custom Application

Sep 30, 2005

Hi all,             How to package sql server database as part of our custom application (VB application) using install shield or any software.   That setup should detect the presence of sql server. If sql server is not present in the client machine, then our set up should install the sql server and deploy our database.   If sql server is present in the client machine, then our set up should install our database alone. How to do that. Please help me.   Regards, S.Sevugan.

View 1 Replies View Related

Archiving

Feb 17, 2007

Hi All,
I'm building an archiving applicaition for my small organization, but I have many file types such as videos, photos, texts, pdfs.... and some huge file sizes of about 500 MB.
My questions are:
1. Somefriend told me that there is a hardware compression device which can compress allready compressed videos and JPEGs. Is it correct? If so, where can I surf to find such devices?
2. Which datatype have I to use with SQL Server 2000 to handle all the different file types and sizes?

Thanks very much
Haytham

View 3 Replies View Related

SQL Server Admin 2014 :: Setup Database Part Of Data Center?

Apr 8, 2015

My company is migrating all their servers to a new data center and I get to specify what we need for the db servers.

We've got a 22 prod servers (mainly physical) with a couple of TB of data on sql 2000 to 2012.

We expect to move to sql2014, and consolidate and virtualise where ever possible.

But I'd like start with specifying an overall architecture for this: some Best Practices to guide the build at a server and an installation level

View 1 Replies View Related

Integration Services :: Convert Access Database As Part Of SSIS Package

May 15, 2015

I need to convert an access 2000 database to access 2013 and then load the data into a sql server 2012 database. Thus any urls (links) that will show me how to accomplish the following in an SSIS package:

1. Convert an access 2000 database to access 2013 database?
2. Load the converted Access 2013 database into sql server 2012?

View 2 Replies View Related

Archiving Table

Feb 14, 2002

Hi,

We have a table of size greater than 200GB, so all the SQL is very slow.

Is there any way of doing table partition, If so How?

Is there any better way of archiving a portion of table used currently which can be restored later when is required, If so How ?

Thanks
John Jayaseelan

View 5 Replies View Related

Archiving Data

Aug 2, 2000

Hi everyone!

My problem is, that i don#t know how i can archive the data. That means to documentate when, who, etc. changed the data (in a seperate table).
I tried to solve it with different triggers.

Thanks in advance,

Maria.

View 1 Replies View Related

Data Archiving

Oct 6, 2004

Hi ,

I need to archive my production database to a new Server.....

Is it possible to move data using INSERT INTO ServerName.DBName.dbo.TableName from the current Database Server!!!

Do I need to create a linked server to do this....or shoud I go for DTS..

Thanks
Cheriyan.

View 1 Replies View Related

Data Archiving

Jan 11, 2007

What's the best archiving procedures? :)

SlayerS_`BoxeR` + [ReD]NaDa

View 2 Replies View Related

Importing And Archiving

Jul 23, 2005

I was wondering how i could use dts to import accessfiles and then archivethem to another folder. I've read some examples on sqldts.com but i stillcan't figure it out.Basically this is what i want:- import an accessfile which has a name like this <companyname>_<today'sdate>.mdb. The importfolder is called in my case d:import- for updating some fields, the dts should use the company's name from theaccessfile and check that with a lookuptable to translate the name into aint value.- after some processing, the dts should place the file to another folder. Inmy case it is d:archiveIf someone can help me with this, i would be very greatful.------------------------------------------------------This mailbox protected from junk email by MailFrontier Desktopfrom MailFrontier, Inc. http://info.mailfrontier.com

View 2 Replies View Related

Partitioning Archiving

Feb 21, 2007

Hello,

I have current events going to a log, and I'm implementing partitioning it into weeks using the following function...

CREATE PARTITION FUNCTION [trackPointLogWeekPF](int)
AS RANGE LEFT FOR VALUES (7, 14, 21, 28)

and in the table create I add an extra field of day number to pass to the function...
[intPartitionDayNum] AS (datepart(day,[dtTrackPointTime]))

So if that's all for the current month, is it possible to have monthly partitions for the older data so that I could drop off a month from a year ago for example or would I need to keep it weekly?



Thanks for any help.

View 1 Replies View Related

Archiving Is Not Reducing DB Size

Jan 10, 2005

I created few jobs that would archive the production DB and delete the archived data...
but it looks like the DB size is not reducing!!! Some times it looks like the size has increased!!

I think this is because of the log file size has increaded by the DELETE operations....But what can I do for this???

Please Help!!

View 1 Replies View Related

Moving Records For Archiving

May 18, 2004

I've got two tables, one is an archive of the second (tables are identical). I'd like to migrate records from one to the other (as in, move, insert into one while deleting from the other).

I know I can start a transaction, do an INSERT INTO...SELECT, followed by a DELETE, check rows affected, then closing with a commit transaction (or rollback if the counts don't match), but it seems as though I might be over thinking it. Is this considered the optimal approach?

View 10 Replies View Related

Monthly Archiving Of Tables?

Mar 27, 2014

The Database will hold 2 tables. One of those includes dates. They are joint by a constraint using an ID. What i got to do is, store the tables in a different schema named after the month the data was created. I will have to keep the original tables aktive because this should work while accessing the tables but can flush the data to keep the database small. So i would end up with 2 tables in 1 schema for every month and the productive that keeps track of the current bookings.

I would have access to the enterprise edition if that changes anything at all.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved