Browsing articles tagged with "sqlserver - 2/164 - Admins Goodies"
Nov 8, 2012
tom

Advised auditing method for MS SQL to track changes made to a specific table by a specific user?

What is the best method for tracking changes or logging the queries done to a table by a specific user when the person is using Management Studio? I’m using 2008 R2 Express Edition and want to specifically track a single user who logs in through Management studio and runs queries to make changes manually. I want to see what query was run and thus determine what was changed and how. I am not interested in […]

Continue Reading »
Oct 31, 2012
tom

MS SQL Server DB version without restoring?

Is there a way of telling which version of Microsoft SQL Server a database backup is from without restoring it? Asked by SteB RESTORE HEADERONLY FROM DISK = ‘pathTobackupFile’ The database version can be found in the column: DatabaseVersion From Jonathan Kehayias blog post here the number in this column: SQL Server 7.0 databases have version number 515 SQL Server 2000 databases have version number 539 SQL Server 2005 databases have version number 611/612 SQL […]

Continue Reading »
Oct 18, 2012
tom

Restoring Microsoft SQL databases to a different disk partition on the same server

We have a SQL Server 2005 box running Windows Server 2003 R2 Std 64bit. We have two production databases residing on one partition (which is an iSCSI software target), that partition got apparently got corrupted and the databases are not working properly and pulling all kinds of consistency check errors. We have created a new iSCSI target and introduced it to the SQL server as a new disk partition. we have good backups that we […]

Continue Reading »
Oct 16, 2012
tom

Is it possible to exploit a sql injection vulnerability with a select only permission, if I knew admin credentials?

A friend pointed out a sql injection vulnerability one an application I work with. This search parameter: ‘; exec xp_cmdshell ‘dir'; — Returned the message: The EXECUTE permission was denied on the object ‘xp_cmdshell’, database ‘mssqlsystemresource’, schema ‘sys’. Because the search is run from an account that only has select permissions on a few tables and stored procedures. I was wondering, if a malicious user happened to know the login information of an admin account […]

Continue Reading »
Oct 4, 2012
tom

How to move SQL server install to new machine

I have a Windows Server 2008 R2 that had a unclean power down and now the whole install is broken. Before I struggle to resurrect the machine, I’d like to know if there is a way to take the installed files from the broken server and somehow move them to a new machine. I have backups, but not of all the databases, so its pretty useless as I need them all. Asked by Samuel Hearn […]

Continue Reading »
Sep 30, 2012
tom

Will SQL Server 2012 install + run Windows 2003

I can’t seem to find any information but can I install SQL Server 2012 Standard Edition on a server running Windows Server 2003 R2 x64? I don’t intend to use this for production just for testing and I am unable to rebuild the OS at the moment. Asked by Seph No. According to the well hidden and difficult to follow documentation on MSDN (here) it requires Windows 2008 / Windows Vista or later. Answered by […]

Continue Reading »
Sep 29, 2012
tom

How to delete MSSQL database using sqlcmd

I have multiple databases created by POCO approach of website building and I want to delete those. However I get error. Command sqlcmd -S .\SQLEXPRESS -q “drop database aspnet-ORData-20120910180110″ Error Msg 102, Level 15, State 1, Server MY-PC\SQLEXPRESS, Line 1 Incorrect syntax near ‘-‘. Asked by Qmal Try this: sqlcmd -S .\SQLEXPRESS -q “drop database [aspnet-ORData-20120910180110]” Note the square brackets around the database name. Without them the dashes (“-“) are seen as tokens instead of […]

Continue Reading »
Aug 27, 2012
tom

SQL Server: Memory Usage High (7GB) + Page File Usage High (7GB) but CPU Usage (2% to10%) [closed]

Possible Duplicate: SQL Server memory constantly going up, from 1GB RAM used to 7GB in a week. Hello all, I am running SQL server with a lot of scripts that update large amounts of data (millions of records on several tables). However, I think there is a memory leak as RAM usage goes to 7.5GB of the possible 8GB – this is on a 8 Core Server. The Page File goes to 7.28GB as I […]

Continue Reading »
Aug 19, 2012
tom

PHP 5.4 getting MSSQL to work

I’m running Apache and PHP 5.4.3. I have a script that uses mssql_connect. When I execute the script I get: Fatal error: Call to undefined function mssql_connect(). I cannot use sqlsrv. I copied the file to ntwdblib.dll and mssql is not commented in php.ini. Any way around this? Thanks! Asked by user1594313 My understanding is in PHP5.3+ it was removed. SQLSRV is your only option in a windows environment. http://www.php.net/manual/en/intro.mssql.php Answered by austin Check more […]

Continue Reading »
Aug 18, 2012
tom

MS SQL can’t connect with JDBC…permissions issues?

I used “sa” to create a user “secure1″ and I can connect as secure1 using Management Studio locally and remotely. When I then switch to JDBC with the url(I use two \ in the url below but stackexchange stripped the other slash out because java sees the \ as an escape sequence) jdbc:sqlserver://192.168.111.111\MYDBQA:1433;Initial Catalog=mydatabase I just get a Login Denied. If I erase Initial Catalog, I get Login Denied. I ended up giving my secure1 […]

Continue Reading »
Pages:«1234567...164»