Best way to remove a data file from a database? The primary data file can't be removed and the other files are all in the same filegroup. Is there a best way to remove a data file? Thank you
Paula
Best way to remove a data file from a database? The primary data file can't be removed and the other files are all in the same filegroup. Is there a best way to remove a data file? Thank you
Paula
I have a server that houses a database application that makes heavy use of temp tables. It appears that temp tables are not getting dropped from the tempdb. In perfmon the temp table count is hanging around 1000 and is not going down over time.
Even if the programmers are not using drop table at the end of their sps, shouldn't these temp tables be cleaned up when they go out of scope?
Jeff
For example pool1 has active memgrant count = 1 when i run the query. when sa runs the query the value is 0.
How can I troubleshoot?
EDIT - problem solved the active memgrant count was including the spid used to query the dmv (itself), when running from a different log in in a different pool if was correctly showing 0.Hi,
I need to create linked server from MS-Sql server to MS-Access database. Unfortunately Sql server is 64-bit version, But MS-Access is 32-bit.
can anyone please suggest how to connect MS-Access from Sql server
Thanks in Advance.
Naveen.P
Hello,
We have a 2 stored procedures that runs will load data and will make use of cmdshell to move the files across the server.<o:p></o:p>
These procs runs fine when executed manually but do not run when it runs through the SQL Agent job and throws the error<o:p></o:p>
Column name or number of supplied values does not match table definition.<o:p></o:p>
Any idea on this behavior ?? Why would it run manually and not through the Job .
Thanks !
I have a linked server which connects to Mainframe in production. The job was scheduled and running for a long time. This is failing now frequently with below error. But job is able to run manually after this failure.
Any help on this is greatly appreciated.
[SQLSTATE 42000] (Error 7399) Cannot get the column information from OLE DB provider "MSDASQL" for linked server "TEST". [SQLSTATE 42000] (Error 7350).
Thanks.
Introduction
When we open SQL Server Configuration Manager by using the SQLServerManager.msc file, it will determine the bit version of the operation system and decide to connect to the 32-bit or 64-bit SQL Server WMI provider.
The SQL Server WMI Provider consist of a DLL (sqlmgmprovider.dll) and a MOF (sqlmgmproviderxpsp2up.mof) which defines the object classes. The provider query the classes of SQL Server services, SQL Server client and server network settings, and server aliases from the DLL file and MOF file and performs operations.
On 64-bit systems, it will load the 32-bit and 64-bit SQL Server WMI provider side-by-side and supply data to the application with corresponding bit version. The 64 bit provider supply data to 64 bit version of SQL Server and the 32-bit provider to 32-bit version of SQL Server.
Since WMI has only one repository (which stored the static WMI data and object definitions), both the 32-bit instance and the 64-bit instance of SQL Server share the same WMI configuration file (sqlmgmproviderxpsp2up.mof).
On 32 bit systems, we can find DLL and MOF file of the 32 bit SQL Server WMI providers under:
C:\Program Files \Microsoft SQL Server\number\Shared
On 64 bit systems, both 32-bit and 64-bit SQL Server WMI providers are install, and the file locate as follows:
32 bit DLL file : C:\Program Files (x86)\Microsoft SQL Server\number\Shared
64 bit DLL file: C:\Program Files \Microsoft SQL Server\number\Shared
The shared MOF: C:\Program Files (x86)\Microsoft SQL Server\number\Shared
(Note: The value of number depends on the version of SQL Server:nnn )
Solution
If you found SQL Network Configuration 64bit is missing, please check the DLL file of the 64 bit provider is not corrupted or missing and verify your have sufficient permission to access the file in the shared folder.
Reference
WMI Provider for Configuration Management
http://technet.microsoft.com/en-us/library/ms180499(v=sql.90).aspx
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.
What is the difference between "print" statements and "select" statements when it omces to debugging and watching varibles in the stored procs .....
Hi all,
I need assistance creating a maintenance plan that will backup a databases logs in order to prevent them from filling up the drive they are located on. I have looked at some blogs but they do not specifically show how this is done.
My database is in an AlwaysOn Availability Group.
Thank you very much for your help!
Jake
I want to be able to drop a login forcefully even if the login is currently logged on, its a SQL login. I have tried setting the database offline and online but that does not seem to do the trick, the way I do this is to restart the SQL service, but this often require logging onto the server to do this, I was wondering whether there are other options other than restarting the service.
If I disable the login, the login is still connected because the connection persists from the application unless SQL is restarted or unless the application is restarted.
Any ideas ?
Hi,
I have a strange problem in one of the SQL 2012 SP1 database. Sometimes my transaction log file grow unexpectedly than the preallocated space and i had to shrink it back . I usually preallocate space to around 15GB and the autogrow is set to 1000MB. The VLF count is less than 50. Database recovery model is Simple.
After i shrink the file and preallocate space again,everything seems to be normal.But later when the backup starts, SQL server starts generating the below error. The database will remain online and accept connections. Users do not get any errors or disconnected. The logs continue to grow as it cannot issue a checkpoint. We resolve this error by restarting SQL as database goes through crash recovery and comes up clean. Checkdb does not show any data corruption as well. I am not sure why the log gets corrupted after the shrink operation. Can someone please advice.
"The log scan number (10082614:43271:1) passed to log scan in database 'xyz' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup."
"One or more recovery units belonging to database 'xyz' failed to generate a checkpoint. This is typically caused by lack of system resources such as disk or memory, or in some cases due to database corruption. Examine previous entries in the error log for more detailed information on this failure."
Thanks
I am trying to use a sql agent proxy account for PowerShell. Created the ad account, credential and the proxy but because the PowerShell accesses a bunch o sql servers it errors out.Even when I created a login for all the sql servers the powershell is trying to access it still failed so next I'd need to look at what permissions the powershell ad account needs to the objects it accesses. Is this the correct approach?
What is the best way to go here and avoid using a sysadmin account to run the sql agent powershell job? Thanks!
Paula
Hi,
I use the following syntax to create a linked server with named pipe protocol :
@datasrc=N'np:MyCollectivePI'
The test connection to the linked server failed...
OLE DB provider "PIOLEDB" for linked server "TEST" returned message "[PI SDK] the requested server was not found in the know servers table. np:MyCollectiveP.
The syntaxlooksgood to me, i think that theproviderdoes not supporttheprotocolis forced...
Thank for help me
Thank for helping
[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
I facing this problem while connecting to oracle DB 11g.
my system information:
windows 7 64 bit.
oracle DB 11 g for 64 bit.
@any one please help me out from this problem.
Hi,
I have a table where we did a compression the JPG that make up the LOB data. This made the table about 70% smaller. However, I can see that the unused space for the table is 56GB vs 41GB of actual data in the table.
I'm trying to release that unused space so that the space is not assigned just to this table but available to the whole database. I do not need to shrink the physical files.
Is this something that can be done?
SQL Server 2008 SP3 is what I'm running.
The index size is only 624K, the majority of the data is the LOB.
Is there a property of the table that is telling it to keep this much free space to itself? Or some other factor?
(we have Merge replication in use which makes it impossible for me to simple recreate the table, I really need another option).
Thank you.
hi all,
i insert/update data from server A to server B
once the above step is successful, i want to try to start the sql agent job on server B.
how can i set the sql agent job on server b to check and make sure that that data load has been completed for that day and then start executing the job steps.
pleasse guide
nik
I have a live database that is published with merge replication and a couple of push subscriptions. I just noticed that the log file has grown to 500GB. The database is in full recovery. We do weekly full backups, daily log backups. I cannot shrink the log file back down to normal proportions. It should only be about 5GB. The file properties show an initial size equal to the current size, I cannot change that number and I don't know why it is so big now? How do I go about shrinking the log file. the normal DBCC shrink and the SSMS GUI to shrink are not doing anything and say there is 0MB space free!!