Showing posts with label analyzer. Show all posts
Showing posts with label analyzer. Show all posts

Tuesday, March 20, 2012

Cannot open SQL Analyzer in Single User Mode

Hi

I have been having a problem with what I suspect are corrupted indexes. When I try to open the SQL Analyzer window when I have the database in Single User Mode I get the following error:

Msg 4060 Level 16

Cannot open database requested in login 'Timemaster'. Logion Fails

I am using the sa user to login and the password is correct.

SQL Analyzer opens correctly when not restricted to single user mode.

Hope you can help.

Susan

Are you trying to set the database in single user mode or the server in single user mode? This sounds like a misunderstanding of the meaing of what is being set to "single user". If you are trying to set the database into single user mode, please verify that you have database owner privilege on the targeted database.

cannot open query analyzer and profiler through EM

Hello Experts,
My problem is that I can't call QA and Profiler through Enterprise Manager
from the tools menu.
I made some MSDE installations and UnInstallations for debug reasons and
then this problem occurred.
Step 1) Installing an named instance "MYINSTANCE"
Step 2) UnInstalling "MYINSTANCE"
Step 3) ReInstalling "MYINSTANCE"
Step 4) UnInstalling "MYINSTANCE"
Can anyone please help me with this? I'm afraid that may be other functions
have crashed, but this is the first problem face up.
Regards!What happens when you go to Start|Run, type "isqlw" without the quotes, and
hit enter?
Or if you run Query Analyzer or Profiler from the Start Menu?
FWIW, I always call those tools directly.
"x-rays" <xrays@.discussions.microsoft.com> wrote in message
news:9F764D97-FE3F-4E80-90AE-7A7DD34DB2CB@.microsoft.com...
> Hello Experts,
> My problem is that I can't call QA and Profiler through Enterprise Manager
> from the tools menu.
> I made some MSDE installations and UnInstallations for debug reasons and
> then this problem occurred.
> Step 1) Installing an named instance "MYINSTANCE"
> Step 2) UnInstalling "MYINSTANCE"
> Step 3) ReInstalling "MYINSTANCE"
> Step 4) UnInstalling "MYINSTANCE"
> Can anyone please help me with this? I'm afraid that may be other
> functions
> have crashed, but this is the first problem face up.
> Regards!|||Hello Aaron, thank you for your reply,
No problem with that, qa and profiler work, I think that EM has lost the
right paths for the tools but I don't know where I have to go to correct the
m.
Do you have any Idea?
Regards!
Ο χρ?στη? "Aaron Bertrand [SQL Server MVP]" _γγραψε:

> What happens when you go to Start|Run, type "isqlw" without the quotes, an
d
> hit enter?
> Or if you run Query Analyzer or Profiler from the Start Menu?
> FWIW, I always call those tools directly.
>
>
> "x-rays" <xrays@.discussions.microsoft.com> wrote in message
> news:9F764D97-FE3F-4E80-90AE-7A7DD34DB2CB@.microsoft.com...
>
>|||Hello Aaron and thank you for your reply.
No problem with that, I think that EM have lost the paths of the tools and I
don't know where to go to correct them.
regards!
Ο χρ?στη? "Aaron Bertrand [SQL Server MVP]" _γγραψε:

> What happens when you go to Start|Run, type "isqlw" without the quotes, an
d
> hit enter?
> Or if you run Query Analyzer or Profiler from the Start Menu?
> FWIW, I always call those tools directly.
>
>
> "x-rays" <xrays@.discussions.microsoft.com> wrote in message
> news:9F764D97-FE3F-4E80-90AE-7A7DD34DB2CB@.microsoft.com...
>
>|||> No problem with that, qa and profiler work, I think that EM has lost the
> right paths for the tools but I don't know where I have to go to correct
> them.
> Do you have any Idea?
Reinstall client tools, or stop using EM to launch tools other than EM...|||Ok, thank you very much for your time Aaron.
Ο χρ?στη? "Aaron Bertrand [SQL Server MVP]" _γγραψε:

> Reinstall client tools, or stop using EM to launch tools other than EM...
>
>

Thursday, February 16, 2012

Cannot get serverproperty

Using SQL2k. When I run the command below in query analyzer I get 3 columns
of info. However, when I run the same SELECT from code I get nothing. Can
anyone help? Thanks.
SELECT SERVERPROPERTY('productversion') As SQLVersion,
SERVERPROPERTY('productlevel') As ProdLevel, SERVERPROPERTY('edition') As
SQLEdition
p.s. I want to display this on a VB form. All other commands using my
connection run fine.
DavidDavid Chase (dlchase@.lifetimeinc.com) writes:
> Using SQL2k. When I run the command below in query analyzer I get 3
> columns of info. However, when I run the same SELECT from code I get
> nothing. Can anyone help? Thanks.
> SELECT SERVERPROPERTY('productversion') As SQLVersion,
> SERVERPROPERTY('productlevel') As ProdLevel, SERVERPROPERTY('edition') As
> SQLEdition
> p.s. I want to display this on a VB form. All other commands using my
> connection run fine.
It would certainly help if you posted your VB code, as it's likely
that's where the problem is.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Here is the code.
Set cn = New ADODB.Connection
cn.Open gstrSQLConString
Set rs1 = New ADODB.Recordset
Set rs1 = cn.Execute(strSQL)
strSQL = "SELECT SERVERPROPERTY('productversion') As SQLVersion," & _
" SERVERPROPERTY('productlevel') As ProdLevel," & _
" SERVERPROPERTY('edition') As SQLEdition"
Set rs1 = cn.Execute(strSQL)
If Not rs1.EOF Then
Me.txtCoAddress = CStr(rs1("SQLVersion"))
End If
David
p.s. Just above this code is an identical recordset retrieval that works
perfect.
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97AA6601BD26Yazorman@.127.0.0.1...
> David Chase (dlchase@.lifetimeinc.com) writes:
> It would certainly help if you posted your VB code, as it's likely
> that's where the problem is.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||David Chase (dlchase@.lifetimeinc.com) writes:
> Here is the code.
> Set cn = New ADODB.Connection
> cn.Open gstrSQLConString
> Set rs1 = New ADODB.Recordset
> Set rs1 = cn.Execute(strSQL)
> strSQL = "SELECT SERVERPROPERTY('productversion') As SQLVersion," & _
> " SERVERPROPERTY('productlevel') As ProdLevel," & _
> " SERVERPROPERTY('edition') As SQLEdition"
> Set rs1 = cn.Execute(strSQL)
> If Not rs1.EOF Then
> Me.txtCoAddress = CStr(rs1("SQLVersion"))
> End If
> David
> p.s. Just above this code is an identical recordset retrieval that works
> perfect.
Apparently, there is more to it. I tried your code in the attached
VB form, and it seemed to work fine.
Which version of ADO do you use?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx