|
Oh yes I remember that on our servers - thats the 'sa' login with a password of 'administrator'
You always pass failure on the way to success.
|
|
|
|
|
I was aware of this. Admittedly however, my explanation could have been better.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
yeah, i tried, i created an account but it didnt work.
steps i did.
1. conect sql MS with windows authentication
2. Security > Logins > New
enter login name
select SQL Server authentication
enter password
3. uncheck "User must change password at next time"
4. select default database
5. checked all server roles
6. checked all Role membership of my database in user mapping
7. press "OK" and done and close sql MS
8. open sql MS, select SQL Server authentication
9. enter login name and passsword
and it gave error :
TITLE: Connect to Database Engine
------------------------------
Cannot connect to MATO.
------------------------------
ADDITIONAL INFORMATION:
Login failed for user 'MYLOGINNAME'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18452&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
any idea?
Becoming Programmer...
modified on Sunday, January 13, 2008 11:27:53 PM
|
|
|
|
|
I'm not sure. Did you definitely grant permission for your SQL login to access your MATO database?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
i only grant permission from properties of login, i dunno more than it, if you know please tell.
thanks
Becoming Programmer...
|
|
|
|
|
yehe...!! i successfully created an account but the database i wanna lock, can be open by windows authentication
how can i restrict that no user can open this database?
Becoming Programmer...
|
|
|
|
|
xmen wrote: how can i restrict that no user can open this database?
Don't grant any logins access to the database.
Why would you want to do this though? If no users can access your database, what purpose does it serve?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
no no i didnt mean that, i want that my database should open only with my id, i wanna set password on database as written in the title
Becoming Programmer...
|
|
|
|
|
xmen wrote: i want that my database should open only with my id, i wanna set password on database as written in the title
Well, if you are running the process that is accessing the database then you can open a connection becuase you are already authenticated against the process that is calling the database. However, another user cannot because the database should only be accepting connections from Windows applications running in your account.
Windows Authentication says that the user does not need to log in AGAIN, because they are already logged into the computer (or have started the process with Run As... and logged into the process as a different user that has access)
|
|
|
|
|
no no, my problem is something like this that e.g. i've an application that attached to database, database contains lots of important information, i want to give this app to my friend and dont want that any stranger can get those important info by using SQL MS, my app is secured with password, but the sql database isnt, thats why i'm trying to set password on database but i got to know that this isnt possible,
so please tell me a good way to solve this problem
Becoming Programmer...
|
|
|
|
|
xmen wrote: my app is secured with password, but the sql database isnt, thats why i'm trying to set password on database but i got to know that this isnt possible,
Yes, your database IS secured by a password somewhere. (We are talking about Microsoft SQL Server 2000/2005/2008)
Either your app is passing the user id/password in the connection string. Or it is using a Trusted Connection (in which case the user/password used is the one the user used when logging into windows - If the user can log into their windows account without a password that is not the fault of the database as it has been told to trust the windows account)
|
|
|
|
|
Colin Angus Mackay wrote: If the user can log into their windows account without a password that is not the fault of the database as it has been told to trust the windows account
so how can i say that my database is secured...
Becoming Programmer...
modified on Monday, January 14, 2008 1:19:30 PM
|
|
|
|
|
xmen wrote: so how can i say that my database is secured
If YOU don't trust the windows account, don't tell SQL Server to trust the windows account. In other words, don't give it logins that tie up to windows accounts that don't have passwords.
|
|
|
|
|
oh ok, i think that only possible while installing sql, isnt it?
Becoming Programmer...
|
|
|
|
|
xmen wrote: oh ok, i think that only possible while installing sql, isnt it?
No. Look in the security "folder" in SQL Management studio. You'll find the logins in there. You can add and remove them at any time.
|
|
|
|
|
ok i deleted all users, but a user named "sa" isnt deleting, can you tell how can i delete it too?
and thank you very much
EDITED :
i ve a new problem that when i try to log sql ms with my login id then it gave error
TITLE: Connect to Server
------------------------------
Cannot connect to MATO.
------------------------------
ADDITIONAL INFORMATION:
A connection was successfully established with the server, but then an error occurred during the login process.
(provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
(Microsoft SQL Server, Error: 233)
For help, click: http:
ProdName=Microsoft+SQL+Server&
EvtSrc=MSSQLServer&EvtID=233&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
then i try it about 3 times then it logged, but later when i try to log it have same error then about 3 times its works
please tell what to do?
Becoming Programmer...
modified on Tuesday, January 15, 2008 12:18:53 AM
|
|
|
|
|
xmen wrote: ok i deleted all users, but a user named "sa" isnt deleting, can you tell how can i delete it too?
You can't. "sa" is the administrator account. And it is not a trusted account. It needs its own password.
|
|
|
|
|
Dear Sir and Madam
I create a webboard.
After User Post, the message will be added to the table in Sql database.
My webboard allow user to post html tag.
This is the example of my problem.
when search the row that contain 'td',
the row that contain '<td>hello</td>'
and 'hello td' are returned.
Do you know how to return the the row that contains 'hello td' only?
Please give me an idea.
Thank You.
Sorry for bad English.
|
|
|
|
|
god4k wrote: Do you know how to return the the row that contains 'hello td' only?
SELECT * FROM mytable WHERE myfield = 'hello td'
But this doesn't make sense. 'hello td' isn't valid HTML markup.
Is this definitely what you want to do?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
pmarfleet wrote: But this doesn't make sense. 'hello td' isn't valid HTML markup.
Is this definitely what you want to do?
Your guess is probably as good as mine...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
You don't understand me.
Please see this example.
When user search the rows that contain 'a' in webboard,
only the following row should returend.
1. I see a dog run
2. give me my bag
3. I will pass this message on
4. .....
5. .....
and the following row should not returned.
6. <a href="codeproject.com">codeproject</a>
7. <a href="link.com">hello</a>
8. .....
9. .....
Please give me any idea.
Thank You.
|
|
|
|
|
You would have to perform some pattern matching, checking whether the string of characters formed part of a tag. T-SQL pattern matching doesn't have the capability to do this. However you could write a CLR stored procedure and invoke the regular expression functionality in the .NET framework to perform the match.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
delete from table1,table2 where uid='abc'
the conditon ( where uid='abc') is same for both table.
that uid field are present in both table.
I got error that Comma(,) should not be there
is there any other syntax that can work?
|
|
|
|
|
You can only delete from one table at a time. You'll need to write two statements.
Many providers can handle multiple statements in the same batch.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
You can only delete from one table at a time. If you want to delete from more than one at a time, using only one command, then try using a stored procedure that executes the individual table deletes in one call.
---modified
If there is a relationship between table1 and table2 with uid, then you could always setup a cascading delete based on that field.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|