Tuesday, March 27, 2012
Cluster solution certification
We are currently working on setting up a 2-Node cluster using SQL Server
2005.
Hardware :
HP Blade servers : BL 460c (c7000 enclosure)
SAN from Compellent Technologies
Fiber channel network.
OS : Windows Server 2003.
My understanding is that this cluster solution (as a whole not individual
components)needs to be certified by Microsoft in order to get support from
them in the future.
I checked the microsoft site www.windowsservercatalog.com but couldn;t find
the entire system as a whole for the above combination. There were other
combinations of SAN from Compellent and Proliant servers from HP.
I spoke to Compellent, and they directed me to the "wondowsservercatalog"
site.
I'm trying to get hold of someone from HP who can help me with this ,so far
no success.
Does anyone of you use the above platform for Clustering without any issues.
If so, for how long?
I appreciate your input.
SJ
Blade cluster = Low Availability Cluster, regardless of the certification.
Blades share too many critical components (Power Supplies, inbuilt network
switches, etc.) for me to count them as truly redundant solutions. Some
blade systems are less "interdependent" than others, but when you are trying
for both hardware redundancy (Clustering) AND lower cost through combined
hardware (blade platform), something has to give.
Geoff N. Hiten
Senior SQL Infrastructure Consultant
Microsoft SQL Server MVP
"SJ" <SJ@.discussions.microsoft.com> wrote in message
news:C314632E-B342-45E7-86F8-CB0F8F1DD230@.microsoft.com...
> Hi All,
> We are currently working on setting up a 2-Node cluster using SQL Server
> 2005.
> Hardware :
> HP Blade servers : BL 460c (c7000 enclosure)
> SAN from Compellent Technologies
> Fiber channel network.
> OS : Windows Server 2003.
> My understanding is that this cluster solution (as a whole not individual
> components)needs to be certified by Microsoft in order to get support from
> them in the future.
> I checked the microsoft site www.windowsservercatalog.com but couldn;t
> find
> the entire system as a whole for the above combination. There were other
> combinations of SAN from Compellent and Proliant servers from HP.
> I spoke to Compellent, and they directed me to the "wondowsservercatalog"
> site.
> I'm trying to get hold of someone from HP who can help me with this ,so
> far
> no success.
> Does anyone of you use the above platform for Clustering without any
> issues.
> If so, for how long?
> I appreciate your input.
>
> --
> SJ
Sunday, March 25, 2012
Cluster Mirroring
I've read a lot of the information about this topic in MSDN. My boss askme to understand and to let working an example application of Cluster Mirroring. The problem is that i dont understand well yet what is a Cluster and what is the main idea behind it.
If someone really understand and can explain me clearly whats behind it, i will be very grateful. Thanks a lot for the help. ( Sorry for me english :( )
Ok, Basically a cluster is a two-headed monster. Chop one of it's heads off and nothing will happen, it will still carry on chasing you.
In computer terms, the simplest cluster is a two-node cluster (two headed monster) , two physical computers sharing the same name and IP address. If one of the computers making up the cluster fails (chop one head off) the cluster will still carry on functioning (chasing you) on the other computer participating in the cluster.
The general idea behind it is to provide high-availability for your apps by eliminating a single point of failure.
|||
Thanks bobbins!
But i have another question ... when you have a mirror database with a witness, you also provide high-availability. Because if something happen the mirror will continue chasing you .. Why is much better the cluster ? Thanks a lot again
|||There are many discussions/articles on Clustering vs Mirroring vs Replication vs Log Shipping
In short, I think clustering is still a better solution for high-availability, PROVIDED that you do have a SAN
We're using mirroring now until we can get a SAN in, then we'll move to clustering
sqlsqlMonday, March 19, 2012
CLR Triggers, Linq, and Transactions
For brevity's sake I've boiled down my scenario to a bare minimum: A SQL table [Test] with three columns (int Manual, int Automatic, IDENTITY int ID) needs any external updates on its [Manual] column to be applied to its [Automatic] column (with an additional sign change) through a Trigger.
A fairly direct translation of my non-Linq CLR Trigger to Linq yields the following code (the [Trigger_TestLinQs] SQL table has been modified to point to the Trigger's "INSERTED" table, [TestLinQs] points to the actual SQL table):
Code Snippet
[SqlTrigger(Name = "LinQTrigger", Target = "dbo.TestLinQ", Event = "FOR INSERT, UPDATE")]public static void LinQTrigger()
{
SqlTriggerContext triggerContext = SqlContext.TriggerContext;
if (triggerContext.TriggerAction == TriggerAction.Insert || triggerContext.TriggerAction == TriggerAction.Update) {
//using (TransactionScope scope = new TransactionScope(Transaction.Current)) { /* err 6549 */
using (SqlConnection connection = new SqlConnection("context connection=true")) {
connection.Open();
using (MyDataContext context = new MyDataContext(connection)) {
List<int[]> updates = new List<int[]>();
foreach (Trigger_TestLinQ test in (from t in context.Trigger_TestLinQs select t)) { /* err 6522 */
if (test.Manual != null && triggerContext.IsUpdatedColumn(0))
updates.Add(new int[] { test.ID, -test.Manual.Value });
}
foreach (int[] update in updates) {
dbo.TestLinQ test = (from t in context.TestLinQs where t.ID == update[0] select t).Single<dbo.TestLinQ>();
test.Automatic = update[1];
}
context.SubmitChanges();
}
}
// scope.Complete();
//}
}
}
Running this on SQL Server 2005 / .NET 3.5 beta2 produces an Error 6522 "Cannot enlist in the transaction because a local transaction is in progress on the connection." in the line executing the Linq query because the Linq DataContext apparently insists on opening a transaction.
The recommended pattern for DataContext query operations - running them inside a TransactionScope as indicated by the commented-out sections - unfortunately leads to a different Error 6549 in the TransactionScope constructor complaining about a missing MSDTC. And there shouldn't be a need for a distributed transaction here, should there?
Using different TransactionScope constructors (TransactionScopeOptions.Required, TransactionOptions(){IsolationLevel=ReadCommitted}) did not make any difference, either.
What am I doing wrong here? Is there any way for the Linq DataContext to attach to the CLR Trigger's ambient transaction?
Interesting scenario! I won't ask why you'd want to use LINQ in this way :-)
Anyway, first of all I'm a little bit surprised that LINQ works at all within SQLCLR. I thought it would not work with a Context Connection at all.
It looks like, at the moment, that LINQ does not work very well with transactions when running inside SQLCLR (in fact it looks it doesn't work at all). So at the moment, I don't think there is anything you can do.
Niels
|||Hi nielsb,
thanks for destroying my last hope :-).
You're probably right in that presently LinQ DataContexts don't fully - or maybe even not at all - interoperate with a Context Connection.
I'm wondering why that is the case, however, since it's basically just a case of O/R mapping - which can apparently be coaxed to work with dynamic SQL Tables - and of attaching to a local System.Transactions.Transaction.
Interestingly enough you can make the LinQ DataContext work for the SELECT statement embedded in the trigger by explicitely opening a new Transaction on the SqlConnection. You can't effectively perform any updates, though, because the DataContext's change tracking mechanism doesn't kick in.
As to why I'd want to use LinQ in this context - it's the logical next step once you've been lured away from the glory of T-SQL into the murky depths of SQL Server CLR integration. :-]
Sunday, March 11, 2012
CLR SP Execution
I am currently working on an application which calls some CLR stored
procedures in SQL Server 2005. The first time one of the CLR stored
procedures (it doesn't matter which one) is called it takes a lot longer to
execute. After the first CLR stored procedure has been executed the CLR
stored procedures all execute in a reasonable amount of time.
I have been unable to find any articles explaining the process that occurs
when a CLR stored procedure is called. I am currently assuming the initial
delay is related to the CLR loading the DLL? Is the CLR loaded with SQL
Server or only when needed?
If anyone can point me in the direction of an article to aid my
understanding or can explain the process I would be grateful.
Thanks in advance.
Alistair HarrisonHow long of a delay do you experience? Do you get the delay with a trivial
proc like the one below? I get a sub-second response when I execute this
after a fresh SQL Server restart.
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void MyProc()
{
Microsoft.SqlServer.Server.SqlContext.Pipe.Send("Test message");
}
};
I'm no expert on SQL CLR internals but I can't think of any overhead beyond
the usual object-specific overhead.
Hope this helps.
Dan Guzman
SQL Server MVP
"Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
message news:71A086F6-487F-46FD-B501-A7844F6936E5@.microsoft.com...
> Hello,
> I am currently working on an application which calls some CLR stored
> procedures in SQL Server 2005. The first time one of the CLR stored
> procedures (it doesn't matter which one) is called it takes a lot longer
> to
> execute. After the first CLR stored procedure has been executed the CLR
> stored procedures all execute in a reasonable amount of time.
> I have been unable to find any articles explaining the process that occurs
> when a CLR stored procedure is called. I am currently assuming the initial
> delay is related to the CLR loading the DLL? Is the CLR loaded with SQL
> Server or only when needed?
> If anyone can point me in the direction of an article to aid my
> understanding or can explain the process I would be grateful.
> Thanks in advance.
> Alistair Harrison|||Dan,
Thanks for your response.
The following are examples of execution times recorded by the Client
Statistics when the query is executed:
Initial execution of my original sp: 1600 to 1700 ms
Subsequent execution: <100 ms
Initial execution of your test sp: 700 to 800 ms
Subsequent execution: <50 ms
Another point I noticed was that if the test sp is executed first followed
by my original sp following a restart the original sp takes around 1200 ms t
o
execute. This is less than the 1600 to 1700 ms it seems to take when
executing the sp first but is still much greater than the subsequent
execution time.
It might be worth mentioning that my original clr sp executes a couple of
tsql sps using a context connection and then returns some xml as an output
parameter.
Thanks,
Alistair
"Dan Guzman" wrote:
> How long of a delay do you experience? Do you get the delay with a trivia
l
> proc like the one below? I get a sub-second response when I execute this
> after a fresh SQL Server restart.
> public partial class StoredProcedures
> {
> [Microsoft.SqlServer.Server.SqlProcedure]
> public static void MyProc()
> {
> Microsoft.SqlServer.Server.SqlContext.Pipe.Send("Test message");
> }
> };
> I'm no expert on SQL CLR internals but I can't think of any overhead beyon
d
> the usual object-specific overhead.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
> message news:71A086F6-487F-46FD-B501-A7844F6936E5@.microsoft.com...
>
>|||It's likely that subsequent executions are faster simply a result of data
caching. I'd expect execution times to average about 1200ms if you run DBCC
DROPCLEANBUFFERS before each execution. For performance testing, I usually
execute DBCC DROPCLEANBUFFERS and DBCC FREEPROCCACHE before each test.
I don't think the sub-second delay the first time the proc is run is
anything to be concerned about.
Hope this helps.
Dan Guzman
SQL Server MVP
"Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
message news:6A2A987D-E008-440F-867E-0DE4D6A3AA85@.microsoft.com...[vbcol=seagreen]
> Dan,
> Thanks for your response.
> The following are examples of execution times recorded by the Client
> Statistics when the query is executed:
> Initial execution of my original sp: 1600 to 1700 ms
> Subsequent execution: <100 ms
> Initial execution of your test sp: 700 to 800 ms
> Subsequent execution: <50 ms
> Another point I noticed was that if the test sp is executed first followed
> by my original sp following a restart the original sp takes around 1200 ms
> to
> execute. This is less than the 1600 to 1700 ms it seems to take when
> executing the sp first but is still much greater than the subsequent
> execution time.
> It might be worth mentioning that my original clr sp executes a couple of
> tsql sps using a context connection and then returns some xml as an output
> parameter.
> Thanks,
> Alistair
>
> "Dan Guzman" wrote:
>|||Dan
Thanks again for your response.
I have retested the two stored procedures running DROPCLEANBUFFERS and
FREEPROCCACHE before each execution. The execution times increase slightly
but are still consistently below 300ms.
I suppose as the longer execution only seems to occur following a restart it
is not too much of a worry just intriguing as to why it seems to occur.
Alistair
"Dan Guzman" wrote:
> It's likely that subsequent executions are faster simply a result of data
> caching. I'd expect execution times to average about 1200ms if you run DB
CC
> DROPCLEANBUFFERS before each execution. For performance testing, I usuall
y
> execute DBCC DROPCLEANBUFFERS and DBCC FREEPROCCACHE before each test.
> I don't think the sub-second delay the first time the proc is run is
> anything to be concerned about.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
> message news:6A2A987D-E008-440F-867E-0DE4D6A3AA85@.microsoft.com...
>
>|||Hello Alistair,
It might be worth remembering that the Assembly (and its dependent assemblie
s)
still needs to be fetched, verified, JITTed and the app domain created befor
e
the CLR code runs in many cases. That could be why you have a slower initial
startup.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
CLR SP Execution
I am currently working on an application which calls some CLR stored
procedures in SQL Server 2005. The first time one of the CLR stored
procedures (it doesn't matter which one) is called it takes a lot longer to
execute. After the first CLR stored procedure has been executed the CLR
stored procedures all execute in a reasonable amount of time.
I have been unable to find any articles explaining the process that occurs
when a CLR stored procedure is called. I am currently assuming the initial
delay is related to the CLR loading the DLL? Is the CLR loaded with SQL
Server or only when needed?
If anyone can point me in the direction of an article to aid my
understanding or can explain the process I would be grateful.
Thanks in advance.
Alistair Harrison
How long of a delay do you experience? Do you get the delay with a trivial
proc like the one below? I get a sub-second response when I execute this
after a fresh SQL Server restart.
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void MyProc()
{
Microsoft.SqlServer.Server.SqlContext.Pipe.Send("T est message");
}
};
I'm no expert on SQL CLR internals but I can't think of any overhead beyond
the usual object-specific overhead.
Hope this helps.
Dan Guzman
SQL Server MVP
"Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
message news:71A086F6-487F-46FD-B501-A7844F6936E5@.microsoft.com...
> Hello,
> I am currently working on an application which calls some CLR stored
> procedures in SQL Server 2005. The first time one of the CLR stored
> procedures (it doesn't matter which one) is called it takes a lot longer
> to
> execute. After the first CLR stored procedure has been executed the CLR
> stored procedures all execute in a reasonable amount of time.
> I have been unable to find any articles explaining the process that occurs
> when a CLR stored procedure is called. I am currently assuming the initial
> delay is related to the CLR loading the DLL? Is the CLR loaded with SQL
> Server or only when needed?
> If anyone can point me in the direction of an article to aid my
> understanding or can explain the process I would be grateful.
> Thanks in advance.
> Alistair Harrison
|||Dan,
Thanks for your response.
The following are examples of execution times recorded by the Client
Statistics when the query is executed:
Initial execution of my original sp: 1600 to 1700 ms
Subsequent execution: <100 ms
Initial execution of your test sp: 700 to 800 ms
Subsequent execution: <50 ms
Another point I noticed was that if the test sp is executed first followed
by my original sp following a restart the original sp takes around 1200 ms to
execute. This is less than the 1600 to 1700 ms it seems to take when
executing the sp first but is still much greater than the subsequent
execution time.
It might be worth mentioning that my original clr sp executes a couple of
tsql sps using a context connection and then returns some xml as an output
parameter.
Thanks,
Alistair
"Dan Guzman" wrote:
> How long of a delay do you experience? Do you get the delay with a trivial
> proc like the one below? I get a sub-second response when I execute this
> after a fresh SQL Server restart.
> public partial class StoredProcedures
> {
> [Microsoft.SqlServer.Server.SqlProcedure]
> public static void MyProc()
> {
> Microsoft.SqlServer.Server.SqlContext.Pipe.Send("T est message");
> }
> };
> I'm no expert on SQL CLR internals but I can't think of any overhead beyond
> the usual object-specific overhead.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
> message news:71A086F6-487F-46FD-B501-A7844F6936E5@.microsoft.com...
>
>
|||It's likely that subsequent executions are faster simply a result of data
caching. I'd expect execution times to average about 1200ms if you run DBCC
DROPCLEANBUFFERS before each execution. For performance testing, I usually
execute DBCC DROPCLEANBUFFERS and DBCC FREEPROCCACHE before each test.
I don't think the sub-second delay the first time the proc is run is
anything to be concerned about.
Hope this helps.
Dan Guzman
SQL Server MVP
"Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
message news:6A2A987D-E008-440F-867E-0DE4D6A3AA85@.microsoft.com...[vbcol=seagreen]
> Dan,
> Thanks for your response.
> The following are examples of execution times recorded by the Client
> Statistics when the query is executed:
> Initial execution of my original sp: 1600 to 1700 ms
> Subsequent execution: <100 ms
> Initial execution of your test sp: 700 to 800 ms
> Subsequent execution: <50 ms
> Another point I noticed was that if the test sp is executed first followed
> by my original sp following a restart the original sp takes around 1200 ms
> to
> execute. This is less than the 1600 to 1700 ms it seems to take when
> executing the sp first but is still much greater than the subsequent
> execution time.
> It might be worth mentioning that my original clr sp executes a couple of
> tsql sps using a context connection and then returns some xml as an output
> parameter.
> Thanks,
> Alistair
>
> "Dan Guzman" wrote:
|||Dan
Thanks again for your response.
I have retested the two stored procedures running DROPCLEANBUFFERS and
FREEPROCCACHE before each execution. The execution times increase slightly
but are still consistently below 300ms.
I suppose as the longer execution only seems to occur following a restart it
is not too much of a worry just intriguing as to why it seems to occur.
Alistair
"Dan Guzman" wrote:
> It's likely that subsequent executions are faster simply a result of data
> caching. I'd expect execution times to average about 1200ms if you run DBCC
> DROPCLEANBUFFERS before each execution. For performance testing, I usually
> execute DBCC DROPCLEANBUFFERS and DBCC FREEPROCCACHE before each test.
> I don't think the sub-second delay the first time the proc is run is
> anything to be concerned about.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
> message news:6A2A987D-E008-440F-867E-0DE4D6A3AA85@.microsoft.com...
>
>
|||Hello Alistair,
It might be worth remembering that the Assembly (and its dependent assemblies)
still needs to be fetched, verified, JITTed and the app domain created before
the CLR code runs in many cases. That could be why you have a slower initial
startup.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
CLR SP Execution
I am currently working on an application which calls some CLR stored
procedures in SQL Server 2005. The first time one of the CLR stored
procedures (it doesn't matter which one) is called it takes a lot longer to
execute. After the first CLR stored procedure has been executed the CLR
stored procedures all execute in a reasonable amount of time.
I have been unable to find any articles explaining the process that occurs
when a CLR stored procedure is called. I am currently assuming the initial
delay is related to the CLR loading the DLL? Is the CLR loaded with SQL
Server or only when needed?
If anyone can point me in the direction of an article to aid my
understanding or can explain the process I would be grateful.
Thanks in advance.
Alistair HarrisonHow long of a delay do you experience? Do you get the delay with a trivial
proc like the one below? I get a sub-second response when I execute this
after a fresh SQL Server restart.
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void MyProc()
{
Microsoft.SqlServer.Server.SqlContext.Pipe.Send("Test message");
}
};
I'm no expert on SQL CLR internals but I can't think of any overhead beyond
the usual object-specific overhead.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
message news:71A086F6-487F-46FD-B501-A7844F6936E5@.microsoft.com...
> Hello,
> I am currently working on an application which calls some CLR stored
> procedures in SQL Server 2005. The first time one of the CLR stored
> procedures (it doesn't matter which one) is called it takes a lot longer
> to
> execute. After the first CLR stored procedure has been executed the CLR
> stored procedures all execute in a reasonable amount of time.
> I have been unable to find any articles explaining the process that occurs
> when a CLR stored procedure is called. I am currently assuming the initial
> delay is related to the CLR loading the DLL? Is the CLR loaded with SQL
> Server or only when needed?
> If anyone can point me in the direction of an article to aid my
> understanding or can explain the process I would be grateful.
> Thanks in advance.
> Alistair Harrison|||Dan,
Thanks for your response.
The following are examples of execution times recorded by the Client
Statistics when the query is executed:
Initial execution of my original sp: 1600 to 1700 ms
Subsequent execution: <100 ms
Initial execution of your test sp: 700 to 800 ms
Subsequent execution: <50 ms
Another point I noticed was that if the test sp is executed first followed
by my original sp following a restart the original sp takes around 1200 ms to
execute. This is less than the 1600 to 1700 ms it seems to take when
executing the sp first but is still much greater than the subsequent
execution time.
It might be worth mentioning that my original clr sp executes a couple of
tsql sps using a context connection and then returns some xml as an output
parameter.
Thanks,
Alistair
"Dan Guzman" wrote:
> How long of a delay do you experience? Do you get the delay with a trivial
> proc like the one below? I get a sub-second response when I execute this
> after a fresh SQL Server restart.
> public partial class StoredProcedures
> {
> [Microsoft.SqlServer.Server.SqlProcedure]
> public static void MyProc()
> {
> Microsoft.SqlServer.Server.SqlContext.Pipe.Send("Test message");
> }
> };
> I'm no expert on SQL CLR internals but I can't think of any overhead beyond
> the usual object-specific overhead.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
> message news:71A086F6-487F-46FD-B501-A7844F6936E5@.microsoft.com...
> > Hello,
> >
> > I am currently working on an application which calls some CLR stored
> > procedures in SQL Server 2005. The first time one of the CLR stored
> > procedures (it doesn't matter which one) is called it takes a lot longer
> > to
> > execute. After the first CLR stored procedure has been executed the CLR
> > stored procedures all execute in a reasonable amount of time.
> >
> > I have been unable to find any articles explaining the process that occurs
> > when a CLR stored procedure is called. I am currently assuming the initial
> > delay is related to the CLR loading the DLL? Is the CLR loaded with SQL
> > Server or only when needed?
> >
> > If anyone can point me in the direction of an article to aid my
> > understanding or can explain the process I would be grateful.
> >
> > Thanks in advance.
> >
> > Alistair Harrison
>
>|||It's likely that subsequent executions are faster simply a result of data
caching. I'd expect execution times to average about 1200ms if you run DBCC
DROPCLEANBUFFERS before each execution. For performance testing, I usually
execute DBCC DROPCLEANBUFFERS and DBCC FREEPROCCACHE before each test.
I don't think the sub-second delay the first time the proc is run is
anything to be concerned about.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
message news:6A2A987D-E008-440F-867E-0DE4D6A3AA85@.microsoft.com...
> Dan,
> Thanks for your response.
> The following are examples of execution times recorded by the Client
> Statistics when the query is executed:
> Initial execution of my original sp: 1600 to 1700 ms
> Subsequent execution: <100 ms
> Initial execution of your test sp: 700 to 800 ms
> Subsequent execution: <50 ms
> Another point I noticed was that if the test sp is executed first followed
> by my original sp following a restart the original sp takes around 1200 ms
> to
> execute. This is less than the 1600 to 1700 ms it seems to take when
> executing the sp first but is still much greater than the subsequent
> execution time.
> It might be worth mentioning that my original clr sp executes a couple of
> tsql sps using a context connection and then returns some xml as an output
> parameter.
> Thanks,
> Alistair
>
> "Dan Guzman" wrote:
>> How long of a delay do you experience? Do you get the delay with a
>> trivial
>> proc like the one below? I get a sub-second response when I execute this
>> after a fresh SQL Server restart.
>> public partial class StoredProcedures
>> {
>> [Microsoft.SqlServer.Server.SqlProcedure]
>> public static void MyProc()
>> {
>> Microsoft.SqlServer.Server.SqlContext.Pipe.Send("Test message");
>> }
>> };
>> I'm no expert on SQL CLR internals but I can't think of any overhead
>> beyond
>> the usual object-specific overhead.
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
>> message news:71A086F6-487F-46FD-B501-A7844F6936E5@.microsoft.com...
>> > Hello,
>> >
>> > I am currently working on an application which calls some CLR stored
>> > procedures in SQL Server 2005. The first time one of the CLR stored
>> > procedures (it doesn't matter which one) is called it takes a lot
>> > longer
>> > to
>> > execute. After the first CLR stored procedure has been executed the CLR
>> > stored procedures all execute in a reasonable amount of time.
>> >
>> > I have been unable to find any articles explaining the process that
>> > occurs
>> > when a CLR stored procedure is called. I am currently assuming the
>> > initial
>> > delay is related to the CLR loading the DLL? Is the CLR loaded with SQL
>> > Server or only when needed?
>> >
>> > If anyone can point me in the direction of an article to aid my
>> > understanding or can explain the process I would be grateful.
>> >
>> > Thanks in advance.
>> >
>> > Alistair Harrison
>>|||Dan
Thanks again for your response.
I have retested the two stored procedures running DROPCLEANBUFFERS and
FREEPROCCACHE before each execution. The execution times increase slightly
but are still consistently below 300ms.
I suppose as the longer execution only seems to occur following a restart it
is not too much of a worry just intriguing as to why it seems to occur.
Alistair
"Dan Guzman" wrote:
> It's likely that subsequent executions are faster simply a result of data
> caching. I'd expect execution times to average about 1200ms if you run DBCC
> DROPCLEANBUFFERS before each execution. For performance testing, I usually
> execute DBCC DROPCLEANBUFFERS and DBCC FREEPROCCACHE before each test.
> I don't think the sub-second delay the first time the proc is run is
> anything to be concerned about.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
> message news:6A2A987D-E008-440F-867E-0DE4D6A3AA85@.microsoft.com...
> > Dan,
> >
> > Thanks for your response.
> >
> > The following are examples of execution times recorded by the Client
> > Statistics when the query is executed:
> >
> > Initial execution of my original sp: 1600 to 1700 ms
> > Subsequent execution: <100 ms
> >
> > Initial execution of your test sp: 700 to 800 ms
> > Subsequent execution: <50 ms
> >
> > Another point I noticed was that if the test sp is executed first followed
> > by my original sp following a restart the original sp takes around 1200 ms
> > to
> > execute. This is less than the 1600 to 1700 ms it seems to take when
> > executing the sp first but is still much greater than the subsequent
> > execution time.
> >
> > It might be worth mentioning that my original clr sp executes a couple of
> > tsql sps using a context connection and then returns some xml as an output
> > parameter.
> >
> > Thanks,
> >
> > Alistair
> >
> >
> > "Dan Guzman" wrote:
> >
> >> How long of a delay do you experience? Do you get the delay with a
> >> trivial
> >> proc like the one below? I get a sub-second response when I execute this
> >> after a fresh SQL Server restart.
> >>
> >> public partial class StoredProcedures
> >> {
> >> [Microsoft.SqlServer.Server.SqlProcedure]
> >> public static void MyProc()
> >> {
> >> Microsoft.SqlServer.Server.SqlContext.Pipe.Send("Test message");
> >> }
> >> };
> >>
> >> I'm no expert on SQL CLR internals but I can't think of any overhead
> >> beyond
> >> the usual object-specific overhead.
> >>
> >> --
> >> Hope this helps.
> >>
> >> Dan Guzman
> >> SQL Server MVP
> >>
> >> "Alistair Harrison" <AlistairHarrison@.discussions.microsoft.com> wrote in
> >> message news:71A086F6-487F-46FD-B501-A7844F6936E5@.microsoft.com...
> >> > Hello,
> >> >
> >> > I am currently working on an application which calls some CLR stored
> >> > procedures in SQL Server 2005. The first time one of the CLR stored
> >> > procedures (it doesn't matter which one) is called it takes a lot
> >> > longer
> >> > to
> >> > execute. After the first CLR stored procedure has been executed the CLR
> >> > stored procedures all execute in a reasonable amount of time.
> >> >
> >> > I have been unable to find any articles explaining the process that
> >> > occurs
> >> > when a CLR stored procedure is called. I am currently assuming the
> >> > initial
> >> > delay is related to the CLR loading the DLL? Is the CLR loaded with SQL
> >> > Server or only when needed?
> >> >
> >> > If anyone can point me in the direction of an article to aid my
> >> > understanding or can explain the process I would be grateful.
> >> >
> >> > Thanks in advance.
> >> >
> >> > Alistair Harrison
> >>
> >>
> >>
>
>
Wednesday, March 7, 2012
Close to quit working with VS 2005 and SQL Express (Cannot Create Database)
About 2 months ago, with great interest installed VS 2005 beta on my local Windows XP Pro. The SQL Express is running.
I cannot work FULLY on starter kits like Personal Web Site SK or
2) Do we have permissions to create a SQL Database from VS 2005 Beta? I assume not, because at MSDN, there are generic SQL scripts for adding tables to Personal Web site SK and
With very little time available after work, wife and kids, I am spending tons of hours looking to solve these issues (User Instance, Password Quality and this Access Denied) looking at MSDN, Forums etc. I agree that VS 2005 is a great product and there are great tutorials for VS 2005 both at Microsoft and other places (www.learningvisualstudio.net)
But if I cannot create SQL Databases, from VS 2005 interface, what is the use of going ahead and trying to learn these tools?
If somebody has specific answers or links that can resolve the above issues, please post here. If you have similar difficulties and how you overcame them, post them here. Thanks.
================================
Directory lookup for the file D:\Documents and Settings\<local computer name>\my documents\visual studio 2005\WebSites\Lesson07\App_Data\Customers.mdf” failed with the operating system error 5 (Access Denied).
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
User does not have permission to alter database ‘4BE36399-4C49-4103-963D-7F34626E3914’ or the database does not exist.
ALTER DATABASE statement failed.
User does not have permission to alter database ‘4BE36399-4C49-4103-963D-7F34626E3914’ or the database does not exist.
ALTER DATABASE ‘4BE36399-4C49-4103-963D-7F34626E3914’ does not exist. Use sp_helpdb to show available databases.
=================================
If you are connecting to SSE in the main instance, and you are running as a normal user, you might run into the situation you're describing.
If you get a copy of SSEUtil from the web (search for it), you will find it's a great way to figure out what's going on. It's like SQLCmd, but a lot friendlier. And, it works witih both SSE in the main instance and when it runs under your user account as a normal user.
In order, the things to check are:
1.) is SSE running?
2.) are you working in USERInstance mode or normal?
3.) Can you use SSEUtil to connect to and create databases.
Saturday, February 25, 2012
cloneing?
back in order. Right now I have three offices working on the database
locally(no replication going on) At the end of the day I want to get all of
the new data back to the publisher so we can create a new snapshot. I was
told by the software vendor of the interface of the database to clone
without hostnames or supporting records. I am kinda at a loss as to what
that means. I see that I can export the data to another server and choose to
append the data, is that what he meant? Any help would be very much
appreciated.
Curt
I suggest you contact the vendor and ask him exactly what he means. Say you
did a search on BOL one clone, cloning and supporting records and came up
with no results.
If you do a reinitialization you will be prompted to upload the changes from
the subscribers before reinitializing. Perhaps this is what the vendor
meant.
I suggest before you even do this you go through the conflicts table(s)
using the conflict viewer and resolve any conflicts.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Curt Shaffer" <curt@.chilitech.net> wrote in message
news:ch4k8c01hif@.enews3.newsguy.com...
> I have a merge replication that is really fouled up. I need to get things
> back in order. Right now I have three offices working on the database
> locally(no replication going on) At the end of the day I want to get all
of
> the new data back to the publisher so we can create a new snapshot. I was
> told by the software vendor of the interface of the database to clone
> without hostnames or supporting records. I am kinda at a loss as to what
> that means. I see that I can export the data to another server and choose
to
> append the data, is that what he meant? Any help would be very much
> appreciated.
> Curt
>
Clone SQL SERVER question
I am working in a clone of SQL server and I have some question:
NEW SQLSERVER = Copy of OLD SQLSERVER
As the new sql server "NEW SQLSERVER" has the same configuration as
the "OLD SQLSERVER" all the jobs and others setups have still the old
"OLD SQLSERVER" settings. I have already done this operation for the
backups.
update backupset
set machine_name= 'NEW SQLSERVER'
where machine_name = 'OLD SQLSERVER'
what do you advice me to do in order to set up this machine currently
Any suggestion will be appreciate
Ina
Hi
Have you scripted the jobs and changed any references to the old server? Are
there any hard coded references in Stored procedure, triggers, views etc?
DTS packages can be exported using the DTS Backup tool
http://www.sqldts.com/default.aspx?242
Are you using replication?
If the server is not on the same domain or if you had local accounts for
logins, you will have to change them see
http://support.microsoft.com/kb/246133/. It may be necessary to also change
orphaned users http://support.microsoft.com/kb/274188/
John
"ina" wrote:
> Hello Guys,
> I am working in a clone of SQL server and I have some question:
> NEW SQLSERVER = Copy of OLD SQLSERVER
> As the new sql server "NEW SQLSERVER" has the same configuration as
> the "OLD SQLSERVER" all the jobs and others setups have still the old
> "OLD SQLSERVER" settings. I have already done this operation for the
> backups.
> update backupset
> set machine_name= 'NEW SQLSERVER'
> where machine_name = 'OLD SQLSERVER'
> what do you advice me to do in order to set up this machine currently
> Any suggestion will be appreciate
> Ina
>
|||Thanks John,
I haven't done anything concerning replication, views and triggers in
the old server, I had only setup up backups and maintenance plans.
Thanks for this documents I will get through.
Ina
Thank you a lot for all
John Bell wrote:[vbcol=seagreen]
> Hi
> Have you scripted the jobs and changed any references to the old server? Are
> there any hard coded references in Stored procedure, triggers, views etc?
> DTS packages can be exported using the DTS Backup tool
> http://www.sqldts.com/default.aspx?242
> Are you using replication?
> If the server is not on the same domain or if you had local accounts for
> logins, you will have to change them see
> http://support.microsoft.com/kb/246133/. It may be necessary to also change
> orphaned users http://support.microsoft.com/kb/274188/
>
> John
> "ina" wrote:
Clone SQL SERVER question
I am working in a clone of SQL server and I have some question:
NEW SQLSERVER = Copy of OLD SQLSERVER
As the new sql server "NEW SQLSERVER" has the same configuration as
the "OLD SQLSERVER" all the jobs and others setups have still the old
"OLD SQLSERVER" settings. I have already done this operation for the
backups.
update backupset
set machine_name= 'NEW SQLSERVER'
where machine_name = 'OLD SQLSERVER'
what do you advice me to do in order to set up this machine currently
Any suggestion will be appreciate
InaHi
Have you scripted the jobs and changed any references to the old server? Are
there any hard coded references in Stored procedure, triggers, views etc?
DTS packages can be exported using the DTS Backup tool
http://www.sqldts.com/default.aspx?242
Are you using replication?
If the server is not on the same domain or if you had local accounts for
logins, you will have to change them see
http://support.microsoft.com/kb/246133/. It may be necessary to also change
orphaned users http://support.microsoft.com/kb/274188/
John
"ina" wrote:
> Hello Guys,
> I am working in a clone of SQL server and I have some question:
> NEW SQLSERVER = Copy of OLD SQLSERVER
> As the new sql server "NEW SQLSERVER" has the same configuration as
> the "OLD SQLSERVER" all the jobs and others setups have still the old
> "OLD SQLSERVER" settings. I have already done this operation for the
> backups.
> update backupset
> set machine_name= 'NEW SQLSERVER'
> where machine_name = 'OLD SQLSERVER'
> what do you advice me to do in order to set up this machine currently
> Any suggestion will be appreciate
> Ina
>|||Thanks John,
I haven't done anything concerning replication, views and triggers in
the old server, I had only setup up backups and maintenance plans.
Thanks for this documents I will get through.
Ina
Thank you a lot for all
John Bell wrote:
> Hi
> Have you scripted the jobs and changed any references to the old server? Are
> there any hard coded references in Stored procedure, triggers, views etc?
> DTS packages can be exported using the DTS Backup tool
> http://www.sqldts.com/default.aspx?242
> Are you using replication?
> If the server is not on the same domain or if you had local accounts for
> logins, you will have to change them see
> http://support.microsoft.com/kb/246133/. It may be necessary to also change
> orphaned users http://support.microsoft.com/kb/274188/
>
> John
> "ina" wrote:
> > Hello Guys,
> >
> > I am working in a clone of SQL server and I have some question:
> >
> > NEW SQLSERVER = Copy of OLD SQLSERVER
> >
> > As the new sql server "NEW SQLSERVER" has the same configuration as
> > the "OLD SQLSERVER" all the jobs and others setups have still the old
> > "OLD SQLSERVER" settings. I have already done this operation for the
> > backups.
> >
> > update backupset
> > set machine_name= 'NEW SQLSERVER'
> > where machine_name = 'OLD SQLSERVER'
> >
> > what do you advice me to do in order to set up this machine currently
> >
> > Any suggestion will be appreciate
> >
> > Ina
> >
> >
Clone SQL SERVER question
I am working in a clone of SQL server and I have some question:
NEW SQLSERVER = Copy of OLD SQLSERVER
As the new sql server "NEW SQLSERVER" has the same configuration as
the "OLD SQLSERVER" all the jobs and others setups have still the old
"OLD SQLSERVER" settings. I have already done this operation for the
backups.
update backupset
set machine_name= 'NEW SQLSERVER'
where machine_name = 'OLD SQLSERVER'
what do you advice me to do in order to set up this machine currently
Any suggestion will be appreciate
InaHi
Have you scripted the jobs and changed any references to the old server? Are
there any hard coded references in Stored procedure, triggers, views etc?
DTS packages can be exported using the DTS Backup tool
http://www.sqldts.com/default.aspx?242
Are you using replication?
If the server is not on the same domain or if you had local accounts for
logins, you will have to change them see
http://support.microsoft.com/kb/246133/. It may be necessary to also change
orphaned users http://support.microsoft.com/kb/274188/
John
"ina" wrote:
> Hello Guys,
> I am working in a clone of SQL server and I have some question:
> NEW SQLSERVER = Copy of OLD SQLSERVER
> As the new sql server "NEW SQLSERVER" has the same configuration as
> the "OLD SQLSERVER" all the jobs and others setups have still the old
> "OLD SQLSERVER" settings. I have already done this operation for the
> backups.
> update backupset
> set machine_name= 'NEW SQLSERVER'
> where machine_name = 'OLD SQLSERVER'
> what do you advice me to do in order to set up this machine currently
> Any suggestion will be appreciate
> Ina
>|||Thanks John,
I haven't done anything concerning replication, views and triggers in
the old server, I had only setup up backups and maintenance plans.
Thanks for this documents I will get through.
Ina
Thank you a lot for all
John Bell wrote:[vbcol=seagreen]
> Hi
> Have you scripted the jobs and changed any references to the old server? A
re
> there any hard coded references in Stored procedure, triggers, views etc?
> DTS packages can be exported using the DTS Backup tool
> http://www.sqldts.com/default.aspx?242
> Are you using replication?
> If the server is not on the same domain or if you had local accounts for
> logins, you will have to change them see
> http://support.microsoft.com/kb/246133/. It may be necessary to also chang
e
> orphaned users http://support.microsoft.com/kb/274188/
>
> John
> "ina" wrote:
>
Client-side Redirect problem
Hi there.
I have a database mirroring session running, and both principal and mirror are working fine. But when i unplug the network cable from principal server, creating a failover scenario, the client doesn′t get redirected to the mirror.
I get an error saying: "A transport-level error has ocurred when received results from the server. The specified network name is no longer available."
connection = "Data Source=SISAD;Failover Partner=Projecto-SWS1;Initial Catalog=SIERE;Persist Security Info=True;User ID=sa;Password=testing;Connection Timeout=100";
//this method is called many times by a thread, emulating some request to the server
public static void Inserir(int codAutor)
{
SqlConnection sqlConnection = new SqlConnection(connection);
SqlCommand command = new SqlCommand("insert into Autor values(@.codAutor,'test')", sqlConnection);
command.CommandType = CommandType.Text;
command.Parameters.AddWithValue("@.codAutor", codAutor.ToString());
command.CommandTimeout = 200;
sqlConnection.Open();
command.ExecuteNonQuery();
sqlConnection.Close();
}
I think the error is because the ExecuteNonQuery() method return info about the rows affected on the server. But in this case how can i create a failover scenario with client-side redirect ?
Thanks in advance.
I think i′ve resolved the problem...
The issue here is that connections are separated into pools by connection string, when using ADO.NET connection pooling.
It seems that when failover occurs, the attempts to reconnect to the database are retrieving connections from the pool, and the datasource is still the failed principal and not the new principal.
I deactivated connection pooling, and now the clients are connecting to the mirror when when principal fails.
Can someone give me some feedback about this ? It′s seems that i can′t use connection pooling when using client-side redirect.
|||Hi RDSC,
I believe your assessment is correct. The logic to failover to the partner server only occurs when a new connection is established. Rather than disabling connection pooling altogether, you can clear this individual pool (I believe that there is a clearpool connection property that you can set) and should see the connections succeed. If you do try this, please let me know how it turns out.
Thanks,
Il-Sung
Program Manager, SQL Server Protocols.
Hi there.
You are allright. In my code i can see if there is a connection error, and than set clearpool property. Next time the connection will try to connect to the new principal. So connection pooling can be used with client side redirect.
There is something you should be aware. If clearpool property is used, the state of the connection changes to "Closed", because connections from the pool are set to be discarded, so if you still want to use that connection, you have to open it again.
Thanks for you help Sung Lee.
Client-side Redirect problem
Hi there.
I have a database mirroring session running, and both principal and mirror are working fine. But when i unplug the network cable from principal server, creating a failover scenario, the client doesn′t get redirected to the mirror.
I get an error saying: "A transport-level error has ocurred when received results from the server. The specified network name is no longer available."
connection = "Data Source=SISAD;Failover Partner=Projecto-SWS1;Initial Catalog=SIERE;Persist Security Info=True;User ID=sa;Password=testing;Connection Timeout=100";
//this method is called many times by a thread, emulating some request to the server
public static void Inserir(int codAutor)
{
SqlConnection sqlConnection = new SqlConnection(connection);
SqlCommand command = new SqlCommand("insert into Autor values(@.codAutor,'test')", sqlConnection);
command.CommandType = CommandType.Text;
command.Parameters.AddWithValue("@.codAutor", codAutor.ToString());
command.CommandTimeout = 200;
sqlConnection.Open();
command.ExecuteNonQuery();
sqlConnection.Close();
}
I think the error is because the ExecuteNonQuery() method return info about the rows affected on the server. But in this case how can i create a failover scenario with client-side redirect ?
Thanks in advance.
I think i′ve resolved the problem...
The issue here is that connections are separated into pools by connection string, when using ADO.NET connection pooling.
It seems that when failover occurs, the attempts to reconnect to the database are retrieving connections from the pool, and the datasource is still the failed principal and not the new principal.
I deactivated connection pooling, and now the clients are connecting to the mirror when when principal fails.
Can someone give me some feedback about this ? It′s seems that i can′t use connection pooling when using client-side redirect.
|||Hi RDSC,
I believe your assessment is correct. The logic to failover to the partner server only occurs when a new connection is established. Rather than disabling connection pooling altogether, you can clear this individual pool (I believe that there is a clearpool connection property that you can set) and should see the connections succeed. If you do try this, please let me know how it turns out.
Thanks,
Il-Sung
Program Manager, SQL Server Protocols.
Hi there.
You are allright. In my code i can see if there is a connection error, and than set clearpool property. Next time the connection will try to connect to the new principal. So connection pooling can be used with client side redirect.
There is something you should be aware. If clearpool property is used, the state of the connection changes to "Closed", because connections from the pool are set to be discarded, so if you still want to use that connection, you have to open it again.
Thanks for you help Sung Lee.
Client-side printing from NT with SP2
fine for our users on XP/IE6. However, we have some users with NT4/IE6 on
their machines. They are able to view reports, but when they click the Print
icon, nothing happens (no error, no prompt, nothing).
Is the ActiveX control for printing included in SP2 supported for clients
using NT4?Ah, crap...
Same here. That's a show stopper!!!
"MELMEL" <MELMEL@.discussions.microsoft.com> wrote in message
news:DDFF5917-13B1-44D2-8138-EB44818B579D@.microsoft.com...
> We have installed SP2 and client-side printing from the browser is working
> fine for our users on XP/IE6. However, we have some users with NT4/IE6 on
> their machines. They are able to view reports, but when they click the
> icon, nothing happens (no error, no prompt, nothing).
> Is the ActiveX control for printing included in SP2 supported for clients
> using NT4?|||When a product is given end of lifetime that really does mean that. It might
work or it might not but MS spends 0 time testing with it. It is not part of
their test suite. Extended support expired almost a year ago. I assume the
users can continute to export to PDF and print that way.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Fredrick Bartlett" <rick_bartlett@.WeDoNET.net> wrote in message
news:Os2pNyPUFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Ah, crap...
> Same here. That's a show stopper!!!
> "MELMEL" <MELMEL@.discussions.microsoft.com> wrote in message
> news:DDFF5917-13B1-44D2-8138-EB44818B579D@.microsoft.com...
> > We have installed SP2 and client-side printing from the browser is
working
> > fine for our users on XP/IE6. However, we have some users with NT4/IE6
on
> > their machines. They are able to view reports, but when they click the
> > icon, nothing happens (no error, no prompt, nothing).
> >
> > Is the ActiveX control for printing included in SP2 supported for
clients
> > using NT4?
>|||We didn't test on NT4. We tested on XP, Win 2003, Win 2000, Win 98 and
WinME.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:O8w1aIYUFHA.580@.TK2MSFTNGP15.phx.gbl...
> When a product is given end of lifetime that really does mean that. It
> might
> work or it might not but MS spends 0 time testing with it. It is not part
> of
> their test suite. Extended support expired almost a year ago. I assume the
> users can continute to export to PDF and print that way.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Fredrick Bartlett" <rick_bartlett@.WeDoNET.net> wrote in message
> news:Os2pNyPUFHA.3184@.TK2MSFTNGP15.phx.gbl...
>> Ah, crap...
>> Same here. That's a show stopper!!!
>> "MELMEL" <MELMEL@.discussions.microsoft.com> wrote in message
>> news:DDFF5917-13B1-44D2-8138-EB44818B579D@.microsoft.com...
>> > We have installed SP2 and client-side printing from the browser is
> working
>> > fine for our users on XP/IE6. However, we have some users with NT4/IE6
> on
>> > their machines. They are able to view reports, but when they click the
>> > icon, nothing happens (no error, no prompt, nothing).
>> >
>> > Is the ActiveX control for printing included in SP2 supported for
> clients
>> > using NT4?
>>
>
Tuesday, February 14, 2012
client connection prblm
i hav just startd working with sql server 2000, i hav two systems, in 1 system i have installed server tools n other i installed client tools, now the prblm when i registrd a server frm client, it detect the server but then unable to connect with server the prblm it gives is invalid login
sever\guest
although i have login wid administrator from both system
plz any1 there to solve my prblm
thanks in advance
You are connecting using Windows credentials. That means you have to be logged in with Windows credentials that are valid on your SQL Server. If you simply logged in under the local administrator account, you will not be able to connect to the remote instance, because the SID of the local administrator account is not valid on any other machine.|||thanx for reply
but i still doesnt got ur point if u can explain ur answer a bit
|||Local Administrator means that you are an administrator on the single machine that you are logging into. If you are physically logging into the machine with the built in account of Administrator, that means your Windows account is for that machine, only that machine, and no other machine in your entire network will understand what that account is nor will it allow you to access any other resource outside of the machine that you are logged into. If you are going to connect to a SQL Server on a different machine, using Windows credentials, then you MUST be logging into a machine using a domain account that has been granted access to the SQL Server.|||Also for informaton refer to KBA http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q328306 in this case.Sunday, February 12, 2012
Client alias on 64bit server
alias working correctly before when os was 32bit but now we have gone to
64bit i can't get any aliases to work.
I've tried configuring exactly the same alias on a 32bit machine and that
works but if the server is 64bit then no joy, even if try to create an alias
to the local 64but machine.
Any help would be gratefully appreciated.
Same problem here with XP 64. I've tried both 2000 and 2005 with the same
problem. It simply ignores the port and goes for 1433. Oddly enough, ODBC
worked (setting the port on the second screen).
"Adam Shepherd" <Adam Shepherd@.discussions.microsoft.com> wrote in message
news:95F13D92-FBC9-4FD9-8C0B-AB4D3EF8370F@.microsoft.com...
> We have just upgraded a 32bit server to 64bit Windows 2003, we had client
> alias working correctly before when os was 32bit but now we have gone to
> 64bit i can't get any aliases to work.
> I've tried configuring exactly the same alias on a 32bit machine and that
> works but if the server is 64bit then no joy, even if try to create an
> alias
> to the local 64but machine.
> Any help would be gratefully appreciated.
|||I've done a bit of playing around and i think what's happening is that the
alias is being written to the 32bit registry but sql server is trying to read
from the 64bit registry. If i create an entry in the 64bit registry then
alias works ok. The registry keys are:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ MSSQLServer\Client\ConnectTo
and:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Client\ConnectTo
Looks like an issue with SQL Server, but if the key is in boht locations
then aliases work.
hope that helps,
Adam
"Scott Wallace" wrote:
> Same problem here with XP 64. I've tried both 2000 and 2005 with the same
> problem. It simply ignores the port and goes for 1433. Oddly enough, ODBC
> worked (setting the port on the second screen).
>
> "Adam Shepherd" <Adam Shepherd@.discussions.microsoft.com> wrote in message
> news:95F13D92-FBC9-4FD9-8C0B-AB4D3EF8370F@.microsoft.com...
>
>
ClickOnce private installation issue
I'm working on a VB.Net 2005 application that uses SQLCE as a backend database.
Following the instructions on how to do a private installation (http://msdn2.microsoft.com/en-us/librar
"Unable to install or run the application. Application requires that assembly System.Data.SQLServerCe version 9.0.42 .... must be installed in the Global Assembly Cache."
Basically it's saying the user isn't an admin so they can't install. This is the problem I went to great lengths to try to avoid, and is the reason we are using SQL CE in the first place: admin rights are not required to install our application's database. To our knowledge, SQL CE is the only Microsoft product that fits this scenario.
Now, I haven't changed anything in the publishing of the application to my knowledge, and when I check the project prerequisites, the SQLCE engine still isn't in there (as summarized at the above URL). Again following the instructions at the URL above for private installation, the required assemblies are still part of the project's files.
It must be something I did to cause this, but I have no memory of changing anything in regards to this part of the application. Our deadline is in 4 days and I cannot continue development until I get past this issue.
Where do I look to fix this problem? A little help would be greatly appreciated.
It is currently unknown as to what caused this problem and the fix may be a kludge. However, we have made some changes after much agonizing, and the application now installs with a newly-created standard user account on Windows XP. After seeing what we did to fix this issue below, any further comments are still appreciated, since we're working with a db system that's only a few months old, and which is not documented with the same rigor as most Microsoft products.
Upon checking the Prerequisites for our application (at Project Properties | Publish | Prerequisites), we saw that not only was SQL CE not selected as a prerequisite, it was not even listed as something we could deselect. Yet, it was still being configured to be installed into the GAC by the ClickOnce engine. Earlier in the development process, perhaps three weeks ago, it did appear in the prerequisites list, and was explicitly deselected. But now it had... disappeared.
However, upon checking what would be installed at Project Properties | Publish | Application Files, we saw that indeed, System.Data.SQLServerCE.dll was being included in the install, and its Publish Status was set as Prerequisite(Auto). Certainly we did not explicitly make this setting, and we are still unable to explain how it happened. Add to this that it could not be deselected on the Prerequisites tab, and you begin to understand the confusion surrounding this issue. (NOTE: we found this same problem with the Microsoft Visual Studio Report Viewer.)
Our first cut at a fix did not work: we changed the Publish status on each item listed as Prerequisite(Auto) to Exclude. The deployment completed without error, but after installation the application could not find required code to execute correctly, and threw unhandled errors at runtime.
Our second try at a fix is where we are now: we changed all items (except Framework 2.0) formerly listed as Prerequisite(Auto) to Include. Interestingly, those items that would not install as prerequisites without Administrator permissions, would now install without error. The last error to be cleared concerned the data file itself.
During our application deployment, we wanted to copy the .sdf database to the program folder. We reference it in code without a fully qualified path, due to the expectation that the database file will be in the same directory as the application executable. However, after clearing the errors described above, we had one last problem to fix: the database file was not found after installation. Checking, we saw that the ClickOnce engine automatically copies the database file to a different folder than the rest of the application files. So, we returned yet again to the Application Files list at Project Properties | Publish, and found that something Auto was happening with our database as well: its Publish Status was listed as Data File(Auto). Taking yet another wild guess, we changed it to Include. Lo, behold and voila, everything now works.
The very unfortunate issues here are 1) that we don't know why it didn't work in the first place, 2) we don't know what happened to change what we thought were correct settings for publication, and 3) we don't know whay what we did to fix the problems worked. To wit, nothing makes logical sense at this point.
We don't know whether any of the things we went through should be classed as bugs in either ClickOnce, Visual Studio, or anything else. Admittedly we are rather over our heads using several technologies for the first time. However, it needs to be said: at best, the documentation for this deployment scenario is sadly lacking (or just plain wrong). At worst, this deployment scenario is not supported by default, and it takes several arcane spells and a lot of wing of bat and eye of newt due to bugs in the system.
At any rate, I hope this tale of woe may help others who may be doing this for the first time.
ClickOnce for SQL Express Database?
I'm working on an app in Visual Studio 2005 that needs to have installed locally SQL Express to handle its own data.
This app is in a strong upgrading process. I've been using clickonce to publish the app and let my users upgrade automatically (by the way this works amazing ...).
Yet many times changes to the DB are made. Is there a simple way to upgrade their local SQL Express DB like click once does with the app?
Thanks.
hi,
I'm not sure about click once capability to perform the requested task, but even if possible, are you sure you like to do it? that means you would upgrade users database loosing their data modifications... I do think you've better just "upgrade" the database schema and not replace their database...
if this is the case, you can perhaps have a look at syncornization tools like http://www.red-gate.com/products/SQL_Compare/index.htm..
regards
|||Thanks, the products looks like a very good solution. I've already downloaded it and I'm testing.
Have you used it yourself? Do you know other products that do the same?
|||hi,
yes, I do use it myself since versions 2...
I know other similar tools are available out there, like http://www.innovartis.co.uk/database_dbghost_home.aspx, but I've always been satisfied by red-gate tools.. they even provides http://www.red-gate.com/products/SQL_Packager/index.htm, base on SQL Compare tool, to just distribute an exe packaged file that, at run time, will perform the metadata updates for you..
but here we are in advertising mode
BTW, I'm not involved in any way with the reported products/company, I'm just a user as you could be..
for further info, a free comparison tool is available at http://www.absistemi.it/sqlCompare.aspx by another italian SQL Server MVP fellow, but I'm not sure it has been updated for SQL Server 2005...
regards
|||Grazie tante ...|||prego...
(you're welcome)
Friday, February 10, 2012
Clearing a Table
you have not mentioned the error. Anyhow, the possible problems are either Permission or the table which you are deleting may have child tables which referencing this table. Check the permision first. For reference issue delete the child tables data first and then delete the master table
Madhu
|||Most likely, you have a relationship (PK-FK) established between this table and another. (But, as Madhu suggested, it could also be a permission issue.)
Please post the entire error message so that we can better assit you.