Tuesday, March 27, 2012
Cluster Service remain on starting state after quorum log corrupti
I have a 2 node windows 2000 Cluster with a problem. I think the quorum log
became corrupted and now on both nodes the cluster service cannot start.
Without the cluster service running i cannot access any of the resources. On
the event viewer i have some error messages indicating that the quorum log is
corrupted, is there a way of getting the cluster service to start?
I already tried starting the service with the -noquerylogging parameter, the
service started and i could clear the old log from the quorum disk, but after
that i'm trying to restart the service and he just stays on starting state
indefinetly. Is there anything i can do to save my neck...because i noticed a
few minutes ago that bmy backups were not running properly.
Please help me out, i have to start cluster on the next 8 hours!!!!
Thanks a lot
My messenger is f_batista69@.hotmail.com
Hi
Look at
"To recover from a corrupted quorum log or quorum disk"
http://www.microsoft.com/windows2000...luad_pr_70.htm
and
http://support.microsoft.com/default...b;en-us;872970
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"francisco - Portugal" <francisco - Portugal@.discussions.microsoft.com>
wrote in message news:48441502-D241-488E-A26F-CB9E6C1F5FC3@.microsoft.com...
> Hi
> I have a 2 node windows 2000 Cluster with a problem. I think the quorum
> log
> became corrupted and now on both nodes the cluster service cannot start.
> Without the cluster service running i cannot access any of the resources.
> On
> the event viewer i have some error messages indicating that the quorum log
> is
> corrupted, is there a way of getting the cluster service to start?
> I already tried starting the service with the -noquerylogging parameter,
> the
> service started and i could clear the old log from the quorum disk, but
> after
> that i'm trying to restart the service and he just stays on starting state
> indefinetly. Is there anything i can do to save my neck...because i
> noticed a
> few minutes ago that bmy backups were not running properly.
> Please help me out, i have to start cluster on the next 8 hours!!!!
> Thanks a lot
> My messenger is f_batista69@.hotmail.com
>
|||Francisco
Have you tried this.
Power off one of the nodes.
On the remaining NODE start cluster service with -noquorumlogging
Delete Everything inside of the MSCS directory on the Quroum drive (I know
you stated you deleted the quolog.log file previously).
Stop the cluster service and then start it with the -resetquorumlog
If this works then stop the cluster service and start it normally. I have
seen quorum logs become so corrupt that resetquorumlog does not work this
usually fixes it. If this does not work I would recommend the following:
Reboot the only node that is powered up with the cluster service set to
manual.
Go to the command promp c:\Windows\Cluster\clussvc -debug >c:\debug.txt
cut and paste the output into the news groups.
Regards
CT
"francisco - Portugal" wrote:
> Hi
> I have a 2 node windows 2000 Cluster with a problem. I think the quorum log
> became corrupted and now on both nodes the cluster service cannot start.
> Without the cluster service running i cannot access any of the resources. On
> the event viewer i have some error messages indicating that the quorum log is
> corrupted, is there a way of getting the cluster service to start?
> I already tried starting the service with the -noquerylogging parameter, the
> service started and i could clear the old log from the quorum disk, but after
> that i'm trying to restart the service and he just stays on starting state
> indefinetly. Is there anything i can do to save my neck...because i noticed a
> few minutes ago that bmy backups were not running properly.
> Please help me out, i have to start cluster on the next 8 hours!!!!
> Thanks a lot
> My messenger is f_batista69@.hotmail.com
>
sqlsql
Monday, March 19, 2012
CLR TVF -> Using Datareader...
I'm trying to create a CLR-TVF which should do some stuff (in my sample it's
just getting the syscolumns name column for the database _ODS).
I’ve got this error:
An error occurred while getting new row from user defined Table Valued
Function :
System.InvalidOperationException: Data access is not allowed in this
context. Either the context is a function or method not marked with
DataAccessKind.Read or SystemDataAccessKind.Read, is a callback to obtain
data from FillRow method of a Table Valued Function, or is a UDT validation
method.
Question: Is it really not possible to make a sql-query within the C#-Part
of the CLR? I know, I could easily do it using a StoredProc…but I need a T
VF.
Thanks for your help…
Here is the code:
[Microsoft.SqlServer.Server.SqlFunction
(FillRowMethodName = "FillRow2",
DataAccess = DataAccessKind.Read,
TableDefinition = "fld_colname NVARCHAR(4000)" )]
public static IEnumerable LoadSysColumns(string str2)
{
return str2;
}
public static void FillRow2(object row,
out string str2)
{
// creating a connection using the current sqlserver-context
using (SqlConnection connection = new SqlConnection("context
connection=true"))
{
connection.Open();
SqlCommand sqlCommand = connection.CreateCommand();
sqlCommand.CommandText = "select NAME from _ODS.dbo.SYSCOLUMNS";
SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
sqlDataReader.Read();
str2 = sqlDataReader.GetValue(0).ToString();
}
}"Dominic" <Dominic@.discussions.microsoft.com> wrote in message
news:7638A0AE-0976-4DAC-8512-93FB84C048A4@.microsoft.com...
> Hi
> I'm trying to create a CLR-TVF which should do some stuff (in my sample
> it's
> just getting the syscolumns name column for the database _ODS).
> I've got this error:
> An error occurred while getting new row from user defined Table Valued
> Function :
> System.InvalidOperationException: Data access is not allowed in this
> context. Either the context is a function or method not marked with
> DataAccessKind.Read or SystemDataAccessKind.Read, is a callback to obtain
> data from FillRow method of a Table Valued Function, or is a UDT
> validation
> method.
> Question: Is it really not possible to make a sql-query within the C#-Part
> of the CLR? I know, I could easily do it using a StoredProc.but I need a
> TVF.
> Thanks for your help.
> Here is the code:
> [Microsoft.SqlServer.Server.SqlFunction
> (FillRowMethodName = "FillRow2",
> DataAccess = DataAccessKind.Read,
> TableDefinition = "fld_colname NVARCHAR(4000)" )]
> public static IEnumerable LoadSysColumns(string str2)
> {
> return str2;
> }
> public static void FillRow2(object row,
> out string str2)
> {
> // creating a connection using the current sqlserver-context
> using (SqlConnection connection = new SqlConnection("context
> connection=true"))
> {
> connection.Open();
> SqlCommand sqlCommand = connection.CreateCommand();
> sqlCommand.CommandText = "select NAME from
> _ODS.dbo.SYSCOLUMNS";
> SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
> sqlDataReader.Read();
> str2 = sqlDataReader.GetValue(0).ToString();
> }
> }
>
Any data access should be in the LoadSysColumns method, not in the
FillRowMethod. In LoadSysColumns just fill a List<string> and return that.
SQL will enumerate it and pass each member to your FillRowMethod, EG:
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.Collections;
using System.Collections.Generic;
public partial class UserDefinedFunctions
{
[Microsoft.SqlServer.Server.SqlFunction
(FillRowMethodName = "FillRow2",
DataAccess = DataAccessKind.None,
SystemDataAccess = SystemDataAccessKind.Read,
TableDefinition = "fld_colname NVARCHAR(4000)")]
public static IEnumerable LoadSysColumns()
{
List<string> names = new List<string>();
using (SqlConnection connection = new SqlConnection("context
connection=true"))
{
connection.Open();
SqlCommand sqlCommand = connection.CreateCommand();
sqlCommand.CommandText = "select NAME from dbo.SYSCOLUMNS";
using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader())
while (sqlDataReader.Read())
{
names.Add(sqlDataReader.GetValue(0).ToString());
}
}
return names;
}
public static void FillRow2(object row, out string str2)
{
str2 = (string)row;
}
};
David|||Thanks David...works fine!
"David Browne" wrote:
> "Dominic" <Dominic@.discussions.microsoft.com> wrote in message
> news:7638A0AE-0976-4DAC-8512-93FB84C048A4@.microsoft.com...
> Any data access should be in the LoadSysColumns method, not in the
> FillRowMethod. In LoadSysColumns just fill a List<string> and return that
.
> SQL will enumerate it and pass each member to your FillRowMethod, EG:
>
> using System;
> using System.Data;
> using System.Data.SqlClient;
> using System.Data.SqlTypes;
> using Microsoft.SqlServer.Server;
> using System.Collections;
> using System.Collections.Generic;
> public partial class UserDefinedFunctions
> {
> [Microsoft.SqlServer.Server.SqlFunction
> (FillRowMethodName = "FillRow2",
> DataAccess = DataAccessKind.None,
> SystemDataAccess = SystemDataAccessKind.Read,
> TableDefinition = "fld_colname NVARCHAR(4000)")]
> public static IEnumerable LoadSysColumns()
> {
> List<string> names = new List<string>();
> using (SqlConnection connection = new SqlConnection("context
> connection=true"))
> {
> connection.Open();
> SqlCommand sqlCommand = connection.CreateCommand();
> sqlCommand.CommandText = "select NAME from dbo.SYSCOLUMNS";
> using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader())
> while (sqlDataReader.Read())
> {
> names.Add(sqlDataReader.GetValue(0).ToString());
> }
> }
> return names;
> }
> public static void FillRow2(object row, out string str2)
> {
> str2 = (string)row;
> }
> };
>
> David
>
>
Sunday, February 19, 2012
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...
>
>
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 which
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
xp_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 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...
> 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 which
> 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, almost
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 the 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 (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...[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 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, almost
> 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...
>
>
Friday, February 10, 2012
clearing up replication
I am trying to clear up replication on our server and under Replication
Monitor\Publishers..there is a publication I want to get rid of as the db no
longer exists. When I try to delete it I get the error msg:-
Error 21766...The name 'abc' was not found in the TransPublications
collection...
I've been trying to find info on how to get rid of this and can't seem to
find anything of use so does anyone have any ideas?
Thanks
Jonjo
I'm not sure if this helps for you but did you try:
sp_removedbreplication 'dbname'
"jonjo" wrote:
> Hi
> I am trying to clear up replication on our server and under Replication
> Monitor\Publishers..there is a publication I want to get rid of as the db no
> longer exists. When I try to delete it I get the error msg:-
> Error 21766...The name 'abc' was not found in the TransPublications
> collection...
> I've been trying to find info on how to get rid of this and can't seem to
> find anything of use so does anyone have any ideas?
> Thanks
> Jonjo
>
>
|||Hi Umut
Yea, I tried that but it tells me the db does not exist..which I knew anyway.
"Umut Nazlica" wrote:
[vbcol=seagreen]
> I'm not sure if this helps for you but did you try:
> sp_removedbreplication 'dbname'
>
> "jonjo" wrote:
clearing up replication
I am trying to clear up replication on our server and under Replication
Monitor\Publishers..there is a publication I want to get rid of as the db n
o
longer exists. When I try to delete it I get the error msg:-
Error 21766...The name 'abc' was not found in the TransPublications
collection...
I've been trying to find info on how to get rid of this and can't seem to
find anything of use so does anyone have any ideas?
Thanks
JonjoI'm not sure if this helps for you but did you try:
sp_removedbreplication 'dbname'
"jonjo" wrote:
> Hi
> I am trying to clear up replication on our server and under Replication
> Monitor\Publishers..there is a publication I want to get rid of as the db
no
> longer exists. When I try to delete it I get the error msg:-
> Error 21766...The name 'abc' was not found in the TransPublications
> collection...
> I've been trying to find info on how to get rid of this and can't seem to
> find anything of use so does anyone have any ideas?
> Thanks
> Jonjo
>
>|||Hi Umut
Yea, I tried that but it tells me the db does not exist..which I knew anyway
.
"Umut Nazlica" wrote:
[vbcol=seagreen]
> I'm not sure if this helps for you but did you try:
> sp_removedbreplication 'dbname'
>
> "jonjo" wrote:
>
Clearing all records in a table
I have two questions:
1. Is there a way to clear all records in a table from within a store procedure? (Instead of having to go into the table and manually selecting all rows and deleting them that way.)
2. I want to sort a list of records so that the only one left are the ones with just single words in. So I have used
WHERE SearchText LIKE '% %'
to remove the cells with spaces in, but I need to be able to remove the ones with punctuation too. Is there an easy way to do this?
Thanking you in advance.You can clear all records by calling
TRUNCATE TABLE tablename
or
DELETE FROM TABLE
You can do your search for punctuation the same way, adding OR searchText LIKE '%-%', etc.|||Just to be clear, is TRUNCATE TABLE a logged operation? I didn't think it was but thought I'd better check/point it out.|||Truncate table is a minimally logged operation. In a transaction, you can undo it. This transaction:
create table nisse (id int NOT NULL)
go
insert nisse select id from sysobjects
go
select count(*) from nisse
go
begin transaction
truncate table nisse
select count(*) from nisse
rollback transaction
go
select count(*) from nisse
Produces this output:
(101 row(s) affected)
----
101
(1 row(s) affected)
----
0
(1 row(s) affected)
----
101
(1 row(s) affected)|||Erm what is a "minimally logged" operation? Sorry if I'm hijacking this thread to be a teach-in for truncate table.|||The individual rows are not logged, but the data pages in use by the table are logged, and those pages are not reused until the transaction is committed.