I am using the desktop sqlexpress 2005 and I was experimenting with the account setting and I accidentally disabled my access. I am using windows authentication and there is no password, just the windows login name.
How can I reactivate the login for this connection. Any help is greatly appreciated.
I am writing in regard to this post: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=52798 Which I found while searching for a best-practice way to implement record locking in my application. In the above referenced post the user asks “How can I tell if a row is locked?�, and the reason for asking is that the user wants to implement logic similar to this:
Select a row for editing. If the row has been locked by a different user, display the information as read only. Otherwise, lock the row and allow the user to edit (allow others to read).
My questions are exactly the same as the original poster of the above thread. I was surprised to see that the general response to the post was the user was taking a wrong approach and that sql server is unable to work as the user requested. I think the approach is both correct and desirable (I used it extensively as a foxpro programmer) and I would like further confirmation that sql server does not support it.
One of the things I don’t understand is the interaction between transactions and locks. Is it not possible to lock a row without initiating a transaction? Bottom line, my goal is this:
Select a row for editing. If the row has been locked by a different user, display the information as read only. Otherwise, lock the row and allow the user to edit (allow others to read).
Hi to all, I need help about access to mdf file. I don't know when, but sometime my application, build with vbnet, return an error on mdf database access, that is access denied, also winxp return on the mdf file the message "process cannot access the file because it is being used by another process" if I try to delete the mdf file. I can delete the file only if I stop the procss sqlservr.exe from taskmanager. I don't use instruction to open and close database, I use dataset, datatable and sql build in datatable. Someone can say me why sqlservr.exe don't unlock the mdf file when I close my application? Thanks..
When I am deleting records from a table, I am not able to select or insert records from the table. This particular table needs to be used by more users and very frequently used.
I am having an interesting problem that has got me completely baffled. I restored a database from the .bak file of another database on my server to use as a test DB for an App. upgrade before upgrading the live side. The problem I have run into is that the application will not allow login into the DB unless the Trusted Connection user has dbo privs. The DB is not set for dbo use only acoording to sp_dboption. It is not this way on the live side and tech support for the app. and I both think it has to strictly do with something in the SQL permissions. Any Ideas on what could have happened? Is the restored DB hanging onto something from the original DB that could be causing this? The connection works great on the live side on the older version, and I have seen it work in the newer version as well. Any takers?--Dallas
I have a problem that i can't log on sql server as the account is lock out. I don't know why it is locked out as this is the first time i log on. Anybody has this experience? Thank you very much!
I just brought SQL Server 2005 up on Windows Server 2003 a few days ago. Everything was going great up until a few minutes ago. I tried to connect using the Management Console and get the message
Login failed for user 'sa' because the account is currently locked out. Your administrator can unlock it.
My 'sa' account is locked out and the BUILTINAdministrators account does not have the sysadmin role. I removed the sysadmin role from BUILTINAdministrators for security reasons and before I could create a new account with the sysadmin role I fat fingered the sa password and locked it out. How can I get myself out of this mess.
HelloI have a stand alone Java application that uses SQL Server 2000 on thesame machine. Sometimes, when we run the applications and follow acertain steps, the SQL server locks some of the table. At that point oftime, if we try to query Select * on those table, in Query Analyzer, itjust keep spinning and doesn't return anything. That tells me that thetables are locked. If I close the application then it frees up theconnection and those tables are accessible again.My question is how do I find out how and what query/update causes thetables to be locked. Is there a tool (some kind of a profiler) that cantell me what was the last insert/update/delete quesry was run before itgot locked?Please help me.
My sql server just dissalowed every connection attempt made. All the allowed users were denied permission, including the computer's admins. I changed the permissions and tryed everything I could think of but it wont let me back in. Can someone help ASAP?
Hi Champs, Is there a way to recover from a account lockout in SQL2005? I cannot connect to "Database Engine" in "SQL Server Management Studio", error: login failed...18456. Access denied.
And I also cannot start the "SQL Server agent service"
I have been using SQL2000 for a number of years and the company I work for needs a new system so I decided to install SQL2005.
I installed SQL2005 without any problems and set a complex password for SA. I tried to log on and had to make several atempts as I remmebered the password after the SA account got locked out with the following message:
Login failed for user 'sa' because the account is currently locked out. The system administrator can unlock it. (Microsoft SQL Server, Error: 18486).
The problem I have is I cannot log onto SQL at all as it is not logging on with windows authentication either!
How do I unlock the SA account or do I have to reinstall SQL?
I am a beginner working on a webclass project using VBLive as a model. Today I have lost any ability to enter Enterprise Manager for SQL7 although my SQL7 Server is still running and operational with the webclass application.
When I try to start the enterprise manager, i get a mmc.exe-application error Have I locked myself out somehow? How to get back in control?
Hi, I've started 2 dbcc processes using SQL Scheduler overnight. and I've got one is flagged rollback and the other is still running, they are blocked together. I've tried to kill them using kill <spid> without success. How can I delete this processes ? Shall I shutdown the server ?
I have had a search of the forum and couldn't find a solution to this one.
On a clean install of SQL Server 2000 on a W2003 server we setup our database as normal, selected appropriate priveldges for everyone and all was well.
Until an adminsitraor accidently turned builtinadministors account to DENY access. We are now locked out of EM and I can't think of a way back in.
We can't access the database via the sa account as it is set to Windows Autentication, and we can't re-register the database for the same reason.
No other user has sufficent priveldges to update the master db or change authenticaion, or even log into EM for that matter.
I think we are snookered, but any thoughts are welcomed.
Have setup several pilot installations using merge replication between sql server mobile and sql server 2005. All has been perfect for over a week in all locations. last night one of the ocations stopped updating. Upon further investigation all devices kept throwing errors: "The database is currently synchronizing with the server". So I left for a further 2 hours with no change. The replication process usually takes abot 1 second and never take more than 3 or 4 seconds. There was no change to the data at all in this case either. I fixed the issue by restarting the whole server.
It would seem that there was some kind of lock on the database. Being new to sql server my question is:
Is there a way to properly diagnose the cause (I looked in the system event log and found nothing). Is there a way to get notified if this occures again.
We are plannng hundreds of similar installations and cannot constantly monitor all of them in the hope of finding this issue again.
I have a copy of a SQL Server 2000 Database, and would like to see what the stored procedures are doing (as I think it is wrong).
in Server Management Studio the stored procedures have a lock symbol on them and when I try and view them I get the message:
TITLE: Microsoft SQL Server Management Studio ------------------------------
Script failed for StoredProcedure 'dbo.sp_procedure'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Script+StoredProcedure&LinkId=20476
Property TextHeader is not available for StoredProcedure '[dbo].[sp_procedureprocedure]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. The text is encrypted. (Microsoft.SqlServer.Smo)
This was developed by someone else, but I need to see it.
My question is, is there any way i can see the text of this stored procedure?
Hi I want to know if is there any way to check a locked row for another process using a ID row in a table. I was looking for a query over sys.dm_tran_locks, but didnt get the ID for the locked row. My app must send a message to user if another is procesing the same row, not only wait for unlock.
Hallo, if a row is locked in SQLExpress and an other user want to update this row, SQLExpress waits until timeout. And than I get the errormessage "timeout".
What I need is an immediately errormessage "row is locked" !
So that the user dont need to wait if the row is locked and I need the correct errormessage so that I can check if there is a databaseproblem or only the row locked because an other user is editing the same rows.
Hi everyone, I hope someone can help me here! A friend of mine set up a Windows 2003 Server for me in my home with Sql Server 2005. I'm developing a website for prospective employers to see the kinds of things I can program since I have no field-related work experience. I have a cool site up, but I can't showcase the any features that use sql server (which obviously, are the kinds of things employers want to see) because the login and password my friend remembers produces this error:Cannot connect to server. Additional information: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 doesn't allow remote connections,(provider: Named Pipes Provider, error: 40-could not open a connection to sql server)(Microsoft sql server, Error:2)My friend doesn't know how to fix this. Is there a way to create another login with admin rights in the command prompt so that I can login & get my database functionality going? Thanks in advance,Monster
Hi all I have heared that there is way to use SQL SMO (SQL Management Objects), or other third party tools running on a management server to send out an email or some kind of notifications if a database is locked.
Anyone knows how to do that in SQL Managment 2005. Thanks -Sarah
What is they best way to get data from a locked Access database into SQL Server? Linked Server, DTS Package, or should I just directly access it from my App?
I am giving the following statement outside the begin tran block in a stored procedure: select * from table1 with (holdlock) where column1 = @colValue I have the following two questions regarding above situation:
Being outside the begin tran block, will the select statement cause a lock to be held or it has to be within the begin tran block for the lock to be held? Will the select statement hold a lock only on the row or rows matching the where clause, or it may lock a page or even the entire table in this situation? Thanks
When I am running reports on SQL Server 6.5 database which involves creation of temp tables, whole tempdb is locked. All other users are blocked,
The reports involve queries which fetch data into temporary tables, as,
SELECT c1 , c2, c3 ... INTO #tmp1 FROM T1 WHERE C1 = xxx AND .........
When any of these queries are run, it blocks all other operations using TEMPDB, like creation of temporary tables or queries using sorts etc.
It appears that the query locks the system tables (sysobjects, syscolumns) in TEMPDB.
However, the above query works fine if it is constructed as,
CREATE TABLE #tmp1 (a1 ..., a2 ...., a3 ..... )
INSERT INTO #tmp1 SELECT (c1, c2, c3) FROM T1 WHERE c1 = xxx AND .........
Could someone please tell me what actually is happening in the first scenario. Is there a way avoid the blocking of TEMPDB usage other than the workaround mentioned above (which means I have to change all my queries) ?
wierd thing - i am trying to write a program that use simple access database but 5 user can access it at the same time ,
i wont to know if the database is in use by other user before attemping to write to it ,
but i notice that DBNAME.ldb file even when exsist i can some times write to the database - so to chack if this file is exsist will not be the sulotion , some one know how to chack it?
Hopefully one of you gurus can offer a solution to this problem:
First off I do not have the ability to use SQLMail - so that is not an option.
I have a DTS package that performs the following steps in order to populate an excel sheet with some data and email it off to a coworker:
1) FTP Task to copy excel sheet template from one folder to another on same machine
2) Data pump between SQL server connection (local) and copied excel sheet.
3) SQL script task which truncates a table on the sql server
4) activeX script task which contains the following code that uses CDO to attach the excel sheet that was just populated to an outgoing email:
Function Main()
Dim iMsg
set iMsg = CreateObject("CDO.Message")
Dim objMail
Set objMail = CreateObject("CDO.Message")
objMail.From = "from@from.com"
objMail.To = "to@to.com"
objMail.AddAttachment("F:copiedexcelsheet.xls")
objMail.Subject="subject"
objMail.HTMLBody = "Body"
objMail.Send
Set objMail = nothing
Main = DTSTaskExecResult_Success
End Function
The result of DTS execution is a failure on the activeX step:
Error Description: The process cannot access the file because it is being used by another process.
I assume this means Excel still has its grubby paws on the file - but I've tried alleviating this by (1) using a waitfor delay between the excel connection and the activex script task and even by (2) using the run package task to run a separate package that only has the activex mailsender script in it (thinking the parent package would terminate along with the excel process before running the next package - maybe I'm wrong here?).