Saturday, February 25, 2012
c0000005 EXCEPTION_ACCESS_VIOLATION
news:OS7pVV9sFHA.3752@.TK2MSFTNGP09.phx.gbl...
> I have searched this newsgroup and Google. It seems that with this error I
> should just call PSS? The SQL (see error.log attached) runs fine from
Query
> Analyzer, but not from my application (other queries run fine though). It
> worked up until yesterday. I rebooted the server. I had an associate apply
> SP4, but it still throws this exception. I'm having my partner run Dell
> diags on it during lunch. The server is in California, I'm in Tennessee.
> I also get this Events in the Event Log when the query is fired:
> Event 17052, SOURCE: MSSQLSERVER
> Error: 0, Severity: 19, State: 0
> language_exec: Process 57 generated an access violation. SQL Server is
> terminating this process.
> AND
> Event 17052, SOURCE: MSSQLSERVER
> Error: 0, Severity: 19, State: 0
> SqlDumpExceptionHandler: Process 57 generated fatal exception c0000005
> EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
>
Sorry, specs:
Dell PowerEdge, Windows 2003 SP1, SQL2000 SP4.
The only change I am aware of is SP4, previously (yesterday), it had SP3a.
Regards,
Mike Smith
msmith@.larrymethvin.com"Mike Smith" <msmith@.larrymethvin.com> wrote in message
news:OS7pVV9sFHA.3752@.TK2MSFTNGP09.phx.gbl...
>I have searched this newsgroup and Google. It seems that with this error I
> should just call PSS?
Yes.
David|||"Mike Smith" <msmith@.larrymethvin.com> wrote in message
news:OS7pVV9sFHA.3752@.TK2MSFTNGP09.phx.gbl...
> I have searched this newsgroup and Google. It seems that with this error I
> should just call PSS? The SQL (see error.log attached) runs fine from
Query
> Analyzer, but not from my application (other queries run fine though). It
> worked up until yesterday. I rebooted the server. I had an associate apply
> SP4, but it still throws this exception. I'm having my partner run Dell
> diags on it during lunch. The server is in California, I'm in Tennessee.
> I also get this Events in the Event Log when the query is fired:
> Event 17052, SOURCE: MSSQLSERVER
> Error: 0, Severity: 19, State: 0
> language_exec: Process 57 generated an access violation. SQL Server is
> terminating this process.
> AND
> Event 17052, SOURCE: MSSQLSERVER
> Error: 0, Severity: 19, State: 0
> SqlDumpExceptionHandler: Process 57 generated fatal exception c0000005
> EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
>
For the sake of the list, and anyone else that may have this problem. I
checked my log files, they were HUGE! We had moved servers, and whoever
setup the backups didn't back up the logs. I shrank the logs using the
method in: http://support.microsoft.com/kb/272318
Friday, February 24, 2012
C# SQL-DMO ExecuteImmediate
> I am trying to run a sql script via SQL-DMO. The script just rebuilds
> some stored procs and I can get it to work, however it always runs against
> the "master" database. Could you show me how to specify which database?
> Here is what my code looks like:
> SQLDMO.SQLServer2 DMOSQLServerName = new SQLDMO.SQLServer2();
> SQLDMO.Database2 DMOPerStoreDbName = new SQLDMO.Database2();
> DMOSQLServerName.Connect(myGetConfigData.OlapServe rName,myGetConfigData.OlapUserLogin,OlapPass);
> DMOPerStoreDbName.Name =
> myConnectionData.OlapDatabaseName.ToString().Trim( );
> if (File.Exists(@."MyScript.sql"))
> {
> SR2=File.OpenText(@."MyScript.sql");
> S2=SR2.ReadLine();
> try
> {
> SQLScript = SR2.ReadToEnd();
> SR2.Close();
> DMOPerStoreDbName.ExecuteImmediate(SQLScript,SQLDM O.SQLDMO_EXEC_TYPE.SQLDMOExec_Default,
> null);
> }
>
> So as you can see the script runs but against the master database, I need
> it to run against a database I specify. Can you help?
>
> TFD
That's because you're setting the database name, instead of getting a
reference to an existing database from the server's Databases collection -
this code works for me:
SQLDMO.SQLServer2 srv = new SQLDMO.SQLServer2();
SQLDMO._Database db = new SQLDMO.Database();
srv.Name = "MyServer";
srv.LoginSecure = true;
srv.Connect(null,null,null);
db = srv.Databases.Item("MyDatabase", null);
db.ExecuteImmediate(" /* SQL or script contents go here */ ",
SQLDMO.SQLDMO_EXEC_TYPE.SQLDMOExec_Default, null);
srv.DisConnect();
SimonThank You.
TFD