Showing posts with label returns. Show all posts
Showing posts with label returns. Show all posts

Tuesday, March 6, 2012

64-bit Restore via 32-bit GUI

Hello all,
I'm trying to use the 32-bit GUI, on a remote server, to restore a database
on one of our 64-bit servers. The GUI returns a prompt that the restore was
successful but the GUI indicates that the database is in a Loading mode. I
tried to issue a recovery command but it fails saying that some of the files
were partially restored.
I figured that there is a problem using the 32-bit client utility so I used
OSQL, via SQL Server Agent, on the 64-bit to ensure that I was using a
compatible 64-bit utility. By doing so, I was able to restore the database
successfully.
So my question is, is not being able to restore a 64-bit database via a
32-bit GUI, on a remote server, a known issue?
Thanks...Not that I'm aware of. EM is simply building the restore command and
sending it to the server. Try it again with EM but capture the command with
profiler. You can then determine if the command generated is good. Did you
change the recovery to Leave database nonoperational?
"BATMAN" <BATMAN@.discussions.microsoft.com> wrote in message
news:CA08652F-A880-48E8-A03B-1567EE5145A6@.microsoft.com...
> Hello all,
> I'm trying to use the 32-bit GUI, on a remote server, to restore a
> database
> on one of our 64-bit servers. The GUI returns a prompt that the restore
> was
> successful but the GUI indicates that the database is in a Loading mode.
> I
> tried to issue a recovery command but it fails saying that some of the
> files
> were partially restored.
> I figured that there is a problem using the 32-bit client utility so I
> used
> OSQL, via SQL Server Agent, on the 64-bit to ensure that I was using a
> compatible 64-bit utility. By doing so, I was able to restore the
> database
> successfully.
> So my question is, is not being able to restore a 64-bit database via a
> 32-bit GUI, on a remote server, a known issue?
> Thanks...
>

64-bit Restore via 32-bit GUI

Hello all,
I'm trying to use the 32-bit GUI, on a remote server, to restore a database
on one of our 64-bit servers. The GUI returns a prompt that the restore was
successful but the GUI indicates that the database is in a Loading mode. I
tried to issue a recovery command but it fails saying that some of the files
were partially restored.
I figured that there is a problem using the 32-bit client utility so I used
OSQL, via SQL Server Agent, on the 64-bit to ensure that I was using a
compatible 64-bit utility. By doing so, I was able to restore the database
successfully.
So my question is, is not being able to restore a 64-bit database via a
32-bit GUI, on a remote server, a known issue?
Thanks...
Not that I'm aware of. EM is simply building the restore command and
sending it to the server. Try it again with EM but capture the command with
profiler. You can then determine if the command generated is good. Did you
change the recovery to Leave database nonoperational?
"BATMAN" <BATMAN@.discussions.microsoft.com> wrote in message
news:CA08652F-A880-48E8-A03B-1567EE5145A6@.microsoft.com...
> Hello all,
> I'm trying to use the 32-bit GUI, on a remote server, to restore a
> database
> on one of our 64-bit servers. The GUI returns a prompt that the restore
> was
> successful but the GUI indicates that the database is in a Loading mode.
> I
> tried to issue a recovery command but it fails saying that some of the
> files
> were partially restored.
> I figured that there is a problem using the 32-bit client utility so I
> used
> OSQL, via SQL Server Agent, on the 64-bit to ensure that I was using a
> compatible 64-bit utility. By doing so, I was able to restore the
> database
> successfully.
> So my question is, is not being able to restore a 64-bit database via a
> 32-bit GUI, on a remote server, a known issue?
> Thanks...
>

64-bit Restore via 32-bit GUI

Hello all,
I'm trying to use the 32-bit GUI, on a remote server, to restore a database
on one of our 64-bit servers. The GUI returns a prompt that the restore was
successful but the GUI indicates that the database is in a Loading mode. I
tried to issue a recovery command but it fails saying that some of the files
were partially restored.
I figured that there is a problem using the 32-bit client utility so I used
OSQL, via SQL Server Agent, on the 64-bit to ensure that I was using a
compatible 64-bit utility. By doing so, I was able to restore the database
successfully.
So my question is, is not being able to restore a 64-bit database via a
32-bit GUI, on a remote server, a known issue?
Thanks...Not that I'm aware of. EM is simply building the restore command and
sending it to the server. Try it again with EM but capture the command with
profiler. You can then determine if the command generated is good. Did you
change the recovery to Leave database nonoperational?
"BATMAN" <BATMAN@.discussions.microsoft.com> wrote in message
news:CA08652F-A880-48E8-A03B-1567EE5145A6@.microsoft.com...
> Hello all,
> I'm trying to use the 32-bit GUI, on a remote server, to restore a
> database
> on one of our 64-bit servers. The GUI returns a prompt that the restore
> was
> successful but the GUI indicates that the database is in a Loading mode.
> I
> tried to issue a recovery command but it fails saying that some of the
> files
> were partially restored.
> I figured that there is a problem using the 32-bit client utility so I
> used
> OSQL, via SQL Server Agent, on the 64-bit to ensure that I was using a
> compatible 64-bit utility. By doing so, I was able to restore the
> database
> successfully.
> So my question is, is not being able to restore a 64-bit database via a
> 32-bit GUI, on a remote server, a known issue?
> Thanks...
>

Sunday, February 19, 2012

601 - Could not continue scan with NOLOCK due to data movement.

Hi,
Lately, I have been getting this problem with a client. The query returns
around 6 thousand records, there is one user only and it's a select statement
with a temporary table in the join.
The server has a sp4 installed. It's a 2003 server.
CREATE TABLE #Temp (Temp_Id INT,
Temp_Id_Count INT NULL,
Temp_Id_Dt DATETIME NULL)
INSERT INTO #Temp (Temp_Id, Temp_Id_Count, Temp_Id_Dt)
SELECT T.Temp_Id, COUNT(TR.Temp_Id_Count), MAX(TR.Temp_Id_Dt)
FROM Test T WITH (NOLOCK)
LEFT JOIN Test_History TR WITH (NOLOCK) ON TR.Temp_Id = T.Temp_Id
WHERE T.Status_Cd = 1234
GROUP BY T.Temp_Id
SELECT DISTINCT T.Temp_Id, S.Client_Id, S.Subject_Id,
FROM SavedData S WITH (NOLOCK)
JOIN #Temp T ON T.Temp_Id = S.Temp_Id
The error after a few seconds is 601 - Could not continue scan with NOLOCK
due to data movement.
Any ideas?
Thanks in advanceWonder wrote:
> Hi,
> Lately, I have been getting this problem with a client. The query returns
> around 6 thousand records, there is one user only and it's a select statement
> with a temporary table in the join.
> The server has a sp4 installed. It's a 2003 server.
>
> CREATE TABLE #Temp (Temp_Id INT,
> Temp_Id_Count INT NULL,
> Temp_Id_Dt DATETIME NULL)
> INSERT INTO #Temp (Temp_Id, Temp_Id_Count, Temp_Id_Dt)
> SELECT T.Temp_Id, COUNT(TR.Temp_Id_Count), MAX(TR.Temp_Id_Dt)
> FROM Test T WITH (NOLOCK)
> LEFT JOIN Test_History TR WITH (NOLOCK) ON TR.Temp_Id = T.Temp_Id
> WHERE T.Status_Cd = 1234
> GROUP BY T.Temp_Id
> SELECT DISTINCT T.Temp_Id, S.Client_Id, S.Subject_Id,
> FROM SavedData S WITH (NOLOCK)
> JOIN #Temp T ON T.Temp_Id = S.Temp_Id
> The error after a few seconds is 601 - Could not continue scan with NOLOCK
> due to data movement.
> Any ideas?
> Thanks in advance
That means data that your query is using has changed while your query
was running. That's one risk of using NOLOCK, you run the risk of
reading data that is in the process of being modified.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Sunday, February 12, 2012

4 table query returns nothig when one is empty

My problem is as follows: I am trying to pull data from four tables where a one table may not have data. How do I write the query that retrieves all the data from the ETS_STUDENT, ETS_ENROLLMENT, ETS_SCHOOL_DATA tables reguardless of the data in ETS_INTERNAL. ie... If the there is data in ETS_INTERNAL include it, else not. But still print the data in the other three tables.

This is my current code.

SELECT ETS_STUDENT.LAST_NAME, ETS_STUDENT.FIRST_NAME, ETS_STUDENT.ETS_SCHOOL, ETS_STUDENT.ETS_GRADE, ETS_SCHOOL_DATA.ETS_SCHEDULE_BLOCK, ETS_SCHOOL_DATA.ETS_SCHEDULE_TEACHER, ETS_SCHOOL_DATA.ETS_SCHEDULE_ROOM, ETS_ENROLLMENT.ETS_PROGRAM_STATUS, ETS_INTERNAL.OTHER_DESC
FROM ((ETS_STUDENT INNER JOIN ETS_ENROLLMENT ON ETS_STUDENT.ETS_ID = ETS_ENROLLMENT.ETS_ID) INNER JOIN ETS_INTERNAL ON ETS_STUDENT.ETS_ID = ETS_INTERNAL.ETS_ID) INNER JOIN ETS_SCHOOL_DATA ON ETS_STUDENT.ETS_ID = ETS_SCHOOL_DATA.ETS_ID
WHERE (((ETS_STUDENT.ETS_ID)=[ETS_ENROLLMENT]![ETS_ID] And (ETS_STUDENT.ETS_ID)=[ETS_SCHOOL_DATA]![ETS_ID] And (ETS_STUDENT.ETS_ID)=[ETS_INTERNAL]![ETS_ID]));

Thank you for your time.
MikeI figured it out. I created a sub query as follows then called the sub query from the main query.

Sub:

SELECT ETS_STUDENT.ETS_ID, ETS_INTERNAL.OTHER_DESC
FROM ETS_STUDENT LEFT JOIN ETS_INTERNAL ON ETS_STUDENT.ETS_ID = ETS_INTERNAL.ETS_ID;

Main:

SELECT ETS_STUDENT.LAST_NAME, ETS_STUDENT.FIRST_NAME, ETS_STUDENT.ETS_SCHOOL, ETS_STUDENT.ETS_GRADE, ETS_SCHOOL_DATA.ETS_SCHEDULE_BLOCK, ETS_SCHOOL_DATA.ETS_SCHEDULE_TEACHER, ETS_SCHOOL_DATA.ETS_SCHEDULE_ROOM, ETS_ENROLLMENT.ETS_PROGRAM_STATUS, [MKsPassesQuery(sub)].OTHER_DESC
FROM ((ETS_STUDENT INNER JOIN [MKsPassesQuery(sub)] ON (ETS_STUDENT.ETS_ID = [MKsPassesQuery(sub)].ETS_ID) AND (ETS_STUDENT.ETS_ID = [MKsPassesQuery(sub)].ETS_ID)) INNER JOIN ETS_ENROLLMENT ON ETS_STUDENT.ETS_ID = ETS_ENROLLMENT.ETS_ID) INNER JOIN ETS_SCHOOL_DATA ON ETS_STUDENT.ETS_ID = ETS_SCHOOL_DATA.ETS_ID
WHERE (((ETS_SCHOOL_DATA.ETS_ID)=[ETS_STUDENT]![ETS_ID]) AND ((ETS_ENROLLMENT.ETS_ID)=[ETS_STUDENT]![ETS_ID]));