SQL Server access to MDB databases slow
We had a stored procedure with one section that populates a single variable in the SP from a query to a MSAccess database MDB file via a linked server. It was running from SQL Server MSDE 2000 and it was fast on an XP system.
We transferred to a SQL Server 2012 database on a 32bit Win 7 machine and the same SP will time out before returning a simple result. Code calls a SP and within that SP is a call to another SP where it shows the timeout error message. I
can run the exact same SP in SSMS on a Win 7 box hitting the very database where the error occurs during the program code execution and it returns results in less than one second.
I've heard folks talk about this being a known problem. Does anyone have a workaround to resolve this issue?
TIA
Harry
Hello,
You can capture the whole process using SQL Server Profiler and verify exactly how much time is taking every instruction. You will be able to identify which instruction
is giving the timeout, and probably a better description of the error.
The following article may help you use SQL Server Profiler.
http://www.codeproject.com/Articles/21371/SQL-Server-Profiler-Step-by-Step
Try to capture all default events and error events. Select all columns.
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com
Similar Messages
-
RE: Database (SQL-SERVER) access problem
Have you used NT Control Panel/ ODBC to set up the ODBC data source name?
You have to define the data source (database) SecTrade as well as the
driver to be used (SQL Server). This can be done by selecting the Add
button on the Data Sources screen in Control Panel/ ODBC.
Hope this helps.
Sanjay Murthi
Indus Consultancy Services, Inc.
From: Administrator
Sent: Wednesday, August 13, 1997 6:49 PM
To: "'[email protected]'"
Cc: murthis; thyagarajm; thyagarm; vasasm; chandraa
Subject: Database (SQL-SERVER) access problems
MCI Mail date/time: Mon Aug 11, 1997 10:28 pm EST
Source date/time: Mon, 11 Aug 1997 19:25:34 +0530
Hi Forte-Users,
We have a setup a Sql-Server database on a NT server. In the Forte
EConsole,
we have
setup a ODBC-type Resource for this server, named SERVER2_ODBC. This NT
server
is configured as a Client Node in the active Forte environment. Note
that
Server2 is not
the Forte server, but has Forte installed. There is another NT server
which
acts as the
Forte server. NODEMGR and Sql-Server are running on SERVER2.
In our application, we have a DBSession SO with the database source
as SERVER2_ODBC, Userid=ForteInstructor. When running the application,
Forte
throws an exception, the gist of it being as follows:
USER ERROR: (This error was converted)
Failed to connect to database: SecTrade, username: ForteInstructor.
[Microsoft][ODBC Driver Manager] Data source name not found and no
default
driver specified
We have tried
1) Installing ODBC drivers on the NT server (Server2)
2) Accessing local databases from Forte clients which works fine
3) Accessing the Sql-Server database through Isqlw (Sql-Server Client
s/w) -
It works.
Could someone suggest what we should try to get rid of this problem?
Thanks for any help,
Kishore PuvvadaRajsarawat wrote:
Dear sir/mam,
I have installed sql server 2005 (server) and on another computer installed client. It installed successfully but on client side it does not seen, from where should i start it. so please send me procedure to install sql server 2005 on both side(client and server).You have to turn on network (external to your computer) access.
Under programs->sql server look for "surface" -
Alert: SQL Server Service Broker or Database Mirroring Transport stopped
Hi Team,
I got this error message even no one DB configured as mirroring ???
Alert: SQL Server Service Broker or Database Mirroring Transport stopped Priority: 0 Severity: 2 Resolution state: New
Alert description: The Database Mirroring protocol transport has stopped listening for connections.Can you check the rule. By default the configurations are disabled state that is the reason you are getting the alert.
If it's not configured properly then you might need to override it
--Prashanth -
SQL Server Agent Job And Database Mail - Error formatting query, probably invalid paramters
We have a stored procedure that we are trying to call with a SQL Server Agent Job. The stored procedure calls Database Mail. This is SQL 2008. The execute task is simply:
USE [Production]
GO
EXEC [dbo].[JOB_EMAIL_SCHEDULED_REPORTS]
GO
When the job runs, it is erroring out immediately, with the error:
Execute as user: NT AUTHORITY\NETWORK SERVICE. Error formatting query, probably invalid paramters [SQLSTATE 42000] (Error 22050). The step failed.
When we go into SQL Server Manager and just execute the SQL query, it works though. Something within the SQL Server Agent job, and Database Mail is causing problems. Any ideas? Thanks.Justin,
If you use SSMS then the procedure is executed under a different user when compared to running using a SQL Server Agent Job.
Isolate the problem by running a SQL Server agent job that sends a mail. Also check if the NT Authority\Network Service account is
in good standing. Look at the below thread with a similar problem that had an expired account.
http://social.msdn.microsoft.com/Forums/en/sqltools/thread/bac7ecee-a156-4313-b532-ba15813a0700
http://SankarReddy.com/ -
Monitors: SQL Server: Access Methods: Full Scans/sec
Hello,
I created a Monitor:
Monitors: SQL Server: Access Methods:
Full Scans/sec
It appears in Heath explorer on the servers
but is not available in the Performance Data for the Views...
What did I miss? I need to create a rule but which type ? linked to the monitor?
Should I use a Rule or a Monitor or a combination?
Thanks,
Dom
System Center
Operations Manager 2007 / System Center
Configuration Manager 2007 R2 /
Forefront Client Security
/ Forefront Identity ManagerHello,
I got on the servers the
1200:New Management Pack(s) requested. Management group "SCOM-MED", configuration id:"68 D8 86 93 7A 48 27 13 C0 6F B2 76 3C A4 07 87 DA 53 22 7F ".
1201:New Management Pack with id:"xxxx.SQL.Servers", version:"1.0.0.1" received.
1207... Rule/Monitor "Microsoft.Windows.SystemCenterDPM.DPMServerDiscovery" running for remote instance "MSQLCL1SQLBU.ad.medctr.ucla.edu" with id:"{A3100D57-1657-A51E-CD3E-6ACF2679A501}" will be disabled as it is not remotable.
Management group "SCOM-MED".
1210 New configuration became active. Management group "SCOM-MED", configuration id:"68 D8 86 93 7A 48 27 13 C0 6F B2 76 3C A4 07 87 DA 53 22 7F ".
still waiting ...
1204: Management Pack with id:"xxxx.SQL.Servers", version:"1.0.0.1" is no longer used by HealthService and will be deleted from cache.
Is this 1204 okay !!!!!
Thanks,
Dom
System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager -
Article - LabVIEW-Based Utility to Package & Deploy MS SQL Server 2005 Express Edition Databases
Anthony Lukindo, the newest ExpressionFlow blog LabVIEW community author, has just published the first part of his two-part blog article
LabVIEW-Based Utility to Package & Deploy MS SQL Server 2005 Express Edition Databases - Part 1
Please check it out!
Tomi MailaAnthony Lukindo, the newest ExpressionFlow blog LabVIEW community author, has just published the first part of his two-part blog article
LabVIEW-Based Utility to Package & Deploy MS SQL Server 2005 Express Edition Databases - Part 2
Please check it out!
Tomi Maila -
Querying SQL server table from Oracle database 11g
Hi all
We are using oracle database 11g R2 on REL 5 and i have an SQL server database used by one of our application.
In my Oracle database, i want to query one table in my SQL server database and to link it in a table in Oracle database to compare data.
Is there a way like database link or something else to do this need>
Please send a link or pots here step by step the way on how to accomplish my query.
Thank you.Yes, you can set up your SQL Server as an external database link, using Oracle Heterogeneous Services with SQL Server as an ODBC connection (easier to do if your Oracle server is a Windows server, a little more tricky if your Oracle server is *nix based)
Here's the documentation... for 11gR2
http://www.oracle.com/pls/db112/search?remark=quick_search&word=heterogeneous+services -
Can DPM 2012 R2 backup SQL Server 2012 AlwaysOn enabled databases
Is it possible to use DPM 2012 R2 for backing up
SQL Server 2012 AlwaysOn enabled databases ?
Because if Alwayson configured for any Database , particular database is not available to select for backup.Hi,
Yes, starting with DPM 2012 SP1 SQL AlwaysOn enabled databases can be protected as long as they are not part of sharepoint farm. DPM shows the Availability Groups under Cluster Group.
You must explicitly add the system account NTAuthority\System or NT AUTHORITY\DPMRA to the Sysadmin group on SQL Server.
Protecting SQL Server Data
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights. -
SQL Server Upgrade Advisor 2014 - Database Compatibility Level checking
I have the following scenario... I have a database server running SQL Server 2008 R2 (10.50.4260). On that server I restored a database from SQL Server 2005. Looking at the compatibility level through the properties of the database (using SSMS) and
by querying against sys.databases, I can see the database has the compatibility level of 90, which is what I expected.
In looking to bring this database over to a SQL Server 2014 database server, I have run the SQL Server Upgrade Advisor 2014 tool as well as the SQL Server Upgrade Advisor 2012 tool. With the 2014 tool, my expectation would be that it would warn me
that the compatibility level will be upgraded to 10 (or something), however, I received no such warning. I ran the 2012 version of the tool as well, expecting that I might get a deprecation warning (or something), no such luck. I have run the 2014
tool from my computer and from another one, same results.
Does the upgrade advisor not check for the compatibility level? Or does my configuration maybe have something to do with it (having it on a 2008 R2 server)? From looking at screenshots of when other people have ran the tool, I was under the impression
it checked this. See the link below for an example...
http://blogs.msdn.com/b/mspfe/archive/2012/12/06/sql-server-upgrade-advisor-considerations-when-upgrading-from-sql-2000-to-sql-2012.aspx
Thoughts anyone?Lydia,
I agree with regards to the 2012 version. However, in SQL Server 2014, upgrading a database with a compatibility level of 90 sets
the database to compatibility level 100. See link below...
https://technet.microsoft.com/en-us/library/bb510680.aspx
Shouldn't the 2014 version of the advisor tool issue the same warning seen in the screenshot of the msdn blog post we both mentioned? As in... "After upgrade, compatibility levels <list of levels>, will be set to 100".
Hi JJordheim,
According to my test, SQL Server 2014 Upgrade Advisor also only raise warning when database compatibility level is less than 90 in the “SQL Server Parameters” page.
From your description, when database compatibility level is set to 90, SQL Server 2014 Upgrade Advisor should also raise warning, right? If so , this is a design issue of SQL Server 2014 Upgrade Advisor, personally, I recommend you
submit a feedback to the Microsoft Connect at this link
https://connect.microsoft.com/SQLServer/Feedback . Your feedback enables Microsoft to offer the best software and deliver superior services.
Thanks,
Lydia Zhang
Lydia Zhang
TechNet Community Support -
Oracle dblink to sql server, accessing multiple database on same sql server under one dblink
Hi, we have successfully managed to set up an Oracle dblink over to sql server and retrieve data.
The sql server user were using via the dblink has access to more than one database on the same sql server
But the question is how in oracle (if at all possible) do you prefix the sql statement to access this ?
Eg:
Sqlserver_prod has user sqlserver_user which appears to be set up as default database on sqlserver_db1
But we have select access to sqlserver_db2
all work fine as sqlserver_user
select * from table_fromdb1
select * from dbo.table_fromdb1
select * from sqlserver_db1.dbo.table_fromdb1
as does
select * from sqlserver_db2.dbo.table_fromdb2
over in Oracle
Oracle_db has dblink sqlserver_prod.world connecting as sqlserver_user
all working fine
select * from "table_fromdb1"@sqlserver_prod
select * from "dbo"."table_fromdb1"@sqlserver_prod
but how (if at all possible) do I access from oracle
sqlserver_db2.dbo.table_fromdb2
without having to create a new sqlserver_db2_user referenced in a new dblink
if oracle to oracle would be
select * from remote_oracle_schema.table@remote_oracle_dbHi, ok cheers, I see, original gateway was connecting purely at host_name level
HS_FDS_CONNECT_INFO=sqlserver_host
Planning to amend this to be
HS_FDS_CONNECT_INFO=sqlserver_host//sqlserver_db1
With exisiting dblink
And to create new gateway
HS_FDS_CONNECT_INFO=sqlserver_host//sqlserver_db2
With new exisitng dblink,will see how we get on
Cheers again -
MS SQL Server problem with MDB's: javax.transaction.xa.XAException
I am programming agents in j2ee and using MDB to implement the asynchronicity of
the agents.
Those MDB's get messages (MapMessage) from a controller (an SFSB) that contain
the agent's ID and the action that the agent has to perform. The MDB creates a
SFSB, and calls the appropriate action from this session bean. Those actions require
to read and write from my MS SQL Server 2000 XA database. But when running my
program, I often get this error, which doesn't seem to affect the action, because
when I check my database data, everything is updated correctly. So the program
still completes, but the errors slow down the execution (the program hangs for
about 3 seconds, each time the error occurs).
Does anybody has an explanation or solution for this?
Thank you...
This is the error output:
onMessage()
Reading MapMessage: 1
<26-apr-2004 14.34 u. CEST> <Error> <EJB> <BEA-010026> <Exception occurred during
commit of transaction Xid=BEA1-005F88135FFBA636FFF7(15619088),Status=Rolled back.
[Reason=javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=4,seconds
left=30,XAServerResourceInfo[JMS_JMS Server2_NotDurable]=(ServerResourceInfo[JMS_JMS
Server2_NotDurable]=(state=rolledback,assigned=lucille3_ms),xar=JMS_JMS Server2_NotDurable),XAServerResourceInfo[MSSQL
Connection Pool]=(ServerResourceInfo[MSSQL Connection Pool]=(state=rolledback,assigned=lucille3_ms),xar=MSSQL
Connection Pool),SCInfo[cluster+lucille3_ms]=(state=rolledback),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+,
XAResources={},NonXAResources={})],CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+):
javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0)returns -4
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown
Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.prepare(Unknown Source)
at weblogic.jdbcx.base.BaseXAResource.prepare(Unknown Source)
at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:821)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'MSSQL Connection
Pool
[BEA][SQLServer JDBC Driver][SQLServer]xa_prepare (0) returns -4 - with nested
exception:
[javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).>
I am programming agents in j2ee and using MDB to implement the asynchronicity of
the agents.
Those MDB's get messages (MapMessage) from a controller (an SFSB) that contain
the agent's ID and the action that the agent has to perform. The MDB creates a
SFSB, and calls the appropriate action from this session bean. Those actions require
to read and write from my MS SQL Server 2000 XA database. But when running my
program, I often get this error, which doesn't seem to affect the action, because
when I check my database data, everything is updated correctly. So the program
still completes, but the errors slow down the execution (the program hangs for
about 3 seconds, each time the error occurs).
Does anybody has an explanation or solution for this?
Thank you...
This is the error output:
onMessage()
Reading MapMessage: 1
<26-apr-2004 14.34 u. CEST> <Error> <EJB> <BEA-010026> <Exception occurred during
commit of transaction Xid=BEA1-005F88135FFBA636FFF7(15619088),Status=Rolled back.
[Reason=javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=4,seconds
left=30,XAServerResourceInfo[JMS_JMS Server2_NotDurable]=(ServerResourceInfo[JMS_JMS
Server2_NotDurable]=(state=rolledback,assigned=lucille3_ms),xar=JMS_JMS Server2_NotDurable),XAServerResourceInfo[MSSQL
Connection Pool]=(ServerResourceInfo[MSSQL Connection Pool]=(state=rolledback,assigned=lucille3_ms),xar=MSSQL
Connection Pool),SCInfo[cluster+lucille3_ms]=(state=rolledback),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+,
XAResources={},NonXAResources={})],CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+):
javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0)returns -4
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown
Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.prepare(Unknown Source)
at weblogic.jdbcx.base.BaseXAResource.prepare(Unknown Source)
at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:821)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'MSSQL Connection
Pool
[BEA][SQLServer JDBC Driver][SQLServer]xa_prepare (0) returns -4 - with nested
exception:
[javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).>
-
Sql server service will not start after server reboot:
2009-08-13 14:15:43.94 spid7s SQL Trace ID 1 was started by login "sa".
2009-08-13 14:15:43.97 spid7s Starting up database 'mssqlsystemresource'.
2009-08-13 14:15:43.97 spid7s The resource database build version is 10.00.1600. This is an informational message only. No user action is required.
2009-08-13 14:15:44.30 Server A self-generated certificate was successfully loaded for encryption.
2009-08-13 14:15:44.30 spid7s Server name is 'WIN-37R9WFWAJIB\MSDB1'. This is an informational message only. No user action is required.
2009-08-13 14:15:44.32 spid10s Starting up database 'model'.
2009-08-13 14:15:44.32 Server Server is listening on [ 'any' <ipv6> 49167].
2009-08-13 14:15:44.33 Server Server is listening on [ 'any' <ipv4> 49167].
2009-08-13 14:15:44.33 Server Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSDB1 ].
2009-08-13 14:15:44.33 Server Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ].
2009-08-13 14:15:44.35 spid10s The database 'model' is marked RESTORING and is in a state that does not allow recovery to be run.
2009-08-13 14:15:44.38 Server Server is listening on [ ::1 <ipv6> 49168].
2009-08-13 14:15:44.38 Server Server is listening on [ 127.0.0.1 <ipv4> 49168].
2009-08-13 14:15:44.38 Server Dedicated admin connection support was established for listening locally on port 49168.
2009-08-13 14:15:44.39 spid10s Error: 927, Severity: 14, State: 2.
2009-08-13 14:15:44.39 spid10s Database 'model' cannot be opened. It is in the middle of a restore.
2009-08-13 14:15:44.49 spid10s Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized.
2009-08-13 14:15:44.50 spid10s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informa
there is plenty of room on the server, so i dont think its a disk space issue. i am able to start the service as such:
C:\Users\Administrator>net start MSSQL$MSDB1 /c /m /T3608
The SQL Server (MSDB1) service is starting.
The SQL Server (MSDB1) service was started successfully
sqlcmd -e
1> select name, status from sysdatabases;
2> go
select name, status from sysdatabases;
name
status
master
65544
tempdb
65544
model
65568
msdb
1073807368
SS_DBA_Dashboard
1073807368
(5 rows affected)
model is in RESTORING state and I dont know how to fix it. I am running simple backups, so I have a somewhat recent backup of model.bak but when I attempt to restore it I get an error:
1> restore database model
2> go
restore database model
Msg 3112, Level 16, State 1, Server WIN-37R9WFWAJIB\MSDB1, Line 1
Cannot restore any database other than master when the server is in single user
mode.
Msg 3013, Level 16, State 1, Server WIN-37R9WFWAJIB\MSDB1, Line 1
RESTORE DATABASE is terminating abnormally.
other forums suggest manually updating the status column but i dont know if my syntax is wrong or it just cant be done in sql server 2008:
1> begin transaction
2> update sysdatabases set status=16 where name='model'
3> ;
4> go
begin transaction
update sysdatabases set status=16 where name='model'
Msg 4406, Level 16, State 1, Server WIN-37R9WFWAJIB\MSDB1, Line 2
Update or insert of view or function 'sysdatabases' failed because it contains a
derived or constant field.
1>
yet another forum suggested taking a cleanly shut down model.mdf and model.ldf from another sql server 2008 instance and placing those in the data directory while moving the 'restoring' ones to a backup location. this didnt work either. any help is appreciated im new to sql server and this is very frustrating! thanks in advance!I have the same issue on SQL Server 2008R2, after a server reboot, but none of the NET START commands or command line attempts are successful to start the Service.
NET START command results in "Access Denied" "System Error 5" and the Command line attempts result in
Server Error: 17058, Severity: 16, State: 1.
Server initerrlog: Could not open error log file ''.
Any help?
SQL Error log file:
2011-03-29 16:50:49.40 Server (c) Microsoft Corporation.
2011-03-29 16:50:49.40 Server All rights reserved.
2011-03-29 16:50:49.40 Server Server process ID is 7292.
2011-03-29 16:50:49.40 Server System Manufacturer: 'Dell Inc.', System Model: 'PowerEdge T710'.
2011-03-29 16:50:49.40 Server Authentication mode is MIXED.
2011-03-29 16:50:49.40 Server Logging SQL Server messages in file 'E:\MSSQL\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2011-03-29 16:50:49.40 Server This instance of SQL Server last reported using a process ID of 7448 at 3/29/2011 4:30:06 PM (local) 3/29/2011 8:30:06 PM (UTC). This is an informational message only; no user action is required.
2011-03-29 16:50:49.40 Server Registry startup parameters:
-d E:\MSSQL\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master.mdf
-e E:\MSSQL\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG
-l E:\MSSQL\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
-T 4616
2011-03-29 16:50:49.42 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2011-03-29 16:50:49.42 Server Detected 24 CPUs. This is an informational message; no user action is required.
2011-03-29 16:50:49.84 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2011-03-29 16:50:49.84 Server Lock partitioning is enabled. This is an informational message only. No user action is required.
2011-03-29 16:50:49.86 Server Node configuration: node 0: CPU mask: 0x0000000000fff000:0 Active CPU mask: 0x0000000000fff000:0. This message provides a description of the NUMA configuration for this computer. This is an informational
message only. No user action is required.
2011-03-29 16:50:49.86 Server Node configuration: node 1: CPU mask: 0x0000000000000fff:0 Active CPU mask: 0x0000000000000fff:0. This message provides a description of the NUMA configuration for this computer. This is an informational
message only. No user action is required.
2011-03-29 16:50:49.89 spid9s Starting up database 'master'.
2011-03-29 16:50:49.95 spid9s CHECKDB for database 'master' finished without errors on 2011-03-18 08:46:34.257 (local time). This is an informational message only; no user action is required.
2011-03-29 16:50:49.95 spid9s FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'MSSQLSERVER'.
2011-03-29 16:50:49.97 spid9s SQL Trace ID 1 was started by login "sa".
2011-03-29 16:50:49.97 spid9s Starting up database 'mssqlsystemresource'.
2011-03-29 16:50:49.99 spid9s The resource database build version is 10.50.1600. This is an informational message only. No user action is required.
2011-03-29 16:50:50.20 spid13s Starting up database 'model'.
2011-03-29 16:50:50.20 spid9s Server name is 'XXXX'. This is an informational message only. No user action is required.
2011-03-29 16:50:50.21 Server The certificate [Cert Hash(sha1) "C41DC20703F049763778AC2842C3C8A3A2C6EED4"] was successfully loaded for encryption.
2011-03-29 16:50:50.21 Server Server is listening on [ 'any' <ipv6> 1433].
2011-03-29 16:50:50.21 Server Server is listening on [ 'any' <ipv4> 1433].
2011-03-29 16:50:50.21 Server Server local connection provider is ready to accept connection on [
\\.\pipe\SQLLocal\MSSQLSERVER ].
2011-03-29 16:50:50.21 Server Server named pipe provider is ready to accept connection on [
\\.\pipe\sql\query ].
2011-03-29 16:50:50.21 Server Server is listening on [ ::1 <ipv6> 1434].
2011-03-29 16:50:50.21 spid13s The database 'model' is marked RESTORING and is in a state that does not allow recovery to be run.
2011-03-29 16:50:50.21 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
2011-03-29 16:50:50.21 spid13s Error: 927, Severity: 14, State: 2.
2011-03-29 16:50:50.21 spid13s Database 'model' cannot be opened. It is in the middle of a restore.
2011-03-29 16:50:50.21 Server Dedicated admin connection support was established for listening locally on port 1434.
2011-03-29 16:50:50.22 spid13s Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in
the event log that may indicate why the tempdb files could not be initialized.
2011-03-29 16:50:50.22 spid13s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required. -
Variable database name in SQL Server query using Oracle database link
Hi All,
I have an ApEx 4.1 app running on 11g x64 (11.2.0.1) on Windows Server 2008 x64, and I have some data integration points with a SQL Server (2005 and 2008) that I need to establish. I have configured the database link with dg4odbc and it works beautifully... I can execute queries against the SQL Server database without any problems using the database link.
However, there is a scenario where the SQL Server database name is dynamic, and I need to generate it on the fly in a PL/SQL block, and then use that in a dynamic SQL query (all of this in ApEx). This is where I run into problems... when I am querying the default database based on the ODBC connection and I don't have to specify the database name, there is no issue. But when I need to access one of several other non-default databases, I keep receiving the "invalid table" error.
This runs fine:* (note that "fv" is the name of my database link)
v_query1 := 'select "ReleaseDate" from dbo.Schedules@fv where dbo.Schedules."SchedID" = :schedule';
EXECUTE IMMEDIATE v_query1 into rel_date using schedule;
I then take that rel_date variable, convert to a varchar2 (rel_date_char), and then use it as the database name in the next query...
This returns an error_ (Error ORA-00903: invalid table name)
v_query2 := 'select "PARTNO" from :rel_date_char.dbo.ProdDetails@fv where "SchedID" = :schedule and "UnitID" = :unit
and "MasterKey" = :master and "ParentKey" = :parent';
EXECUTE IMMEDIATE v_query2 into part_number using schedule, unit, master, parent;
I have also tried using all of the following to no avail:
'select "PARTNO" from ' || :rel_date_char || '.dbo.ProdDetails@fv where "SchedID"...
'select "PARTNO" from ' || rel_date_char || '.dbo.ProdDetails@fv where "SchedID"...
'select "PARTNO" from ' || @rel_date_char || '.dbo.ProdDetails@fv where "SchedID"...
'select "PARTNO" from @rel_date_char.dbo.ProdDetails@fv where "SchedID"...
Is there a way to do this in PL/SQL?
Thanks for any help!
-Ian C.
Edited by: 946532 on Jul 15, 2012 7:45 PMJust did a test using passthrough:
SQL> set serveroutput on
SQL> declare
2 val varchar2(100);
3 c integer;
4 nr integer;
5 begin
6 c:= dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 'select count(*) from EMP');
8 LOOP
9 nr:= DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
10 exit when nr=0;
11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c,1,val);
12 dbms_output.put_line(val);
13 end loop;
14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
15 end;
16 /
24576
PL/SQL procedure successfully completed.
SQL> declare
2 val varchar2(100);
3 c integer;
4 nr integer;
5 begin
6 c:= dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 'select count(*) from dbo.EMP');
8 LOOP
9 nr:= DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
10 exit when nr=0;
11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c,1,val);
12 dbms_output.put_line(val);
13 end loop;
14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
15 end;
16 /
24576
PL/SQL procedure successfully completed.
So all 3 ways work for me.
Edited by: kgronau on Jul 23, 2012 10:08 AM
Now using variables to perform the select:
SQL> declare
2 val varchar2(100);
3 c integer;
4 nr integer;
5 tabname varchar2(20) :='EMP';
6 ownr varchar2(20) :='dbo';
7 dbname varchar2(20) :='gateway';
8 begin
9 c:= dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
10 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 'SELECT count(*) FROM '||dbname||'.'|| ownr || '.'||tabname||'');
11 LOOP
12 nr:= DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
13 exit when nr=0;
14 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c,1,val);
15 dbms_output.put_line(val);
16 end loop;
17 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
18 end;
19 /
24576
PL/SQL procedure successfully completed.
=> instead of executing the statement using "execute Immediate" we have to use PASTHROUGH package to pass the statement to the SQL Server.
Edited by: kgronau on Jul 23, 2012 10:10 AM -
Restrict SQL Server access on IP and/or Hostname base
I need to implement a security policy for machine-2-machine accounts that requires to limit their access to database, only if it is from the IP (or hostname) of the application server that hosts the application. It has been decided because is a native feature
provided on Oracle, I can't find anything similar on SQL Server, please can you help me to address this requirement according Microsoft best practices?
Thank you
Andrearegarding firewall solution, if I must reach a DB from my workstation with AD integrated authentication but not with a standard login, normally used by a Java application on ux environment application server, how can I manage it with a fw rule? (I use mixed
authentication on SQL Server because I have mixed platforms)
If you want rules like: account X but account Y may access the server from machine A, a firewall solution becomes difficult, since the firewall don't know what is in the packets they block.
However, it is still doable, provided that the server has multiple NIC. Each NIC will be an endpoint in SQL Server. You use the firewall to configure which machines that can access the IP address at all. But you only grant CONNECT permission on the endpoint
for accounts that should be permitted to use that IP address.
I noticed on various forums possible custom solutions based on logon triggers, I think it can be havy in terms of performance in cases (like mine) when there are tens of databases and hundreds of logins to manage in logon phase, checking whitelist tables
on every logon, moreover I monitored the actual situation with server side traces on login event and I captured many records where hostname field is NULL and it seems it can be managed from the application code side, so this check can be bypassed.
Yes, looking at the hostname is out of the question. You will need to look at the IP address, as I mentioned.
I am not going deny that a logon trigger is a heavier solution than a firewall. There is also the risk that if you mess it up, you lock yourself out. This can be sorted out by using the DAC, but it can cause some panic...
Erland Sommarskog, SQL Server MVP, [email protected] -
Hello,
When I try to verify the prerequisites to upgrade my SCOM 2012 UR2 Platform to SP1 Beta, I have these errors :
The installed version of SQL Server is not supported for the operational database.
The installed version of SQL Server is not supported for the data warehouse.
But when I execute this query Select @@version on my MSSQL Instance, the result is :
Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) Jun 17 2011 00:54:03 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) (Hypervisor)
But
here, we can see that :
Microsoft SQL Server: SQL Server SQL 2008 R2 SP1, SQL Server 2008 R2 SP2, SQL Server 2012, SQL Server 2012 SP1, are supported.
Do I need to pach my MSSQL Server with a specific cumulative update package ?
Thanks.These are the requirements for your SQL:
SQL Server 2008 and SQL Server 2012 are available in both Standard and Enterprise editions. Operations Manager will function with both editions.
Operations Manager does not support hosting its databases or SQL Server Reporting Services on a 32-bit edition of SQL Server.
Using a different version of SQL Server for different Operations Manager features is not supported. The same version should be used for all features.
SQL Server collation settings for all databases must be one of the following: SQL_Latin1_General_CP1_CI_AS, French_CI_AS, Cyrillic_General_CI_AS, Chinese_PRC_CI_AS, Japanese_CI_AS, Traditional_Spanish_CI_AS, or Latin1_General_CI_AS. No other collation
settings are supported.
The SQL Server Agent service must be started, and the startup type must be set to automatic.
Side-by-side installation of System Center Operations Manager 2007 R2 reporting and System Center 2012 Service Pack 1 (SP1), Operations Manager reporting on the same server is not supported.
The db_owner role for the operational database must be a domain account. If you set the SQL Server Authentication to Mixed mode, and then try to add a local SQL Server login on the operational database, the Data Access service will not be able to start.
For information about how to resolve the issue, see
System Center Data Access Service Start Up Failure Due to SQL Configuration Change
If you plan to use the Network Monitoring features of System Center 2012 – Operations Manager, you should move the tempdb database to a separate disk that has multiple spindles. For more information, see
tempdb Database.
http://technet.microsoft.com/en-us/library/jj656654.aspx#BKMK_RBF_OperationsDatabase
Check the SQL server agent service and see whether it is set to automatic AND started. This got me confused at my first SP1 install as well. This is not done by default...
It's doing common things uncommonly well that brings succes.
Maybe you are looking for
-
How do I get music from my iPod to computer
My desktop computer crashed and needed to be re-formatted. Luckily, I had backed up all of my downloaded music on an external hard drive. Unfortunately, I did not have all of the music from CD's on my iTunes backed up. So in other words, I have an iP
-
Autoplay dialog won't open when I plug in my iPod Touch 4th gen
Hello! I need to take my iPod into be fixed because it has a cracked screen and I'm trying to import my photos onto my laptop (Windows 7) but when I plug my iPod in nothing happens except the iTunes window pops up. I went into Autoplay and made sure
-
Kernel 2.6.32.7-1/mkinitcpio update issue - filesystem/ext3 error
Hi, Earlier my desktop (after a week uptime) didn't boot anymore. It got the "Reboot required" error at filesystem check (the rc.sysinit script gives this when fsck returns exit status 2). I tried several things, made sure from a live that the partit
-
Unable to switch from Tall Talk (Virgin) to BT Inf...
When Virgin moved its ADSL customers to Talk Talk and BT enabled Infinity where I lived, I thought this was the time to move to BT Infinity. My first order was place on the 3 Feb and I have had multiple orders ever since with no real explanation to t
-
MS outlook data damaged .
hello , Am using ms office outlook 2007 . suddenly the data file damaged 9.5 GB. am done several times of SCAN.PST to repair but till also am notable to retrain the data . how to recovery my data . give me solution as soon as possible . regards prak