Cannot Kill Process stays in KILLED/ROLLBACK status
Could not find database ID 8. Database may not be activated yet or may be in transition. [SQLSTATE 42000] (Error 913).The step failed.
SQL 2000 @@REMSERVER problem
Waitresource - Find Exact Key
I am trying to interpret deadlock trace information. This is what I see in the waitresource
waitresource=KEY: 9:72057594065256448 (f20077ea2259)
Can someone help me decipher this?
Thanks!
Error 15023: “User already exists in current database”
I've had to create a new test database using a restore of a live database. The people who will be doing the testing already exist as logins on this server but when I tried to give them access to the test database I got the above message.
I've got the note below as a resolution
1.Select SQL Query Analyser and run
exec sp_dropuser ‘user login’
2.If the user login is unable to be dropped due to ownership of objects, change the ownership of the objects to ‘sa’, then repeat step 1.
3.Recreate the user login.
How can I tell which user login owns which objects (nobody wrote that bit down)? If anyone could let me know, overnight, I'd be grateful. I've got to sort this out in the morning. Will this script work?
sp_changedbowner 'sa'
getting error "The system cannot find the path specified." using xp_cmdshell
SQL DBA new trend
EventID - 833
I need to Copy/refresh the "data only" to Test from prod
bcp_init error
Would anyone know how to fix this error?
Function: bcp_init
SQLSTATE: HY000
Native Error: 0
Diagnostic: [Microsoft][ODBC SQL Server Driver]Unable to open BCP error-file
I checked the microsoft website and it said that the error file might be non existent or in use. How can i know what is the error file that is being called by bcp_init?
Thanks,
dbcc opentran - SPID (server process ID): 74s
shrinkdatabase taking looooong time
Finding out Total Disk Space in TSQL
Can I kill DBCC Shrinkfile???
Is it safe to kill DBCC Shrinkfile? The process has been running for 30 minutes on an 11GB database. I have no idea how much more time it will take to shrink the database and would like to kill it, assuming that would not cause a 30 minute rollback.
Dave
Question about disk space report
Lock timeout request period exceeded error while trying to execute stored procedures
Msforeachtable
Is there a way to insert the output from the sp_msforeachtable proc in to a table.
the query i am trying to run is :sp_MSforeachtable 'sp_spaceused ''?'''
I tried the different variations of the insert statement as well but that didn't help as well.
Any ideas!!!
TIA
BCP produces garbled output
Use sp_MSforeachtable to gen COUNT(*) for each table in MyDBname
I'm trying to dynamically COUNT the # rows per table in a DB using sp_MSforeachtable. The following syntax executes DBCC CHECKTABLE for each table in my DB.
HOW can I modify the following SQL to perform a SELECT COUNT(*) from each table in my DB?
USE MyDBnameGO
sp_MSforeachtable @command1="print '?' dbcc checktable ('?')"
/* NOTE:You can issue up to three commands to the stored procedure using @command1 through @command3. */
Pros/Cons between Default vs Named Instances
My situation is that our network admin has come up with a new, much more complex naming convention for our company's servers. They contain dashes and the names are sometimes quite long. I am flexable enough that I can type in the extra characters, but it does cause some problems when referencing one of the servers with a funky name...but I digress. The main problem is that I feel I am ceding some control of my SQL environment to the network admin.
In the past I have always simply used a default instance of SQL because the machine name was not an issue. Now that it is, I am considering using named instances of SQL so that I have more control over my SQL environment. The challenge is that I am not familiar enough with the differences between the two. I am specifically interested in knowing if having named instances makes it harder for app developers to connect to my servers, though any and all information about this topic would help me.
Unfortunately, I don't have the resources to simply throw a named instance out there and see what happens without knowing what I'm getting myself into (otherwise I would). I have been looking around online for posts regarding and benefits or complications arising from using a named instance of SQL over the default instance, but have not found anything that satisfies my needs.
I would like some ammo to give to management that would convince them to allow me to try a named instance of a SQL server instead of using the default name like we always have. Likewise, if someone feels that I am being irrational and should just deal with it, I would like to hear your views as well.