Sunday, March 25, 2012
CLUSTER NAME
is there any command to display current cluster name through query .
Thanks
ARR
C:\>Cluster /list:[DomainName]
Displays a list of clusters in the computer's domain or a specified domain.
You can use xp_cmdshell to run it in QA.
Ayad Shammout
SR.DBA/Analyst
Caregroup IS
"Aju" <ajuonline@.yahoo.com> wrote in message
news:e5fOYDLGFHA.936@.TK2MSFTNGP12.phx.gbl...
> Hi ,
> is there any command to display current cluster name through query .
> Thanks
> ARR
>
Thursday, March 22, 2012
Monday, March 19, 2012
cluseter name (virtual server name)
is there any command to display current cluster name through query .
Thanks
ARR
Aswered in this NG: xp_readreg thread
Regards
Mike
"Aju" wrote:
> Hi ,
> is there any command to display current cluster name through query .
> Thanks
> ARR
>
>
cluseter name (virtual server name)
is there any command to display current cluster name through query .
Thanks
ARRAswered in this NG: xp_readreg thread
Regards
Mike
"Aju" wrote:
> Hi ,
> is there any command to display current cluster name through query .
> Thanks
> ARR
>
>
cluseter name (virtual server name)
is there any command to display current cluster name through query .
Thanks
ARRAswered in this NG: xp_readreg thread
Regards
Mike
"Aju" wrote:
> Hi ,
> is there any command to display current cluster name through query .
> Thanks
> ARR
>
>
Sunday, March 11, 2012
CLR Stored Procedure is timing out
I've tried debugging the stored proc by stepping into it from within VS. When I do, I get to the code in question, but then simply get this message:
WARNING: Debugger was accessing T-SQL variables while managed code was not suspended.
Waiting until the access is done to continue T-SQL execution.
Continueing T-SQL execution.
And these messages appear to repeat indefinitely. I'm running SQL Server locally on my machine, but this also happens on out development SQL Server server.
The place in the code it appears to happen is when returning back results from a lower-level CLR stored proc called within the higher-level CLR stored proc -- when piping the result set, I suppose.
I've set MAXDOP to 1. No help.
Anyone know what's going on?
Are the CPU and memory getting taken up more and more along with the message appears to repeat indefinitely?
Here is one thread with the same warning, it may be similar to your case:
http://forums.microsoft.com/technet/showpost.aspx?postid=780559&siteid=17
Suggest to move the thread to the forum .NET Framework inside SQL Server, there you will get rapid and qualified responses.
Thanks for your understanding!
CLR Stored proc is timing out
and the query times-out.
I've tried debugging the stored proc by stepping into it from within VS.
When I do, I get to the code in question, but then simply get this message:
WARNING: Debugger was accessing T-SQL variables while managed code was not
suspended.
Waiting until the access is done to continue T-SQL execution.
Continueing T-SQL execution.
And these messages appear to repeat indefinitely. I'm running SQL Server
locally on my machine, but this also happens on out development SQL Server
server.
The place in the code it appears to happen is when returning back results
from a lower-level CLR stored proc called within the higher-level CLR stored
proc -- when piping the result set, I suppose.
I've set MAXDOP to 1. No help there.
Anyone know what's going on?Hello Quimbly,
> The place in the code it appears to happen is when returning back
> results from a lower-level CLR stored proc called within the
> higher-level CLR stored proc -- when piping the result set, I
> suppose.
Can you be a bit more specific about what you're doing?
Is your CLR proc calling another CLR proc without in parameter passed as
ref out out? How are you executing the other stored procedure.
Note: a better newsgroup for this would be Micorosoft.Public.SqlServer.CLR,
I've copied this there.
Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/|||> Can you be a bit more specific about what you're doing?
The top-level CLR proc calls a regular static method in the SQL CLR project.
This static method makes a call to another SqlProcedure (static method
tagged with [Microsoft.SqlServer.Server.SqlProcedure] attribute).
The static method is calling the lower-level CLR proc as follows:
string sqlString = "LC_SP_ScheduleEvents_SelectForDate";
SqlCommand command = new SqlCommand(sqlString, connection);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@.P_LuminaireID", luminaireID);
command.Parameters.AddWithValue("@.P_TargetDate", usageDate);
command.Parameters.AddWithValue("@.P_TargetDateStartInUTC", startTimeUTC);
command.Parameters.AddWithValue("@.P_TargetDateEndInUTC", endTimeUTC);
SqlDataReader reader = command.ExecuteReader();
//...
Inside the LC_SP_ScheduleEvents_SelectForDate proc, it times out when it's
piping it's results back:
I.e.:
...
for (int i = 0; i < dr.Length; i++)
{
// send one event
eventRow = new SqlDataRecord(eventRowMetaData);
eventRow.SetSqlBoolean(0, bool.Parse(dr[i]["IsLampOn"].ToString()));
eventRow.SetSqlDateTime(1,
DateTime.Parse(dr[i]["ActualEventTime"].ToString()));
eventRow.SetInt32(2, int.Parse(dr[i]["DimmingLevel"].ToString()));
SqlContext.Pipe.SendResultsRow(eventRow);
}
}
SqlContext.Pipe.SendResultsEnd();|||Hello Quimbly,
I know this seems lame, but I suspect you have a reference type issue here.
Try assigning IsLampOn, ActualEventTime and DimmingLevel to local value type
s,
then sets those into the DataRecord.
Its low hanging fruit to solve first.

Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
CLR Stored proc is timing out
and the query times-out.
I've tried debugging the stored proc by stepping into it from within VS.
When I do, I get to the code in question, but then simply get this message:
WARNING: Debugger was accessing T-SQL variables while managed code was not
suspended.
Waiting until the access is done to continue T-SQL execution.
Continueing T-SQL execution.
And these messages appear to repeat indefinitely. I'm running SQL Server
locally on my machine, but this also happens on out development SQL Server
server.
The place in the code it appears to happen is when returning back results
from a lower-level CLR stored proc called within the higher-level CLR stored
proc -- when piping the result set, I suppose.
I've set MAXDOP to 1. No help there.
Anyone know what's going on?
Hello Quimbly,
> The place in the code it appears to happen is when returning back
> results from a lower-level CLR stored proc called within the
> higher-level CLR stored proc -- when piping the result set, I
> suppose.
Can you be a bit more specific about what you're doing?
Is your CLR proc calling another CLR proc without in parameter passed as
ref out out? How are you executing the other stored procedure.
Note: a better newsgroup for this would be Micorosoft.Public.SqlServer.CLR,
I've copied this there.
Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
|||> Can you be a bit more specific about what you're doing?
The top-level CLR proc calls a regular static method in the SQL CLR project.
This static method makes a call to another SqlProcedure (static method
tagged with [Microsoft.SqlServer.Server.SqlProcedure] attribute).
The static method is calling the lower-level CLR proc as follows:
string sqlString = "LC_SP_ScheduleEvents_SelectForDate";
SqlCommand command = new SqlCommand(sqlString, connection);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@.P_LuminaireID", luminaireID);
command.Parameters.AddWithValue("@.P_TargetDate", usageDate);
command.Parameters.AddWithValue("@.P_TargetDateStar tInUTC", startTimeUTC);
command.Parameters.AddWithValue("@.P_TargetDateEndI nUTC", endTimeUTC);
SqlDataReader reader = command.ExecuteReader();
//...
Inside the LC_SP_ScheduleEvents_SelectForDate proc, it times out when it's
piping it's results back:
I.e.:
...
for (int i = 0; i < dr.Length; i++)
{
// send one event
eventRow = new SqlDataRecord(eventRowMetaData);
eventRow.SetSqlBoolean(0, bool.Parse(dr[i]["IsLampOn"].ToString()));
eventRow.SetSqlDateTime(1,
DateTime.Parse(dr[i]["ActualEventTime"].ToString()));
eventRow.SetInt32(2, int.Parse(dr[i]["DimmingLevel"].ToString()));
SqlContext.Pipe.SendResultsRow(eventRow);
}
}
SqlContext.Pipe.SendResultsEnd();
|||Hello Quimbly,
I know this seems lame, but I suspect you have a reference type issue here.
Try assigning IsLampOn, ActualEventTime and DimmingLevel to local value types,
then sets those into the DataRecord.
Its low hanging fruit to solve first.

Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
CLR Stored proc is timing out
and the query times-out.
I've tried debugging the stored proc by stepping into it from within VS.
When I do, I get to the code in question, but then simply get this message:
WARNING: Debugger was accessing T-SQL variables while managed code was not
suspended.
Waiting until the access is done to continue T-SQL execution.
Continueing T-SQL execution.
And these messages appear to repeat indefinitely. I'm running SQL Server
locally on my machine, but this also happens on out development SQL Server
server.
The place in the code it appears to happen is when returning back results
from a lower-level CLR stored proc called within the higher-level CLR stored
proc -- when piping the result set, I suppose.
I've set MAXDOP to 1. No help there.
Anyone know what's going on?Hello Quimbly,
> The place in the code it appears to happen is when returning back
> results from a lower-level CLR stored proc called within the
> higher-level CLR stored proc -- when piping the result set, I
> suppose.
Can you be a bit more specific about what you're doing?
Is your CLR proc calling another CLR proc without in parameter passed as
ref out out? How are you executing the other stored procedure.
Note: a better newsgroup for this would be Micorosoft.Public.SqlServer.CLR,
I've copied this there.
Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/|||> Can you be a bit more specific about what you're doing?
The top-level CLR proc calls a regular static method in the SQL CLR project.
This static method makes a call to another SqlProcedure (static method
tagged with [Microsoft.SqlServer.Server.SqlProcedure] attribute).
The static method is calling the lower-level CLR proc as follows:
string sqlString = "LC_SP_ScheduleEvents_SelectForDate";
SqlCommand command = new SqlCommand(sqlString, connection);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@.P_LuminaireID", luminaireID);
command.Parameters.AddWithValue("@.P_TargetDate", usageDate);
command.Parameters.AddWithValue("@.P_TargetDateStartInUTC", startTimeUTC);
command.Parameters.AddWithValue("@.P_TargetDateEndInUTC", endTimeUTC);
SqlDataReader reader = command.ExecuteReader();
//...
Inside the LC_SP_ScheduleEvents_SelectForDate proc, it times out when it's
piping it's results back:
I.e.:
...
for (int i = 0; i < dr.Length; i++)
{
// send one event
eventRow = new SqlDataRecord(eventRowMetaData);
eventRow.SetSqlBoolean(0, bool.Parse(dr[i]["IsLampOn"].ToString()));
eventRow.SetSqlDateTime(1,
DateTime.Parse(dr[i]["ActualEventTime"].ToString()));
eventRow.SetInt32(2, int.Parse(dr[i]["DimmingLevel"].ToString()));
SqlContext.Pipe.SendResultsRow(eventRow);
}
}
SqlContext.Pipe.SendResultsEnd();
Thursday, March 8, 2012
CLR function in 2005
SELECT * FROM TableA in an SQL Command object does it require that the
person who executed the CLR stored procedure has select permission on that
object? Or does the CLR proc execute as a DBO? or is it possible to make it
execute as a DBO if not dispite the user who executed it? just security
questions... want to know how to go about writing new procs in the .NET
CLR.. thanks!Same as for TSQL procedures.
The user executing the proc doesn't have to have permissions to the object t
o access, as long as you
don't have a broken ownership chain.
And, you can control user context when creating the proc with the EXECUTE AS
option of the CREATE
PROC command.
However, as soon as you leave the (SQL Server) sandbox, like accessing a fil
e, you need to do
impersonation in your CLR code if you don't want that code to execute with t
he service account that
the SQL Server service is using.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Brian Henry" <nospam@.nospam.com> wrote in message news:%23qwYGyMMGHA.1532@.TK2MSFTNGP12.phx
.gbl...
> If I execute a function in SQL Server 2005 which does a simple query like
SELECT * FROM TableA in
> an SQL Command object does it require that the person who executed the CL
R stored procedure has
> select permission on that object? Or does the CLR proc execute as a DBO? o
r is it possible to make
> it execute as a DBO if not dispite the user who executed it? just security
questions... want to
> know how to go about writing new procs in the .NET CLR.. thanks!
>|||how would you go about doing impersination to make it look like a CLR
account came from a different account?
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ejliRQNMGHA.2828@.TK2MSFTNGP12.phx.gbl...
> Same as for TSQL procedures.
> The user executing the proc doesn't have to have permissions to the object
> to access, as long as you don't have a broken ownership chain.
> And, you can control user context when creating the proc with the EXECUTE
> AS option of the CREATE PROC command.
> However, as soon as you leave the (SQL Server) sandbox, like accessing a
> file, you need to do impersonation in your CLR code if you don't want that
> code to execute with the service account that the SQL Server service is
> using.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Brian Henry" <nospam@.nospam.com> wrote in message
> news:%23qwYGyMMGHA.1532@.TK2MSFTNGP12.phx.gbl...
>|||> how would you go about doing impersination to make it look like a CLR account came from a
> different account?
Impersonation is only applicable for UNSAFE or EXTERNAL_ACCESS and when you
access things outside
SQL Server. You cannot even access data inside SQL Server while impersonatin
g. The sole purpose is
to access, say, a file using the end users windows account instead of the se
rvice account. More info
at:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/denet9/html/1495a7af-2248-4cee-afdb-92
69fb3a7774.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Brian Henry" <nospam@.nospam.com> wrote in message news:%2369btZOMGHA.2744@.TK2MSFTNGP10.phx
.gbl...
> how would you go about doing impersination to make it look like a CLR acco
unt came from a
> different account?
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:ejliRQNMGHA.2828@.TK2MSFTNGP12.phx.gbl...
>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in news:ejliRQNMGHA.2828@.TK2MSFTNGP12.phx.gbl:
> Same as for TSQL procedures.
> The user executing the proc doesn't have to have permissions to the
> object to access, as long as you don't have a broken ownership chain.
>
Actually that is not completely correct. If the statement in the CLR
proc is a SQL statement, like a select or something like that
(CommandType.Text), then the ownership chain breaks. This is like
executing a dynamic SQL statememnt within a T-SQL proc.
However if the call in the CLR proc is a stored proc call to a T-SQL
proc (CommandType.StoredProcedure) then the ownership chain stays
intact, and you only need execute perms on the CLR proc.
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********|||Tack Niels :-)
That was totally unexpected to me. I just had to try it with a CLR object an
d indeed TSQL code
executed inside a CLR proc is handled similar to dynamic SQL in a TSQL proc.
Seems to be yet another
reason to access the data through a TSQL proc inside a CLR proc...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Niels Berglund" <nielsb@.develop.com> wrote in message
news:Xns976D70AB1234Bnielsbdevelopcom@.20
7.46.248.16...
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in news:ejliRQNMGHA.2828@.TK2MSFTNGP12.phx.gbl:
>
> Actually that is not completely correct. If the statement in the CLR
> proc is a SQL statement, like a select or something like that
> (CommandType.Text), then the ownership chain breaks. This is like
> executing a dynamic SQL statememnt within a T-SQL proc.
> However if the call in the CLR proc is a stored proc call to a T-SQL
> proc (CommandType.StoredProcedure) then the ownership chain stays
> intact, and you only need execute perms on the CLR proc.
> Niels
> --
> ****************************************
**********
> * Niels Berglund
> * http://staff.develop.com/nielsb
> * nielsb@.no-spam.develop.com
> * "A First Look at SQL Server 2005 for Developers"
> * http://www.awprofessional.com/title/0321180593
> ****************************************
**********|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in news:OZTLgp7MGHA.3460@.TK2MSFTNGP15.phx.gbl:
> Tack Niels :-)
Varsagod :-)!!
> That was totally unexpected to me. I just had to try it with a CLR
> object and indeed TSQL code executed inside a CLR proc is handled
> similar to dynamic SQL in a TSQL proc. Seems to be yet another reason
> to access the data through a TSQL proc inside a CLR proc...
>
Definitely!!!
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********
Wednesday, March 7, 2012
Closest match SQL query
I have a need to execute a query in T-SQL on a numeric field in a SQL table.
However if there is no exact match I'd likea query that will return the row that is just below my value.
As an example if the table has values: 1,2,4,5,7,9, 15 and 20 for instance and I am matching with a varibale containing the value 9 then I'd like it to return that row. however if my variable has the value 19 I want the row containign 15 returned.
Is this possible? Can anyone help me with such a query?
Regards
Clive
If you use <= in your WHERE clause, and an Order By ... DESC, you will get the results you want. When you use ExecuteScalar(), it will only return the first value in the resultset.|||Here is one (SQL Server 2005):
SELECT NumFROM(SELECT Num, Row_Number()over(orderby NumDESC)as rNum
FROM yourTable
WHERE num<=19) t
WHERE rNum=1
Another one (should work with 2000):
SELECTTop 1 NumFROM(SELECT Num,(SELECTCOUNT(*)FROM yourTable bWHERE a.Num<=b.Num)as rNum
FROM yourTable a
WHERE Num<=19) t
OrderBY rNum
|||SELECT TOP 1 *
FROM MyTable
WHERE Num<=19
ORDER BY Num DESC
|||Thanks for your help. However I'm not doign too well, i've not managed to get these to work. I shoudl clarify that I am useing SQL 2005.
The cloest seems to be:
SELECT TOP 1 *
FROM table
WHERE id <=15
That does indeed return one row however since I can't guarantee the order of the data in the table I need to sort it first I think.
I have tried :
SELECT top 1 *
from (SELECT * from table ORDER BY id)
WHERE ID <=15 but also this fails.
Any help appreciated.
Regards
Clive
|||
Use Motley's code. You will see that it includes an order by clause. You need to Order By id DESC.
SELECT TOP 1 *
FROM table
WHERE id <=15
ORDER BY id DESC
|||
Thanks Mike,
That works perfectly - I was being dumb and putting the ORDER BY clause in the wrong place.
Clive
Saturday, February 25, 2012
Cllient Unable to establish connection
Others are also not able establish connection - they get a General Network error when trying to connecting to my server.
Think the Blue screen death corrupted some SQL driver in the process. Now am apprehensive about uninstalling and re-installing the SQL server since am unable to backup the databases.
Can anybody help please?SQL 2k?
I find it very unlikely...did you bounce the box?
Did and admin revoke your rights?
Blue screen of death? Haven;'t seen that in a loong while.
What o/s and what patches?|||SQL 2K with SP 3. Running on Win 2k (SP4) Server. There has been no change in the admin rights. it just stopped working after the crash.
that's why its confusing.. not much help from Miscrosoft either.
Originally posted by Brett Kaiser
SQL 2k?
I find it very unlikely...did you bounce the box?
Did and admin revoke your rights?
Blue screen of death? Haven;'t seen that in a loong while.
What o/s and what patches?|||Check your Client Config utility ? Try creating an alias using TCP/IP ..
What SQl Client you are using from where you accessing SQL Server ..?|||Tried the Client Network Utility - the TCP/IP option is not enabled when i try to add an alias. Only the Multiple Protocol, Apple Talk, VIA and "Other" options are enabled.
The server is installed in my laptop and am accessing from the same machine using the SQL Query Analyser. The laptop is a Win2k Server (SP4).
Originally posted by aashu
Check your Client Config utility ? Try creating an alias using TCP/IP ..
What SQl Client you are using from where you accessing SQL Server ..?
Friday, February 24, 2012
Client-server simple question
something like
Select * Into NewTable from OldTable
the data records don't all come from the server to my client machine and go
back to the server, do they? Doesn't all the data movement actually take
place ON the server?
The only reason I ask is that during this operation, the LAN icon "light"
in the system tray is solidly lit up, while it's not usually that way (it
usually blinks on and off). Maybe that's just status communication to QA,
but the icon is lit completely solid during this operation.
Thanks.
David WalkerThe data should not be zooming back and forth across the LAN.
What is probably being sent is the clock updates to the QA.
Rick Sawtell
MCT, MCSD, MCDBA|||"Rick Sawtell" <quickening@.msn.com> wrote in news:OYnpflb#EHA.3368
@.TK2MSFTNGP15.phx.gbl:
> The data should not be zooming back and forth across the LAN.
> What is probably being sent is the clock updates to the QA.
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
OK, thanks. That's what I hoped. The "light" being on solid is strange
for clock updates to the QA, but ... thanks.
David Walker
Client-server simple question
something like
Select * Into NewTable from OldTable
the data records don't all come from the server to my client machine and go
back to the server, do they? Doesn't all the data movement actually take
place ON the server?
The only reason I ask is that during this operation, the LAN icon "light"
in the system tray is solidly lit up, while it's not usually that way (it
usually blinks on and off). Maybe that's just status communication to QA,
but the icon is lit completely solid during this operation.
Thanks.
David Walker
The data should not be zooming back and forth across the LAN.
What is probably being sent is the clock updates to the QA.
Rick Sawtell
MCT, MCSD, MCDBA
|||"Rick Sawtell" <quickening@.msn.com> wrote in news:OYnpflb#EHA.3368
@.TK2MSFTNGP15.phx.gbl:
> The data should not be zooming back and forth across the LAN.
> What is probably being sent is the clock updates to the QA.
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
OK, thanks. That's what I hoped. The "light" being on solid is strange
for clock updates to the QA, but ... thanks.
David Walker
Client-server simple question
something like
Select * Into NewTable from OldTable
the data records don't all come from the server to my client machine and go
back to the server, do they? Doesn't all the data movement actually take
place ON the server?
The only reason I ask is that during this operation, the LAN icon "light"
in the system tray is solidly lit up, while it's not usually that way (it
usually blinks on and off). Maybe that's just status communication to QA,
but the icon is lit completely solid during this operation.
Thanks.
David WalkerThe data should not be zooming back and forth across the LAN.
What is probably being sent is the clock updates to the QA.
Rick Sawtell
MCT, MCSD, MCDBA|||"Rick Sawtell" <quickening@.msn.com> wrote in news:OYnpflb#EHA.3368
@.TK2MSFTNGP15.phx.gbl:
> The data should not be zooming back and forth across the LAN.
> What is probably being sent is the clock updates to the QA.
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
OK, thanks. That's what I hoped. The "light" being on solid is strange
for clock updates to the QA, but ... thanks.
David Walker
Client utilities for MSDE
I heard from a guy that the client utilities (Enterprice Manager and Query Analyser) that are on the Sql Server 2000 CD can be fetched separatly from Microsoft and that they can be deployed with MSDE to a potential customer.
Is that correct?
And if it is, where can I obtain those client apps?
TIA
OhlywohlyNope. You can't get the client utilities for free (legally), and deploy it to a customer.
http://msdn.microsoft.com/sql/downloads/tools/default.aspx
That's what you're limited to.|||You absolutely cannot deploy the Client Tools with MSDE to a customer! The whole point of MSDE is that it's an engine and your application should supply the means necessary to manage it.
If the client already owns a version of SQL Server then they may legally use the Client Tools to manage MSDE.
Unfortunately the Client Tools are not available for purchase separately. You might consider a set of 3rd party tools.
Terri
Disclaimer: I am not a lawyer nor a licensing expert
Client Tools
I have just Installed SQL Server 2005 on windows 2003 OS.
Is there any client tools like Query Analyzer of SQL server 2000 through which i can connect to the server and fire my queries? Where do I find that tool...
Thanks,
siajThis post is more apropos for the
group.
You can use SQL Server Enterprise Manager to issue queries. Click the "New Query" button. There is also a new command-line tool called SQLCMD.
Regards|||Thanks Dibble. I hv iinstalled the June CTP version of SQL Server 2005. I couldnt find any thing Like Enterprise Manager. M I misssing something ?
Where do I get that ? The closest thing I hv is SQl Server Configuration Manager.
Thanks,
siaj|||Siaj,
The functionality of Enterprise Manager & Query Analyser have been rolled into 1 tool - SQL Server Management Studio (SSMS).
I'm sticking my neck out here but I don't think there's anything you can do in Enterprise Manager that you can't do in SSMS.
-Jamie
Client tools
I would like to administer it as I did with sql server 2000:
- Enterprise Manager
- Sql Query Analyzer
Are there soem tools out there to download?
Any help appreciated.
Best Regards.
Fabrihttp://www.microsoft.com/downloads/...&DisplayLang=en
Fabri wrote:
> I have installed sql server 2005 express.
> I would like to administer it as I did with sql server 2000:
> - Enterprise Manager
> - Sql Query Analyzer
> Are there soem tools out there to download?
> Any help appreciated.
> Best Regards.
> Fabri|||Have you looked at SQL Server Management Studio Express?
information here:
http://msdn.microsoft.com/vstudio/express/sql/download/
download it here:
http://go.microsoft.com/fwlink/?LinkId=65110
Keith Kratochvil
"Fabri" <no@.sp.am> wrote in message
news:44809543$0$18297$4fafbaef@.reader1.news.tin.it...
>I have installed sql server 2005 express.
> I would like to administer it as I did with sql server 2000:
> - Enterprise Manager
> - Sql Query Analyzer
> Are there soem tools out there to download?
> Any help appreciated.
> Best Regards.
> Fabri|||Keith Kratochvil wrote:
> download it here:
> http://go.microsoft.com/fwlink/?LinkId=65110
Thx, (also to Tracy).
I tried it but I haven't found a DTS import/export in it.
I would like to import an access file to sql server 2005.
Is it yet possible ?
Regards.
fabri
MKDS: Joker - 055895 043343
AC:Fabrizio, Kanoemi, 1890 4700 1546
Tetris DS: 748422 559210|||There is no DTS support in Express. You can make it work with some
effort, see here:
http://msdn2.microsoft.com/en-us/library/ms143706.aspx
Sunday, February 19, 2012
Client Statistics / Network Statistics
I am trying to track down a slowly preforming query and am looking at the client statistics tab; specifically the Network Statistics and Bytes received from server.
I have two servers one running SQL Server 2000 and the other running SQL Server 2005, 64-bit.
The data on the servers is similar, some schema differences, some record differences -- but nearly 32 million records in one table.
The same query is taking longer on the new SQL Server 2005 machine. The main difference that I see on the client statistics tab is the bytes received from server is almost always triple on the new server.
Were there any changes in the information SQL Server 2000 and 2005 reports back? Could the 64-bit be the cause for the increase (might make sense if it were double, but not triple)?
Any other ways I can eliminate this metric from being the cause of the slow running queries?
Thanks, Richard
If I run a simple SELECT * FROM Orders against the Northwind database on SQL Server 2000 with Query Analyzer or on SQL Server 2005 (32-bit) with Management Studio I get 830 rows on each, and 157,065 bytes on 2000 vs 157,097 on 2005. (Get the Northwind database from here http://msdn2.microsoft.com/en-us/library/ms143221.aspx). Try it on your 64-bit server and see what you get. If you also get 157,097 then maybe you're using different data types in your database on the 64-bit server?|||Hi Richard,
I don't know the answer to the question of client statistics but I would personally check the execution of both of your queries through Profiler. Look at READS and CPU for both versions and see if there is a difference internally to SQL Server before checking to see the results being sent back to the client.
The DURATION counter could be misleading in your situation because the time taken to transfer the data back to the client (and the client to close the resultset) will factor into duration (actually, the DURATION counter is usually misleading due to issues of locking, blocking, client conneciton remaining open, low bandwidth to server, Disk bottlenecks, etc).
In regards to 64-bit showing double the number of characters, everything I've read suggests that 64-bit is the same code base and that your client app should not notice any difference between connecting to a 32-bit SQL Server or a 64-bit SQL Server.
You didn't mention how many rows and columns were returned by each query but if your data and schema is not 100% identical on both servers then I would assume the issue is in the data being returned.
Jared
|||I started with SQL Profiler and saw that the duration for my complex query was almost always slower on my new server. There are definite differences in the execution plans, but the number of rows returned is 23 and the fields requested are identical -- there are differences in the length of some of the varchars, but the actual data returned is identical.
Schema and rows shouldn't be a factor -- indexes and statistics are the same, execution plans are different and the "Bytes received from server" are different. Time statistics are slower.
I'm in the process on loading Northwind on these two servers so that I can compare with the other respondent. However, a DBA in another department ran a similar test against SQL Server 2000, SQL Server 2005, and SQL Server 2005, 64-bit and found that the Bytes received was greater (double to triple) on SQL Server 2005; reguardless of the 64-bit.
I'll run some more tests and post my results -- I just hope that I'm not chasing some difference in the "Client Statistics" tab between 2000 and 2005.
Thanks for your interest, Richard
Client side printing
I am trying to print Query Result directly to the printer from Client
machine. I managed to do this on Server machine. Where I had written SP whic
h
accepts SQL as parameter and using osql and xp_cmdShell command I am
outputting CSV file to printer. I want to do same from client machine but I
want print out should get printed on client printer not on Server.
Any ideas or suggestions'
Many thanks in advance.
Regards,
Santoshxp_cmdshell is executed on the server machine, which has no knowledge of the
client who submitted
the SQL command. Perhaps you can specify the printer name using UNC naming s
o the print is done on
the server machine, but the destination is specified as the client?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Santosh" <Santosh@.discussions.microsoft.com> wrote in message
news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
> Hi
> I am trying to print Query Result directly to the printer from Client
> machine. I managed to do this on Server machine. Where I had written SP wh
ich
> accepts SQL as parameter and using osql and xp_cmdShell command I am
> outputting CSV file to printer. I want to do same from client machine but
I
> want print out should get printed on client printer not on Server.
> Any ideas or suggestions'
> Many thanks in advance.
> Regards,
> Santosh
>|||Thanks Tibor, yes what you are suggesting, makes sense.
But I feel it will be better if I drop this idea and look for some different
option. Because if we want to specify UNC naming for printer. I need to make
printer as shared and need to give permissions so it can be accessible from
server by other users. Since printers are getting cheaper and cheaper, almos
t
everyone at client-side got there own printers, so I doubt if client admin
will accept this solution.
"Tibor Karaszi" wrote:
> xp_cmdshell is executed on the server machine, which has no knowledge of t
he client who submitted
> the SQL command. Perhaps you can specify the printer name using UNC naming
so the print is done on
> the server machine, but the destination is specified as the client?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Santosh" <Santosh@.discussions.microsoft.com> wrote in message
> news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
>
>|||I agree with your assessment. Can you do the printing from the client app (w
hich I assume is running
on the client machine already)?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"sansaw80" <sansaw80@.discussions.microsoft.com> wrote in message
news:E7FB20CE-CDA7-4334-BA6F-AEAEDA694852@.microsoft.com...[vbcol=seagreen]
> Thanks Tibor, yes what you are suggesting, makes sense.
> But I feel it will be better if I drop this idea and look for some differe
nt
> option. Because if we want to specify UNC naming for printer. I need to ma
ke
> printer as shared and need to give permissions so it can be accessible fro
m
> server by other users. Since printers are getting cheaper and cheaper, alm
ost
> everyone at client-side got there own printers, so I doubt if client admin
> will accept this solution.
>
>
> "Tibor Karaszi" wrote:
>|||Yup I can Print Crystal reports on local client printer through client app.
Now I have written small code in Vb.net which accepts SQL from client PC and
prints result in CSV format on local client printer.
"Tibor Karaszi" wrote:
> I agree with your assessment. Can you do the printing from the client app
(which I assume is running
> on the client machine already)?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "sansaw80" <sansaw80@.discussions.microsoft.com> wrote in message
> news:E7FB20CE-CDA7-4334-BA6F-AEAEDA694852@.microsoft.com...
>
>