|
The Knowledge wrote: How can i make my database more and more secure so that unautorised user cannot have access to my database by Enterprises Manager
If they are unauthorised then Enterprise Manager wont let them in.
|
|
|
|
|
Hi All,
How can we lock and unlock the database
Manoj Bisht
|
|
|
|
|
What do you mean by that? You can lock bits of the database just by selecting rows. The database will temporarily lock those rows so that the SELECT can get a clean result set out.
|
|
|
|
|
Hi guys, I've got this problem, hope someone can help me out.
I've written and application and it works fine on my computer and i can connect to SQL through a Text file
connection string in the Text box : Data Source= NameOfMyDataSource;Initial Catalog= DataBaseName ;Integrated Security=True
As I said, it works fine on my computer but NOT on other computers !!!
I installed my application on another computer and also installed SQL server, then attached my database and it works fine, but when i run my progran and enter ID and Pass get this error !
System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Please help me out !!!
Thanx in advance
Mr.K
|
|
|
|
|
It seems that someone else (our web company) are able to login to it and the server is external to them as well. Any ideas?
Can you connect if you specify the IP address & port number instead of the host name? Is there a firewall in the way?
Regards,
Satips.
|
|
|
|
|
i don't connect to server, everything is on the clients computer !!! my computer is at home and it's not connected to the ones i'm installin the project on ! well i have to check the firewall !!!
any ideas ???
Mr.K
|
|
|
|
|
By default, SQL Server blocks remote access. To get round this, log into SQL Server Configuration Manager and make sure that you have enabled Named Pipes. Then, go into the Surface Area Configuration Tool and make sure it's set for Local and/or remote connections for Named Pipes. Now, restart the SQL Server instance.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanx man, you've been very helpful ! I haven't tried it yet but I'm sure it'll work just fine !
Mr.K
|
|
|
|
|
Hey, I did exactly as you told me, but still get the same error ???!!! What should I do?
Mr.K
|
|
|
|
|
Try changing Integrated Security=true to Integrated Security=SSPI .
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hey everyone! I'm a little stumped on a problem with some SQL code that I'm writing, so I was hoping someone might be able to offer some advice.
I have a varchar column on a table in which I record the id_keys of another table. Sometimes multiple id_keys are entered into the column, which we format as: 1; 2; 3, with each id_key seperated from the previous one by a semicolon with a space (; ). What I'm trying to do is to write an update statement that will pull the numeric values of the id_keys out of the varchar string, and then match them up to the id_keys of the first table. This is the basic statement I've got so far:
UPDATE TABLE1
SET column1 = a.column1,
column2 = a.column2
FROM TABLE2 a
WHERE TABLE1.id_key = (
SELECT column3
FROM TABLE2)
Column3 is the column that would have the varchar string containing the id_keys of TABLE1. Obviously, simply doing a SELECT statement on column3 won't be sufficient, but I'm not sure how to write my SQL code to give me the data I need. I suspect that I'll also have to convert the data back to numeric from varchar, but I haven't got that far yet.
Any thoughts or suggestions? Thanks everyone!
|
|
|
|
|
LobsterHead wrote: Sometimes multiple id_keys are entered into the column, which we format as: 1; 2; 3, with each id_key seperated from the previous one by a semicolon with a space (; ).
What is the necessity of storing data like this. Why don't you store the data in multiple rows ? Then your problem will be solved.
If you still want to use the current method, I suggest you to append the same type of string in other table where you are going to check. I think that can solve your problem.
|
|
|
|
|
Well, the tables that I'm trying to do this on are part of a commericial sales database, not one that I've developed myself. On the table that I'm saving the id_keys in, a row is only inserted when a customer makes a purchase (the id's represent vouchers that can be redeemed as part of the purchase). As a result, a customer might redeem multiple vouchers as part of a single sale. I would use more columns, but the table only allows me to use up to 10 custom defined columns, all of which I have data feeding into.
As far as appending the same type of string in another table, I'm not quite sure I follow. Could you elaborate? (I don't actually have any training with sql, so I'm figuring this out as I go, with a little aid from Microsoft's "Querying Microsoft SQL Server 2000" book.) Thanks!
|
|
|
|
|
If these tables become large, you're really going to have some performance issues stripping out these string values all the time - you really should consider denormalising these keys...
|
|
|
|
|
What does it mean to denormalise the keys? Like I said in my other response, I don't actually have any training on SQL, so I'm kinda figuring this out as I go. Thanks!
|
|
|
|
|
SELECT * FROM Task_Questionnaire WHERE (DAG_Flag='D') AND (TIR Like 'T***-***') ORDER BY RecNumber;
This works in access, however, once on my dot net page, and I call it, it doesnt. In all actually I am just trying to get were TIR = NULL, I've tried Is Not Null, and Not Null, and that doesnt seem to function either!
|
|
|
|
|
Answer is
<br />
strSQL="SELECT * FROM Task_Questionnaire WHERE (DAG_Flag='D') AND (TIR Like 'T%%%-%%%') ORDER BY RecNumber;<br />
Use of % for patterns!
|
|
|
|
|
SELECT * FROM Task_Questionnaire WHERE (DAG_Flag='D') AND (TIR is NULL) ORDER BY RecNumber;
Will this work ?
|
|
|
|
|
I am sorry I was tired last night and mistyped, I was actually trying to get it were it wouldnt pull any NULL values in.
|
|
|
|
|
Can you use an ODBC connection between MS Access and Sybase if LDAP is involved? LDAP beig the storage location for user authentication to a Sybase database.
My company and I are worried that our "existing" ODBC connections with Sybase will no longer work once usernames and passwords for Sybase databses are controlled through LDAP.
I can only hope that I explained myself adequately, let me know if you need further info.
thanks
|
|
|
|
|
Hi all,
Let me supply the Code and then explain:
DECLARE @vchRequestNumber Integer<br />
<br />
SELECT @vchRequestNumber = MAX(CONVERT(INT,(ISNULL(vchRequestNumber, 0))))+1<br />
FROM tblRequest
Ok, here's the deal..
What works:
IF vchRequestNumber is GREATER THAN 0 in the TABLE, the code WORKS.. and therefore I am presented with a value of vchRequestNumber PLUS 1.
What Doesn't work:
IF vchRequestNumber is NULL, then a ZERO replaces it(which is fine); BUT it is returning 0 instead of 0 PLUS 1.
Anyone has any ideas???
|
|
|
|
|
Hi Dayekh,
try this:
DECLARE @vchRequestNumber INT<br />
<br />
SELECT @vchRequestNumber = MAX(CONVERT(INT,(ISNULL(vchRequestNumber, 0))))<br />
FROM tblRequest<br />
<br />
SET @vchRequestNumber = @vchRequestNumber + 1
Greetings
Ralph
|
|
|
|
|
hehehe.. i tried that exact thing right now.. but it doesn't work...
I found the problem tho.. when no records exist, i.e. when vchRequestNumber is NULL, the ENTIRE evaluation is returning a NULL... so this is what I had to do:
ISNULL(MAX(CONVERT(INT,(ISNULL(vchRequestNumber, 0)))),0)+1
Thank you for the reply!
|
|
|
|
|
Alternatively, you could use COALESCE(vchRequestNumber, 0) + 1
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I currently have a SQL statement that basically looks like this.
SELECT [ID]
FROM
tblOne O
WHERE
(O.EventType = 'START'
AND O.Date <= @Today)
OR (O.EventType = 'END'
AND O.Date >= @Today) What I need to do is to pull records that have both a START and END that fit the criteria and if one is missing I need to exclude it. Is that possible through a SQL statement or will I need to continue looping through the records as this code already does?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|