How to create maintenance plan using sql script with out maintenance plan wizard. Please don't suggest olahallengren solution. His script is not exact relpica of maintenance plan.This means, he created only jobs but not maintenanceplan name in management-->maintenaceplan fodler.So, let me know,  Is it possible or not to create maintenance plan using sql script?
121315
Is there a way to copy maintenance plans from one SQL Server 2012 to another? Both servers are not accessible via the same copy of Management Studio at the same time (on different networks).
61549
Is there a "best" way to automatically restart SQL Server on a regular basis? I read that I could create a batch file to net start, net stop the agent and service in a batch file and schedule that, but I was curious if there was a better way of doing this.  Please nevermind how this is indicative of a larger problem of operation, I've been arguing this for a month and we've ended up here.  Thanks :).
54874
My question is, if you create a new domain user account for each of the SQL Server processes, what permissions should be set for each account? Or does the SQL configuration manager actually take care of this, and I just had an unforeseen issue?  I quite often have to setup Microsoft SQL Server and wondered if anyone can provide advice on configuring the accounts the services should run as. IMO this has been vaguely documented by Microsoft, while they point you in the right direction I have never been able to find any concrete examples.  To summarize what I've seen so far:  For simple deployments\development environments it is OK to use the virtual account defaults the installer uses: e.g. NT SERVICE\MSSQLSERVER  Avoid using the SYSTEM account, this is not secure.  For production and in domain environments it's recommended to use either a Managed Service Account, or create a domain user account (not an admin) for each service. Allegedly if you use a domain account at installation time the installer will set any required permissions for you.  If changing the service account on an existing install from a virtual account to a domain account the recommendation is to use the SQL Server configuration manager to set the new service accounts. Allegedly this will set any required permissions for you.  I just tried changing the service account in an existing install to a domain account and it would give me a logon failure until I granted the account log on as service permission, which contradicts the part where the SQL Server configuration manager will set any required permissions. (Although I'm not sure if a GPO may have interfered with setting this local security policy)  Microsoft does provide a list of the permissions that the SQL Server Setup grants .  But it's not clear to me if that is something I should be doing manually for the user I create to run the service as, or whether using the SQL config manager should automatically set these permissions.  SQL Server 2014, Domain Controller is on Windows Server 2008 R2.
88145
Since starting working where I am working now, I've been in an endless struggle with my boss and coworkers in regard to updating systems.  I of course totally agree that any update (be it firmware, O.S. or application) should not be applied carelessly as soon as it comes out, but I also firmly believe that there should be at least some reason if the vendor released it; and the most common reason is usually fixing some bug... which maybe you're not experiencing now, but you could be experiencing soon if you don't keep up with .  This is especially true for security fixes; as an examle, had anyone simply applied a patch that had already been available for months, the infamous SQL Slammer worm would have been harmless.  I'm all for testing and evaluating updates before deployng them; but I strongly disagree with the "if it's not broken then don't touch it" approach to systems management, and it genuinely hurts me when I find production Windows 2003 SP1 or ESX 3.5 Update 2 systems, and the only answer I can get is "it's working, we don't want to break it".  What do you think about this? What is your policy? And what is your company policy, if it doesn't match your own?  What about firmware updates (BIOS, storage, etc.)? What about main O.S. updates (service packs)? What about minor O.S. updates? What about application updates?  My main interest is of course in updating servers, as client patch management is usually more straightforward and there are well known tools and best practices to handle it.
76803
While reading  about Plan Caching in SQL server, I came across a tidbit I was unaware of:     ... for reuse it is necessary that the objects that the batch references do not require name resolutions. For example, Sales.SalesOrderDetail does not require name resolution, whereas SalesOrderDetail does because there could be tables named SalesOrderDetail in multiple schemas. In general, two-part object names (that is, schema.object) provide more opportunities for plan reuse.   I'm looking for some clarification about how important it is to use two-part object names, since "In general, two-part object names provide more opportunities for plan reuse.", yet it starts by saying it's necessary.  More specifically, most of the stored procedures I deal with are in the dbo schema and reference only dbo objects, without specifying the dbo prefix.  Are these prevented from reusing cached query plans, even with everything using the default schema?
84415
I have little experience with testing and I'm being hired to work on a team where I am the only tester. I'm struggling to find the best approach for the process. Being alone should I write down a test script or not? Wouldn't it take too much time? I have no experience in writing test scripts, could anyone help with a good reference (book, video or whatever), please?
20632
Is there an easy way to chase down table/stored procedure/function dependencies in SQL Server 2005+?  I've inherited a giant application with lots of tables and even more stored procedures and functions that are long and interlinked.    At the end of the day is there a way to build a dependency tree?  Ideally what I'm looking for goes in both directions:  For a table/procedure - what depends ON it?:  Show me all the stored procedures that eventually reference it (ideally in a tree view such that sub procedures nest out to the bigger procedures that call them)  For a procedure - what does IT depend on?:  Show me all the procedures and tables that a given procedure will (or could) touch when running.  It seems this tool shouldn't be that hard to make and would be incredibly useful for DB maintenance generally.  Is anyone aware of such a thing?  If this doesn't exist, why the heck not?  The built-in functionality in Management Studio is nice but the information does not appear to be complete at all.
35796
I have a database that is set to the 'Full' recovery model, and I'm creating a maintenance plan to backup the Transaction Log every 15 minutes. A full backup is then taken once every 24 hours.  I was wondering: will the maintenance plan for the transaction logs create a lot of different files every 15 minutes, or will it by default append to the same file for 24 hours?  Also: what is preferred? I couldn't find anything on this subject (or maybe I was Googling the wrong words).  Thanks for any pointers anyone can give me.  EDIT: I also see that the checkmark "Verify backup integrity" is OFF by default. Is there a risk with turning it on? It seems to be that it should be on by default, so is there a reason for not using this?
32093
Where can I find ready-to-use database models ?  I don't need a database with data in it, but only schemas (UML diagrams). Perhaps something like the , but much more complex and real world.
97097
I am looking for the best practices or analysis someone would have followed to identify the unused or inactive databases on my SQL Server.  I went through many articles, which say possibly to go for user connections and activating traces to find the DB usage, but implementing those created more confusion.  Kindly help me in understanding if there is a better and safer way I can take my databases offline once identified.
89762
It was decided that we should move to using a (MySQL) database for our application logs (it is a Java app using the logback lib). I am hoping to find something like tail -f that I can use with a specific table in that database that will show me new rows as they are added (similar to how tail -f worked on log files).
18323
I'm not sure if I'm googling for the wrong thing but I can't find an answer. We're running SQL 2014. The SQL Server and SQL Agent processes are both running under Domain Managed Service Accounts.  When SQL was installed NT SERVICE\MSSQLSERVER, NT SERVICE\SQLSERVERAGENT, NT SERVICE\SQLWriter, NT SERVICE\Winmgmt are all setup as SysAdmins.  If I am running SQL and SQL Agent as a Domain user, do I still need these NT Service accounts, and/or do they need to be SysAdmin?
91317
Not sure this is something which people will know on here are not.    We currently have a BI setup where we have Integration services on one SQL instance and the data warehouse database on a separate SQL Instance.    My question is, as no users physically connect to the Integration services SQL instance and it is purely used to execute package from the integrations service catalog via SQL agent, do we need to License every user i.e. Cal's for that SQL instance.  Basically i'm wanting to know if I could utilize SQL 2016 for an integration services instance and use features like Json manipulation etc and then load this data into the 2014 version instance...but what level of licensing will I need?
54579
Is there a tool out there which can convert SQL syntax to LINQ syntax?   I just want to rewrite basic queries with join, etc., to . It would save me a lot of time.
66768
I've got my code sort of segregated as "coherent blocks" that I can insert into a longer "configuration script" over and over, and one of the patterns I'm using is this:  CREATE TABLE #WidgetSetting  (     WidgetID bigint not null,     Name nvarchar(100) not null,     Value nvarchar(max) not null,     CreateDate datetime not null )  INSERT VALUES  MERGE TABLES  DROP TABLE #WidgetSetting   But now SSMS is complaining that the object already exists by the next time the CREATE TABLE fires. What gives?  I think it's obvious I'm going to have to declare the table once at the beginning of the script, truncate instead of drop, but it's frustrating, naturally, to not be able to just drop the table and use the same name again.
59267
I'm trying to export a simple maintenance plan from an SQL Server instance.  I want to check the export into source control, and apply the exported maintenance plan to functionally identical instances.   and  recommend using Integration Services to export the maintenance plan.  When I try to connect to Integration Services on the Export target, I receive the following error:     Connecting to the Integration Services service on the computer   "WEBSERVER" failed with the following error: The specified service   does not exist as an installed service.   We chose to disable Integration Services on WEBSERVER because we use this box only for serving data to consumer applications. All data on WEBSERVER is replicated from a backend instance. Integration Services is used heavily for processing data on the backend instance.  Is there a documented way to export a maintenance plan without using Integration Services? Does Microsoft support it?
107732
Batch jobs error emails report:      The transaction log for database 'WebDB' is full.   No, it isn't. Its 90% free. The transaction log backups run normally. My hardware guy tells me the hardware is running perfectly, with plenty of space. SQL Server 2008 SP3, but not R2.  I'm a developer, we no longer have a DBA. So it falls to me to try and fix this.