Showing posts with label agent. Show all posts
Showing posts with label agent. Show all posts

Sunday, March 25, 2012

(Newbie) Outer Join Simulation

I have two tables invoice(fact table) and agents(dimension). Not all invoices have an agent. How do I use the agents table as an outer join? When I include agents as a dimension and look at all agents, I only get invoices that have an agent. I know I could create a view in SQL but I want to do this in the cube.

Thanks,

Bill

You can create an unknown member in your agent dimension table and connect all fact records without an agent key to that member. You will have to use TSQL to this.

SSAS2005 can help you with doing this without writing code. Have a look at inferred members in BOL!

Regards

Thomas Ivarsson

Thursday, March 22, 2012

(393) Waiting for SQL Server to recover database

We're running SQL Server 200 SP3, operating in thread mode, and have
recently encountered the following problem.
SQL Server Agent shows as started but if we try to access any jobs we get
the message
"Error 14258: Cannot perform this operation while SQL Server Agent is
starting. Try again later"
When we access the SQL SErver Agent error log the most recent entry is
"(393) Waiting for SQL Server to recover database"
There is no recovery outstanding and we are unable to resolve this by
stopping and starting the agent, the database or the server."Thread mode" '
If you have Fibers switched on, stuff like Agent and xp_cmdshell, sp_OA* and
other functions don't behave as expected.
Regards
--
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/
"Onesj" <Onesj@.discussions.microsoft.com> wrote in message
news:2C5CC3DE-07B9-48AB-8110-BD8952A26AE6@.microsoft.com...
> We're running SQL Server 200 SP3, operating in thread mode, and have
> recently encountered the following problem.
> SQL Server Agent shows as started but if we try to access any jobs we get
> the message
> "Error 14258: Cannot perform this operation while SQL Server Agent is
> starting. Try again later"
> When we access the SQL SErver Agent error log the most recent entry is
> "(393) Waiting for SQL Server to recover database"
> There is no recovery outstanding and we are unable to resolve this by
> stopping and starting the agent, the database or the server.|||Fibers are not switched on in this case. Threads are being used.
Any constructive ideas would be appreciated.
"Mike Epprecht (SQL MVP)" wrote:
> "Thread mode" '
> If you have Fibers switched on, stuff like Agent and xp_cmdshell, sp_OA* and
> other functions don't behave as expected.
> Regards
> --
> 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/
> "Onesj" <Onesj@.discussions.microsoft.com> wrote in message
> news:2C5CC3DE-07B9-48AB-8110-BD8952A26AE6@.microsoft.com...
> > We're running SQL Server 200 SP3, operating in thread mode, and have
> > recently encountered the following problem.
> > SQL Server Agent shows as started but if we try to access any jobs we get
> > the message
> >
> > "Error 14258: Cannot perform this operation while SQL Server Agent is
> > starting. Try again later"
> >
> > When we access the SQL SErver Agent error log the most recent entry is
> >
> > "(393) Waiting for SQL Server to recover database"
> >
> > There is no recovery outstanding and we are unable to resolve this by
> > stopping and starting the agent, the database or the server.
>
>sql

(393) Waiting for SQL Server to recover database

We're running SQL Server 200 SP3, operating in thread mode, and have
recently encountered the following problem.
SQL Server Agent shows as started but if we try to access any jobs we get
the message
"Error 14258: Cannot perform this operation while SQL Server Agent is
starting. Try again later"
When we access the SQL SErver Agent error log the most recent entry is
"(393) Waiting for SQL Server to recover database"
There is no recovery outstanding and we are unable to resolve this by
stopping and starting the agent, the database or the server.
"Thread mode" ?
If you have Fibers switched on, stuff like Agent and xp_cmdshell, sp_OA* and
other functions don't behave as expected.
Regards
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/
"Onesj" <Onesj@.discussions.microsoft.com> wrote in message
news:2C5CC3DE-07B9-48AB-8110-BD8952A26AE6@.microsoft.com...
> We're running SQL Server 200 SP3, operating in thread mode, and have
> recently encountered the following problem.
> SQL Server Agent shows as started but if we try to access any jobs we get
> the message
> "Error 14258: Cannot perform this operation while SQL Server Agent is
> starting. Try again later"
> When we access the SQL SErver Agent error log the most recent entry is
> "(393) Waiting for SQL Server to recover database"
> There is no recovery outstanding and we are unable to resolve this by
> stopping and starting the agent, the database or the server.
|||Fibers are not switched on in this case. Threads are being used.
Any constructive ideas would be appreciated.
"Mike Epprecht (SQL MVP)" wrote:

> "Thread mode" ?
> If you have Fibers switched on, stuff like Agent and xp_cmdshell, sp_OA* and
> other functions don't behave as expected.
> Regards
> --
> 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/
> "Onesj" <Onesj@.discussions.microsoft.com> wrote in message
> news:2C5CC3DE-07B9-48AB-8110-BD8952A26AE6@.microsoft.com...
>
>

(393) Waiting for SQL Server to recover database

We're running SQL Server 200 SP3, operating in thread mode, and have
recently encountered the following problem.
SQL Server Agent shows as started but if we try to access any jobs we get
the message
"Error 14258: Cannot perform this operation while SQL Server Agent is
starting. Try again later"
When we access the SQL SErver Agent error log the most recent entry is
"(393) Waiting for SQL Server to recover database"
There is no recovery outstanding and we are unable to resolve this by
stopping and starting the agent, the database or the server."Thread mode" '
If you have Fibers switched on, stuff like Agent and xp_cmdshell, sp_OA* and
other functions don't behave as expected.
Regards
--
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/
"Onesj" <Onesj@.discussions.microsoft.com> wrote in message
news:2C5CC3DE-07B9-48AB-8110-BD8952A26AE6@.microsoft.com...
> We're running SQL Server 200 SP3, operating in thread mode, and have
> recently encountered the following problem.
> SQL Server Agent shows as started but if we try to access any jobs we get
> the message
> "Error 14258: Cannot perform this operation while SQL Server Agent is
> starting. Try again later"
> When we access the SQL SErver Agent error log the most recent entry is
> "(393) Waiting for SQL Server to recover database"
> There is no recovery outstanding and we are unable to resolve this by
> stopping and starting the agent, the database or the server.|||Fibers are not switched on in this case. Threads are being used.
Any constructive ideas would be appreciated.
"Mike Epprecht (SQL MVP)" wrote:

> "Thread mode" '
> If you have Fibers switched on, stuff like Agent and xp_cmdshell, sp_OA* a
nd
> other functions don't behave as expected.
> Regards
> --
> 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/
> "Onesj" <Onesj@.discussions.microsoft.com> wrote in message
> news:2C5CC3DE-07B9-48AB-8110-BD8952A26AE6@.microsoft.com...
>
>

Monday, February 13, 2012

' Attempted to read or write protected memory' while generating a snapshot

Hi all,

The shotshot agent is generating a snapshot, I got the error ' Attempted to read or write protected memory. This is often an indication that other memory is corrupt'. Then, the agent failed. I tried to restart the agent and generate a snapshot again. This time, it run normally. So far, I got this error twice since the replication launched. Kindly advise. Thanks a lot.

There seems to be a crash bug lurking in the snapshot agent code. Is this a SQL Server publication or Oracle publication? (I am guessing this may be Oracle) x86, x64 or x86 on x64 with wow64? Do you know what the snapshot agent was doing when it crashed the last time? It would be great if you have the crash dump uploaded to watson or better yet file it with a feedback item via http://connect.microsoft.com. Thanks much.

-Raymond

|||

If you are the one uploading the snapshot agent crash dumps on 5/17 (SQL2005 RTM, x64, Oracle publisher with 10.2g client), this is a known issue that has been fixed in sp2. The crash has to do with improper handling of "empty" error messages from the Oracle subsystem (our interfacing code or Oracle client components) so there might actually be some other runtime errors from the Oracle server that triggered this failure. My guess will be something like running out of rollback-segment space for large BCP.

HTH,

-Raymond

|||

Thanks for reply.

We are using SQL2005 sp2 (9.0.3042) and Oracle publisher with oracle client 9.2 installed.

and I found the error in msrepl_errors as below. Besides, I checked that there is a lot of space in RBS in oracle.

Source: Microsoft.SqlServer.Replication Target Site: Void PrivateDispose(Boolean) Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Stack: at Microsoft.SqlServer.Replication.Snapshot.Oracle.BcpOutProvider.PrivateDispose(Boolean bDisposing) at Microsoft.SqlServer.Replication.Snapshot.Oracle.BcpOutProvider.Dispose(Boolean ) at Microsoft.SqlServer.Replication.Snapshot.Oracle.BcpOutThreadProvider.Dispose() at Microsoft.SqlServer.Replication.WorkerThread.NonExceptionBasedAgentThreadProc() at Microsoft.SqlServer.Replication.WorkerThread.AgentThreadProc() at Microsoft.SqlServer.Replication.AgentCore.BaseAgentThread.AgentThreadProcWrapper()

|||

From the look of the stack, the snapshot agent is crashing when cleaning up the native Oracle connection after BCP. Unfortunately, there really isn't much more I can say about the issue other than the snapshot agent seemed to be running with multiple bcp threads. And given the nondetermistic nature of the problem, it is quite likely that the memory corruption is caused by some sort of race condition although it is nearly impossible to tell whether the problem lies in our native code interfacing with the Oracle client components or in the Oracle client components themselves. We will need to have either a crash dump (do you have one?) or a more reliable repro scenario in order to have any chance of tracking this down. Another thing you may want to try is to use a different version of Oracle client (10g e.g.). Is this on x64 btw? Are there any blob columns in your published tables?

-Raymond