SQL management studio 2012 table from an other database keep coming back automatically - sql-server-2012

I am learning T-SQL. Every time I create a new database, table from a deleted database keep on appearing automatically. :-( don't know how to stop it.

Check in the System Database -> Model. Delete the table from there. Then create a new database and it should "appear" again.

Related

Update on table really slow in ACCESS, fast in Management Studio

There is a table with trigger in our SQL database. (sql server 2014). When updating record from Microsoft SQL Server Management Studio update takes like 1/10 sec. When the record is changed in MS ACCESS (in the form) it takes like 5-6 seconds to update. There is a trigger on that table, but the same operation directly from MSS Management Studio is fast, so it is not a problem with a trigger itself. THe trigger has to insert 1 record to 15 milion records table. I am looking for reasons why the same operation from ACCESS and SQL management studio can take 40 times longer. Any suggestions? Or links to known issues in that topic?
EDIT:
It's ACCESS 2003. It's subform bound to form by ID field. I am edditing simple integer column of record. I use normal connection with my sql server, it's adp project and we just use typical connection for it. I tried to do update from VBA (the same project) but from simple module -> the same effect. So it does not metter if it is eddited from form or update command is send from other module to that table. It still takes long.
To narrow things down I would still suggest to disable the trigger and see if the issue persists.

Creating a blank copy of a SQL Server 2012 database on the same Instance

I'm trying to determine the best way of creating a blank copy of a SQL Server 2012 database, renaming it & placing it on the same server instance. I could restore/rename a backup copy, and then delete all the data, but there are quite a few tables/views, stored procedures, triggers, etc.
Are there any drawbacks with the "generate scripts for database objects" wizard? Just trying to figure out the most efficient way to create a blank copy & would appreciate anyone's experience/wisdom on the topic.
I am running a SQL Server 2012 Enterprise edition. We have a database that our colleagues like, so we are planning to create a copy & populate with their data instead of our data.
Go to Object Explorer ,Right Click the database you want to create a blank copy of.
Right Click --> Tasks --> Generate Scripts
Select the entire Database, you also have the option to select specific objects, In advance option select schema only.
I would prefer this method over any other, as Restoring a Copy of database and then deleting data means doing a lot of work which was never required to begin with. Backing up data that was never required, restoring unwanted data and then finally making sql server to delete it, a lot of unnecessary work.
Another reason why scripts are better over other options, These scripts will use fresh pages to write all of this data. Imagine you having to write something on a brand new note book as compare to a note book where you had to erase first and then use it to write data on it.

sql server:saving changes to table created

Hello everyone I'm using SQL Server 2008 Management Studio. When I change my database table and try to save changes I got this error
saving changes is not permitted.the changes you have made requires table to be dropped and re created.
And I found that by turning off the prevent saving changes option I can avoid this error. But my question is what are the problems I may face in future by turning off the prevent saving changes option? Is there any other method to avoid this problem?
If you turn off saving change i asume that no change will be made to the table. In my experience, SQL Server Management is not the best way to make changes to an existing table, especialy if got data on it. You will find many cases in wich gives you this error and you have to manualy write the ALTER TABLE to make the changes you want. So my advice is always to use ALTER TABLE. Hope this help.

save the whole database to a query in sql server 2008

I'm trying to save the whole database to a query in sql server 2008. I have experience with mysql and phpmyadmin, and over there I used to have a simple button to save the database, including constraints and basically everything, to a simple query.
that query basically recreates the database i created just as it was. I think you guys understand what I mean.
is there such an option in ms sql server? thank you in advance.
You can generate scripts to recreate the database structure in SSMS:
Right-click a database, choose Tasks > Generate Scripts... and go through the wizard.
You do not get insert scripts for all the data by default, you need to choose that in the Advanced options in the wizard, Types of data to script choose Schema and data/Data only/Schema only`
For SQL Server, I generally go with a backup/restore point of view. You can backup your entire database to a file, and then choose to restore that database (To another name as I often use for recreating new test databases).
I don't know about creating a query out of the database, but the effect of both seems to be the same result.

Microsoft SQL Server 2005 Merge replication deleting records on subscriber

I created a simple merge replication. I used the default settings to create the publication which was creating a script to create the snapshot that Occurs every 14 day(s) at 12:05:00 AM. First, I am not sure why it needs to run every 14 days. Second, after researching for hours, I could not figure out how to not replicate deletes. Whenever I create the subscription and run the script, it creates a mirror image of everything that the publisher has and deletes any records in the subscriber that were not in the publisher. I need both publisher and subscriber to be merged without any deletes...Just inserts and updates.
I am a beginner when it comes to Microsoft SQL Server Management Studio 2005. If I need to modify any scripts or stored procedures could you please let me know how to do that. Whenever I try to modify a script, it asks me to save it to a file and I am not sure how to get it updated with the changes in the database.
Thanks
-Dimitry