Showing posts with label similar. Show all posts
Showing posts with label similar. Show all posts

Friday, March 30, 2012

Recovery of Database 'xxx' (Complete in 68,395 more seconds)

I'm having a problem with a SQL Server. Every time I stop and restart the
SQL Server service I get a message similar to this one. What do I have to
do to force checkpoints during the load process? ThanksP.S. - The message is coming up in the Application Event Log during the
recovery process after I start the server. I found a quote on the MS
Website stating I "may need to 'Troubleshoot the Recovery Process'", but I
can't find anything more specific than that. Can someone point me in the
right direction? Thanks
"Michael C#" <xyz@.yomomma.com> wrote in message
news:%23G$j92yKFHA.2284@.TK2MSFTNGP10.phx.gbl...
> I'm having a problem with a SQL Server. Every time I stop and restart the
> SQL Server service I get a message similar to this one. What do I have to
> do to force checkpoints during the load process? Thanks
>|||How is the data being loaded?
--
Simon Worth
Michael C# wrote:
> I'm having a problem with a SQL Server. Every time I stop and restart the
> SQL Server service I get a message similar to this one. What do I have to
> do to force checkpoints during the load process? Thanks
>|||On this particular box they're using Bulk Insert.
"Simon Worth" <REMOVEFIRST_simon.worth@.gmail.com> wrote in message
news:%23e3nP%23yKFHA.1284@.TK2MSFTNGP14.phx.gbl...
> How is the data being loaded?
> --
> Simon Worth
> Michael C# wrote:
>> I'm having a problem with a SQL Server. Every time I stop and restart
>> the SQL Server service I get a message similar to this one. What do I
>> have to do to force checkpoints during the load process? Thanks|||What is the relation between the load and stopping SQL Server? Also, have you change the recovery
interval setting with sp_configure?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Michael C#" <xyz@.yomomma.com> wrote in message news:ON8LT$yKFHA.1600@.TK2MSFTNGP10.phx.gbl...
> On this particular box they're using Bulk Insert.
> "Simon Worth" <REMOVEFIRST_simon.worth@.gmail.com> wrote in message
> news:%23e3nP%23yKFHA.1284@.TK2MSFTNGP14.phx.gbl...
>> How is the data being loaded?
>> --
>> Simon Worth
>> Michael C# wrote:
>> I'm having a problem with a SQL Server. Every time I stop and restart the SQL Server service I
>> get a message similar to this one. What do I have to do to force checkpoints during the load
>> process? Thanks
>|||Today was the first time we've stopped this SQL Server since we started
loading it. The load was completed. No, I haven't changed the recovery
interval; I'll take a look at it today. What setting would you recommend?
Thanks
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23IUlVr4KFHA.4032@.TK2MSFTNGP14.phx.gbl...
> What is the relation between the load and stopping SQL Server? Also, have
> you change the recovery interval setting with sp_configure?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Michael C#" <xyz@.yomomma.com> wrote in message
> news:ON8LT$yKFHA.1600@.TK2MSFTNGP10.phx.gbl...
>> On this particular box they're using Bulk Insert.
>> "Simon Worth" <REMOVEFIRST_simon.worth@.gmail.com> wrote in message
>> news:%23e3nP%23yKFHA.1284@.TK2MSFTNGP14.phx.gbl...
>> How is the data being loaded?
>> --
>> Simon Worth
>> Michael C# wrote:
>> I'm having a problem with a SQL Server. Every time I stop and restart
>> the SQL Server service I get a message similar to this one. What do I
>> have to do to force checkpoints during the load process? Thanks
>>
>

Recovery of Database 'xxx' (Complete in 68,395 more seconds)

I'm having a problem with a SQL Server. Every time I stop and restart the
SQL Server service I get a message similar to this one. What do I have to
do to force checkpoints during the load process? Thanks
P.S. - The message is coming up in the Application Event Log during the
recovery process after I start the server. I found a quote on the MS
Website stating I "may need to 'Troubleshoot the Recovery Process'", but I
can't find anything more specific than that. Can someone point me in the
right direction? Thanks
"Michael C#" <xyz@.yomomma.com> wrote in message
news:%23G$j92yKFHA.2284@.TK2MSFTNGP10.phx.gbl...
> I'm having a problem with a SQL Server. Every time I stop and restart the
> SQL Server service I get a message similar to this one. What do I have to
> do to force checkpoints during the load process? Thanks
>
|||How is the data being loaded?
Simon Worth
Michael C# wrote:
> I'm having a problem with a SQL Server. Every time I stop and restart the
> SQL Server service I get a message similar to this one. What do I have to
> do to force checkpoints during the load process? Thanks
>
|||On this particular box they're using Bulk Insert.
"Simon Worth" <REMOVEFIRST_simon.worth@.gmail.com> wrote in message
news:%23e3nP%23yKFHA.1284@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> How is the data being loaded?
> --
> Simon Worth
> Michael C# wrote:
|||What is the relation between the load and stopping SQL Server? Also, have you change the recovery
interval setting with sp_configure?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Michael C#" <xyz@.yomomma.com> wrote in message news:ON8LT$yKFHA.1600@.TK2MSFTNGP10.phx.gbl...
> On this particular box they're using Bulk Insert.
> "Simon Worth" <REMOVEFIRST_simon.worth@.gmail.com> wrote in message
> news:%23e3nP%23yKFHA.1284@.TK2MSFTNGP14.phx.gbl...
>
|||Today was the first time we've stopped this SQL Server since we started
loading it. The load was completed. No, I haven't changed the recovery
interval; I'll take a look at it today. What setting would you recommend?
Thanks
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23IUlVr4KFHA.4032@.TK2MSFTNGP14.phx.gbl...
> What is the relation between the load and stopping SQL Server? Also, have
> you change the recovery interval setting with sp_configure?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Michael C#" <xyz@.yomomma.com> wrote in message
> news:ON8LT$yKFHA.1600@.TK2MSFTNGP10.phx.gbl...
>
sql

Recovery of Database 'xxx' (Complete in 68,395 more seconds)

I'm having a problem with a SQL Server. Every time I stop and restart the
SQL Server service I get a message similar to this one. What do I have to
do to force checkpoints during the load process? ThanksP.S. - The message is coming up in the Application Event Log during the
recovery process after I start the server. I found a quote on the MS
Website stating I "may need to 'Troubleshoot the Recovery Process'", but I
can't find anything more specific than that. Can someone point me in the
right direction? Thanks
"Michael C#" <xyz@.yomomma.com> wrote in message
news:%23G$j92yKFHA.2284@.TK2MSFTNGP10.phx.gbl...
> I'm having a problem with a SQL Server. Every time I stop and restart the
> SQL Server service I get a message similar to this one. What do I have to
> do to force checkpoints during the load process? Thanks
>|||How is the data being loaded?
Simon Worth
Michael C# wrote:
> I'm having a problem with a SQL Server. Every time I stop and restart the
> SQL Server service I get a message similar to this one. What do I have to
> do to force checkpoints during the load process? Thanks
>|||On this particular box they're using Bulk Insert.
"Simon Worth" <REMOVEFIRST_simon.worth@.gmail.com> wrote in message
news:%23e3nP%23yKFHA.1284@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> How is the data being loaded?
> --
> Simon Worth
> Michael C# wrote:|||What is the relation between the load and stopping SQL Server? Also, have yo
u change the recovery
interval setting with sp_configure?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Michael C#" <xyz@.yomomma.com> wrote in message news:ON8LT$yKFHA.1600@.TK2MSFTNGP10.phx.gbl..
.
> On this particular box they're using Bulk Insert.
> "Simon Worth" <REMOVEFIRST_simon.worth@.gmail.com> wrote in message
> news:%23e3nP%23yKFHA.1284@.TK2MSFTNGP14.phx.gbl...
>|||Today was the first time we've stopped this SQL Server since we started
loading it. The load was completed. No, I haven't changed the recovery
interval; I'll take a look at it today. What setting would you recommend?
Thanks
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23IUlVr4KFHA.4032@.TK2MSFTNGP14.phx.gbl...
> What is the relation between the load and stopping SQL Server? Also, have
> you change the recovery interval setting with sp_configure?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Michael C#" <xyz@.yomomma.com> wrote in message
> news:ON8LT$yKFHA.1600@.TK2MSFTNGP10.phx.gbl...
>

Tuesday, March 20, 2012

Recover Image From SQL Server CE Database

Hello,

Im using the same DB used in northwindoledb example, i need a similar app but in C#, not C++, so i use this DB and make a form for Pocket PC 2003 SE Emulator in Vista (device application) with visual studio 2005, i use a function to recover the image and display in a PictureBox but when this image create a BitMap give me an error "Value does not fall within the expected range.", i seek a lot in internet and don't find a solution, the function is:

public static Image Bytes2Image(byte[] bytes)

{

if (bytes == null) return null;

MemoryStream ms = new MemoryStream(bytes,0,bytes.Length );

Bitmap bm = null;

ms.Read(bytes, 0, bytes.Length);

bm = new Bitmap(ms);

return bm;

}

If someone can help me i will appreciatte

How about:

Code Snippet

public System.Drawing.Image BytesToImage(byte[] bytes)

{

if (bytes == null) return null;

System.IO.MemoryStream ms = new System.IO.MemoryStream(bytes);

return System.Drawing.Image.FromStream(ms);

}

|||

Erik,

System.Drawing.Image.FromStream(ms);

Don't exist in Compact Framework, all post suggest the use of new Bitmap(ms) instead, but this code give the error... Other user have similar error but cannot find the solution, the C++ version of the program work ok in the emulator, but in C# don't work (i'm using different aproach, i don't understand C++), some have a similar program in C# than manipulate images from SQL 2005 CE for Pocket PC?

Recover Image From SQL Server CE Database

Hello,

Im using the same DB used in northwindoledb example, i need a similar app but in C#, not C++, so i use this DB and make a form for Pocket PC 2003 SE Emulator in Vista (device application) with visual studio 2005, i use a function to recover the image and display in a PictureBox but when this image create a BitMap give me an error "Value does not fall within the expected range.", i seek a lot in internet and don't find a solution, the function is:

public static Image Bytes2Image(byte[] bytes)

{

if (bytes == null) return null;

MemoryStream ms = new MemoryStream(bytes,0,bytes.Length );

Bitmap bm = null;

ms.Read(bytes, 0, bytes.Length);

bm = new Bitmap(ms);

return bm;

}

If someone can help me i will appreciatte

How about:

Code Snippet

public System.Drawing.Image BytesToImage(byte[] bytes)

{

if (bytes == null) return null;

System.IO.MemoryStream ms = new System.IO.MemoryStream(bytes);

return System.Drawing.Image.FromStream(ms);

}

|||

Erik,

System.Drawing.Image.FromStream(ms);

Don't exist in Compact Framework, all post suggest the use of new Bitmap(ms) instead, but this code give the error... Other user have similar error but cannot find the solution, the C++ version of the program work ok in the emulator, but in C# don't work (i'm using different aproach, i don't understand C++), some have a similar program in C# than manipulate images from SQL 2005 CE for Pocket PC?

Saturday, February 25, 2012

Records NOT in OTHER table - SELECT statement

I am trying to compare 2 tables with similar data. One table has a field named [X Sent] and the other table has a field named [X Setup]. I was trying to extract all of the fields in Table 1 with field [X Sent] that are not yet in Table 2, i.e. field [X Setup]. I was trying some LEFT JOINS and other stuff but I can't seem to get the syntax correct. How can I get a query of only the fields that are not in Table 2, but are in Table 1?

Here are two of my attempts:

SELECT [X Sent], [X Date]
FROM [Table 1]
WHERE ([X Sent] NOT IN
(SELECT [Table 1].[X Sent]
FROM [Table 2] INNER JOIN
[Table 1] ON [Table 2].[X Setup]= [Table 1].[X Sent]))

I don't believe 'NOT IN' is proper syntax!

And my other attempt:

SELECT [Table 1].[X Sent]
FROM [Table 1] LEFT OUTER JOIN
[Table 2] ON [Table 2].[X Setup]= [Table 1].[X Sent]

Any help would greatly be appreciated.An outer join, checking for NULL in [Table 2] will do it.


SELECT [X Sent],[X Date] FROM
[Table 1] t1 LEFT OUTER JOIN [Table 2] t2 ON t1.[X Sent]=t2.[X Setup]
WHERE t2.[X Setup] IS NULL
|||Thanks once again Douglas Reilly!!!!

Greatly appreciative...|||After analyzing the data further, I have noticed that I can't only compare one field, but rather two from each table. I have been trying to work with the following statement, but I can't seem to get it to work. To start off with, I would like to capture all the fields where Field1 and Field2 from Table1 equals Field1 and Field2 of Table2.

SELECT [Field1], [Field2]
FROM Table1 t1 INNER JOIN
Table2 t2 ON t1.Field1 = t2.Field1 AND t1.Field2 = t2.Field2

Once I figure this part out, I will go ahead and search for all of these tuples not in the other table. Your assistance will greatly be appreciated.|||You should pick one of your candidate keys to be the primary key of Table1. Then you can do this:

select * from Table1
where Table1PrimaryKey not in
(select Table1PrimaryKey from Table1
inner join Table2 on Table1.Field1=Table2.Field1 and Table1.Field2=Table2.Field2)

If for some reason you really need the fields, you can use this:

select Table1.Field1, Table1.Field2
from Table1
inner join Table2 on Table1.Field1=Table2.Field1 and Table1.Field2=Table2.Field2