Wednesday, June 5, 2013

[MS SQL Server] applying sp

[MS SQL Server] applying sp


applying sp

Posted: 05 Jun 2013 03:28 AM PDT

hi there,do we need to take SQL Services offline while applying service packs.

Transactional replication question

Posted: 05 Jun 2013 01:13 AM PDT

Hi all,I'm testing transactional replication on my laptop. I'm not able to understand as to why I'm able to add/drop columns to the articles and replicate these changes to the subscriber when I have set "Replicate schema changes" to False in the publication properties?I'd really appreciate your help.Thanks.

Stopping Job if running on particular time

Posted: 05 Jun 2013 01:28 AM PDT

Hi Experts,We have maintenance jobs running on all servers on weekends .Is there anyway i can stop these jobs if these jobs still run on monday morning.Thanks in Advance

:unsure: Backup Particular DB Users and there Permissions.

Posted: 04 Jun 2013 11:48 AM PDT

Hi Experts,Is there any way to just script out users permissions in a given db. I know there is a script from Microsoft called SP_HELP_REVLOGIN which scripts out entire users at instance level but I am not looking for that or I am looking to use Object Explorer Details from which I can script out the users, I am looking for a script which gives me users and roles for just Database A.My Stage,Dev & Test environments get refreshed very often so I have to take backup from production for database A and restore the database in Stage on Database A and same for other environments but when I am doing this Users and Roles of Production is coming with it and get restored on Stage and other environments so I have to drop them one by one and re-add Stage users and their permissions every time and it takes a lot of time. Is there any way I can only script out Database A Users and their Permissions and give them back. I searched on google but I couldn't find anything. Please let me know is there any way to do this.Thank you for your help in advance

SQL Wait Statistics

Posted: 04 Jun 2013 10:09 PM PDT

Hi AllI am troubleshooting an intermittent performance issue on a production SQL ServerI checked wait stats and SQLTRACE_INCREMENTAL_FLUSH_SLEEP is at the top of the listIs this something I should investigate further or is it just showing up because I have default trace enabled?Thanks

Transaction Log File "Does not Exist" - Help, please

Posted: 19 Oct 2011 11:03 PM PDT

I'm having problems with modify the settings on a secondary transaction log file in SSMS, so I thought I'd try with T-SQL. Turns out no matter what method I use, SQL doesn't think the secondary log file exists, but it lists it in a "Select * from sysfiles" command and in the GUI. I'm really confused here.We're in the middle of rolling out SP2 (it hit the Dev environment, but not Production yet). Here's what I'm running:[b]Production:[/b] Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2) [b]Dev:[/b] Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64) Sep 16 2010 19:43:16 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2) I right click the database (GUI), go to Shrink Files. Pick Log2 and get the following error: "Input string was not in a correct format. (mscorlib)." It lets me click OK and get back to the Shrink Files screen, make my choices, and click OK, but nothing happens no matter which of the three options I choose.Tried going into the database properties and disable Autogrowth. Got the following error when I clicked the final OK (to close the window): "Alter failed for Database <DB Name>. An exception occurred with executing a Transact-SQL statement or batch (Microsoft.Sqlserver.ConnectionInfo). MODIFY FILE failed. File 'DBName_Log2' does not exist. (Microsoft SQL Server, Error: 5041)".Say what?So I tried (in Dev) the same thing and got the same errors. Then I tried using the following T-SQL code in Dev:[code]ALTER DATABASE DBName MODIFY FILE (NAME = DBName_Log2, FILEGROWTH = 0 );[/code]Tried this with both the property in the "name" of the sysfiles response and then switched it to the physical name at the end of the path. Both attempts came up with the "File does not exist" error.The file is there. It's just not allowing me to touch it. I've backed it up, truncated it. I need to remove it, but I can't even modify it, let alone remove it.Any thoughts?EDIT: Found this thread in which many smart people posted responses ([url=http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=144747]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=144747[/url]). Selecting from sys.database_files and sys.master_files shows all log files with the same id numbers and the same names as selecting from sysfiles. So, SQL agrees with me that the log file is there, until I try to do something with it.

Building a server?

Posted: 04 Jun 2013 06:48 AM PDT

OK, I am in charge of specifying our new SQL server, our server now is 5 years old and we are seeing some performance issues. We are a small company and I am as close to a DBA as we have so bear with me.A few questions keep coming up…1. Physical or virtual? All of our servers now are virtual expect our SQL server.2. Should the report server be on a separate server than the database?3. We are running Backup Exec on our database server, is this ok?Our current server is as follows, do you see any issues with this setup?Dell Power Edge• Windows server 2008 r2 sp1• SQL 2008 r2 Standard• 24 gb RAM• 2x 4 core, Intel Xeon X5365 300GHz• A single Raid 5 (4 SCSI 15000 rpm drives)Thank you.Also we are wanting to upgrade to SQL 2012

No comments:

Post a Comment

Search This Blog