|
Vuyiswa Maseko wrote: C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/IGI/itsabacus/
need more information about it if possible.
|
|
|
|
|
Which info do you need ?
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
i dont know whether your problem is solved or not but just allows remote connections and connect to your remote server , and take backup you can also create jobs/ schedules to do this and database mirroring is also an option , you can also config emails in case of a db backup failure , simple
Best Of Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|
|
thanks a lot, I did that using a job that takes a backup every 1 hour daily.
The problem is that FTP is blocked on the server so I can't transfer the backup file to another server.
Do you have any idea how to do that withour FTP?
thanks in advance
|
|
|
|
|
|
Thanks a lot
|
|
|
|
|
Hello,
I have a database which is being backed up on daily bases.
According to requirement, we need to remove records from database those are older than 30 days. This is working fine. But the problem is we are only able to delete old records from live database. This is to be noted that the same records has been already backed up before deleting.
Now, due to security purpose, we need to remove the same old records from backed up database too.
Restoring all old backups and and then deleting the records will not work as there are total 30 backups which contain the entry for the records to be deleted.
Can you please provide me some suggestions regarding this requirement.
Thanks.
|
|
|
|
|
Lucky123456 wrote: Restoring all old backups and and then deleting the records will not work as there are total 30 backups which contain the entry for the records to be deleted.
Think about this; how can you delete records from a database (or any type of file) without loading that file to disk and accessing it via some sort of software?
|
|
|
|
|
Thanks,
I am googling for any option available.
|
|
|
|
|
Not able to find such method to read/modify a .bak file.
Thinking about any alternate solution.
|
|
|
|
|
C# has no native methods to read/modify the contents of a backup of a database file that I'm aware of.
Restore the database, make the changes, write a new backup, replace the old backup with the new one.
I are Troll
|
|
|
|
|
That is one of the weirdest business models I have EVER heard of (in 20+ years of hearing some really screwy ideas). A backup is NOT a data storage tool it is a RECOVERY tool, deleting data from a backup defeats the purpose of taking a backup. It is a snapshot of the database as at WHEN IT WAS BACKED UP. Expecting a backup to reflect the current data is just wrong.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi.
In MS Access we can set password for a database.
Can we set password for a SQL database(*.mdf)? if so, could you please say How?
Thanks in advance.
modified on Monday, September 28, 2009 11:21 PM
|
|
|
|
|
USE master
Go
EXEC sp_addlogin NewUser, password, dbName
Go
Where NewUser is the User Name, password is the user password, and dbName is the name of the database that you want to add the user to.
Or, if you are using Windows authentication, add users to roles in SSMS.
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
Driven to the arms of Heineken by the wife
|
|
|
|
|
The above method is to add user login to the database.
But the OP is asking to set user id and password to the .MDF file as we can do it for MS Access files.
AFAIK, We cannot set user id and password to the database files(.MDF and .LDF).
|
|
|
|
|
dotnet buddy wrote: AFAIK, We cannot set user id and password to the database files(.MDF and .LDF).
Correct.
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
Driven to the arms of Heineken by the wife
|
|
|
|
|
I am putting together a web site that includes a SQL Server Express 2008 file. I use VWD 2008 Express and SQL Server Management Studio 2008. It is not designated as an Express version. I have a number of tables and have developed a view between two of them. I have a web page where I want to add, edit and delete records from the second table. The first table has two columns- a UID column and a use name column. The second table has a UID column that relates the two tables. The other columns are a Use name column, a DID column a NID column and a NID name column.
Why, when I click on the GridView tasks button and go to configure datasource, accept the connection string, go to the next form and check "specify columns from a table or view" and select K-Use K-UseUseSet, the name of the view I created, and check all the columns- UID, Use, DID, NID and Name, why when I check "advanced" do I find the items "Generate INSERT,UPDATE AND DELETE statements" and "Use optimistic concurrency" shaded out so I can't select them and therefore can't do the Edit and Delete commands in the Gridview?
Yes, I know the GRidView doesn't do adds. I have to use a DetailsView.
What am I missing?
Try not to give me any pages from MSFT. They are usually very optuse and talk in terms I don't understand.
My background is Access and I have had very good results with it. The file I am presently working on came from Access.
Specifically, I'd like to know what to click on to make this sort of scenario workable. Essentially, the question is how does one add, change and delete records when the table to be changed is a relation of two or more tables in a view?
I appreciate your help.
|
|
|
|
|
You can't update a multi-table view, thats what your problem is.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
I have a table like below.
CREATE TABLE [dbo].[BatchProcessRule](
[BatchProcessRuleId] [int] IDENTITY(1,1) NOT NULL,
[EffectiveDate] [datetime] NOT NULL,
[EndDate] [datetime] NULL,
[LastModifiedBy] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[LastModifiedOn] [datetime] NOT NULL)
How can I create a constraint so that only one row may exists with a null EndDate?
I tried using the constraint text (select count (*) from BatchProcessRuleDetail where EndDate is null ) > 1
but I got an error saying subqueries are not allowed.
Any thought?
I didn't get any requirements for the signature
|
|
|
|
|
How about this ?
CREATE TABLE [dbo].[BatchProcessRule](
[BatchProcessRuleId] [int] IDENTITY(1,1) NOT NULL,
[EffectiveDate] [datetime] NOT NULL,
[EndDate] [datetime] CONSTRAINT BatchProcessRule_UNIQUE UNIQUE,
[LastModifiedBy] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[LastModifiedOn] [datetime] NOT NULL)
Making a column unique means it would take its value NULL but only once.
|
|
|
|
|
That will only work if the EndDates are unique.
|
|
|
|
|
Isnt that what he wanted ?
|
|
|
|
|
No, he wanted only 1 null - that says nothing about the uniqueness of the non-nulls.
|
|
|
|
|
I don't think you can do this via a constraint.
You might be able to do this with a trigger that runs on insert/update to check the date and raise an error if it violates your rule.
Another possibility might be to restrict update and insert permissions to the table so that the only way to update/insert is via a stored procedure which does the check for null dates and raises an error accordingly.
|
|
|
|
|
I am only using a stored proc to do the update, so I'm just going to leave it that way. I just like to set up all my relationships / constraints before I start developing. I can recall at least 3 or 4 times where database rules have prevented small bugs from causing major headaches.
I didn't get any requirements for the signature
|
|
|
|