|
How can we protect our database in Sql Server 2000
|
|
|
|
|
Bachuli wrote: How can we protect our database in Sql Server 2000
There are numerous ways to protect a SQL Server database.
* Provide passwords for the accounts that are permitted to access it.
* Define appropriate permissions on the databases
* Define appropriate permissions on the objects in the databases
* Run the SQL Server service in a restricted account
* Turn off TCP/IP (if access is not required across a network)
* Set up firewalls to prevent the SQL Server's port being exposed outside the corporate LAN
* Install Service Pack 3a or above (which fixes the bug that allowed the Slammer worm to work)
*
*
*
*
There are too many ways to describe in a forum post. You might want to buy a book on SQL Server Security.
|
|
|
|
|
find the difference between 2 given dates in days using case
Revathi Raj
|
|
|
|
|
|
Hi all,
I want to compare my system time with the time in MS Access table. I want to display those records which are greater than the current time(even the seconds not the milli seconds).
Plz any one suggest me the query.
Thanks in advance
bye
Know is Drop, Unknown is Ocean
|
|
|
|
|
please help me with the sql statement to display the information on the gridview according to the selected dates(stating date and ending date)when you click generate info butto
oga
|
|
|
|
|
select * from tblName where Date>=startDate and Date<endDate.
|
|
|
|
|
from txtSdate and txtEdate
oga
|
|
|
|
|
select * from tblName where cast(Date as datetime)>=cast(txtStartdate as datetime)
and cast(date as datetime)<=cast(txtEnddate as datetime)
I assume Date column is also in text format.
|
|
|
|
|
How to provide the password protection in SQL Server 2000
|
|
|
|
|
You would normally do this in your calling code. While there is a password function in SQL Server, it is quite a weak implementation.
In the code that was responsible for managing the user details, you would typically want to encrypt the password and a salt string. If you store the salt in the database, it is a simple matter to compare the user entered password + the salt with the encrypted password stored in the database and compare them to see if they match.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
sir
i want to protect my sqlserver database with password.so that no any one can modify my table containt.
as i used database in my asp.net program.
i want to change it only through program not directly database.
is it possible.
then reply me.
ajeet
|
|
|
|
|
I am trying to update a MS ACCESS table that has a column defined as a datetime type. The update looks like:
string updateSQL = "update Perform " +
" set venueCd = ?, " + " performanceDTTM = ?, " +
" performanceDesc = ?, " +
"lotteryPerformance = ?, " +
" lotteryAsgnComplete = ?, " +
" performHandicapLogic = ?, " +
" maxNumOfCompTks = ?, " +
" maxNumOfAdditionalTks = ?, " +
" costOfEachAddTk = ? " +
" where venueCd = ? and " +
" performanceDTTM = ?";
I am using a OleDbType.Date parm to pass in the value of the date time. The value is correct in the parameter and there is a row that it should find and update. Any help would be appreciated.
Thanks,
Patrick
|
|
|
|
|
Even down to the millisecond? (Just a thought - I've been caught out with that in the past)
|
|
|
|
|
that is a good question. I can view the data in ms access and it does not display sectonds or milliseconds. The value I am passing in is actually read from the row that I am trying to update from a prior select.
Colin, is there anything special I should do since I am working with dates with MS Access?
Patrick
|
|
|
|
|
I changed the where to:
DateValue(performanceDTTM) = DateValue(@oldPerformanceDTTM)
I used the DateValue function. I really do not understand why I had to use it since both the column and the parm were datetime data types.
|
|
|
|
|
I'm making tables at runtime, and adding them to the SQL DB on disk, which is working. Along the way, I'm also making the select string, which from past tries, I know works. When I try to make the command builder, it doesn't build the other SQL commands I need. Any Help on how to use this. I know it should be building the commands the first time Update is called, but it isn't doing so. I had this working once, added some columns to the table, and now it doesn't work. Trouble is, I don't have a backup of the code that worked.
A soft glow comes from the pit in the darkness.
The clicking noise become faster - and louder.
A wind begins to stir up from the pit, as the
creature flexes it's wings, preparing for flight.
You stare into the pit, and hear a voice say
in your mind, "If you survive the encounter,
declare it to the world."
The Code Demon Rises.
|
|
|
|
|
Hi,
Could someone please help me in this simple task.
I have two tables below. I need to set checked="ok" for those products that have no entry in [expiration date] table. Thanks in advance.
I imagine this would be something like this, but it's incorrect:
UPDATE (product as p<br />
INNER JOIN [expiration date] AS ed ON p.id=ed.product_id)<br />
SET checked='ok' WHERE (COUNT(*) FROM [expiration date] = 0)<br />
<br />
product<br />
-------<br />
id<br />
name<br />
checked<br />
<br />
expiration date<br />
---------------<br />
product_id<br />
exp_date<br />
quantity<br />
|
|
|
|
|
Hope this helps U.
Test this with some fake table before U proceed.
update product set
ckecked='ok' where id not in (select product_id from expirationdate)
Regards,
Arun Kumar.A
-- modified at 10:43 Sunday 22nd April, 2007
|
|
|
|
|
Try this:
update p set checked='ok'
from product p
where id in
( select id
from product p2
join expirationdate e on p2.id = e.product_id
group by id
having count(*) = 0)
I guess the question would be if there are records or not, it might be easier to do a left join if there are no records.
So that would be:
update p set checked='ok'
from product p
where id in
( select id
from product p2
left join expirationdate e on p2.id = e.product_id
where e.product_id is null)
Hope that helps.
Ben
|
|
|
|
|
Hello,
I'm using access 2007 as the database for a crystal reports project in vs.net 2005. When i try to preview or view the report, i get the error:
"Failed to open rowset"
Details: ADO Error Code:0x
Source: Microsoft Jet Database Engine
Description: Syntax error in JOIN Operation
SQL State: 3000
Native Error.
I tried to analyze the SQL Query...but i dunt understand wat hte problem is:
SELECT `tblDesc`.`North`, `tblDesc`.`South`, `tblDesc`.`East`, `tblDesc`.`West`, `tblDoc`.`Loan_Applicant`, `tblDoc`.`SubType`, `tblDoc`.`Plot_No`, `tblDoc`.`BR_Count`, `tblDoc`.`Family`, `tblDoc`.`Maid`, `tblDoc`.`Study`, `tblDoc`.`Plot_Area`, `tblDoc`.`Zoned`, `tblDoc`.`Tenure`, `tblDoc`.`BUA`, `tblDoc`.`Original_Price`, `tblDoc`.`Reg_Date`, `tblIntro`.`VRN`, `tblIntro`.`RRN`, `tblIntro`.`R_Date`, `tblIntro`.`I_Date`, `tblTitles`.`Title`, `tblValuation`.`Market_Value`, `tblValuation`.`MV_Words`, `tblValuation`.`Replacement_Value`, `tblValuation`.`RV_Words`, `tblValuation`.`Forced_Sale_Value`, `tblValuation`.`FSV_Words`, `tblValuation`.`Valuation_Date`, `tblValuator`.`Name`, `tblPropertyType`.`Property_Type`, `tblReports`.`ReportID`, `tblDesc`.`Topography`, `tblDesc`.`Location`, `tblDesc`.`Access`, `tblDoc`.`Address`, `tblExtra`.`Quality`, `tblExtra`.`Occupancy`, `tblExtra`.`Services`, `tblExtra`.`Comments`
FROM ((`ReportDB`.`dbo`.`tblIntro` `tblIntro` INNER JOIN `ReportDB`.`dbo`.`tblValuator` `tblValuator` ON `tblIntro`.`ValuatorID`=`tblValuator`.`ValuatorID`) INNER JOIN (((`ReportDB`.`dbo`.`tblReports` `tblReports` INNER JOIN `ReportDB`.`dbo`.`tblValuation` `tblValuation` ON `tblReports`.`ValuationID`=`tblValuation`.`ValuationID`) INNER JOIN `ReportDB`.`dbo`.`tblExtra` `tblExtra` ON `tblReports`.`ExtraID`=`tblExtra`.`ExtraID`) INNER JOIN ((`ReportDB`.`dbo`.`tblDoc` `tblDoc` INNER JOIN `ReportDB`.`dbo`.`tblPropertyType` `tblPropertyType` ON `tblDoc`.`PropertyID`=`tblPropertyType`.`PropertyID`) INNER JOIN `ReportDB`.`dbo`.`tblTitles` `tblTitles` ON `tblDoc`.`TitleID`=`tblTitles`.`TitleID`) ON `tblReports`.`DocID`=`tblDoc`.`DocID`) ON `tblIntro`.`IntroID`=`tblReports`.`IntroID`) INNER JOIN `ReportDB`.`dbo`.`tblDesc` `tblDesc` ON `tblReports`.`DescID`=`tblDesc`.`DescID`
WHERE `tblReports`.`ReportID`=1
any help will be greatly appreciated...
|
|
|
|
|
for ex. after INNER JOIN `ReportDB`.`dbo`.`tblReports` `tblReports`, again another INNER JOIN is starting.
Hope this is the problem
inner join usage is
INNER JOIN ON <condition>
where as in some of the inner joins of your query the "ON <condition>" is missing after <tablename>
Regards
KP
|
|
|
|
|
I don't normally do much data access work, so I've never got the better of this little demon. I'm getting an exception trying to cast a field (TaxRate) to a double, because it's an integer value. However, it is declared as 'float' in the DB, but just because the value for all records at this time is the integer 14, I can't cast it to a float. How daft is that?
|
|
|
|
|
Not sure about your question.Can you try Convert class?
|
|
|
|
|
Visual Basic 2005
I used DataSet Designer to add a column called "Case#" to an existing SQL table.
The table is used by a DataGridView in a VB 2005 program.
I got it working on my development computer in debug mode.
Then, when I installed it, I got an exception "Case# is an invalid column" and none of my data records appeared.
Adding the following statement did not help:
PatientDataSet.Patient.Columns.Add("Case#")
|
|
|
|
|