management-studio-express

How to send an e-mail from database if some condition is met?

心不动则不痛 提交于 2020-07-23 08:18:06
问题 I am beginner. We have: database, schema, tablename Table contain columns: Number , State , ExportTime , ImportTime I need to create a procedure which will send an email from the database (MSSQL) to my mailbox if the amount of the records is bigger than 5 (for records where State=2). That e-mail must contain all rows of that table (if condition is met) in descending order. Then, the procedure must be performed every hour as a job and connect to server using Linked Server... I know only how to

How to send an e-mail from database if some condition is met?

懵懂的女人 提交于 2020-07-23 08:16:17
问题 I am beginner. We have: database, schema, tablename Table contain columns: Number , State , ExportTime , ImportTime I need to create a procedure which will send an email from the database (MSSQL) to my mailbox if the amount of the records is bigger than 5 (for records where State=2). That e-mail must contain all rows of that table (if condition is met) in descending order. Then, the procedure must be performed every hour as a job and connect to server using Linked Server... I know only how to

sql network interfaces error 26 - error locating server/instance specified

五迷三道 提交于 2019-12-23 09:33:41
问题 Okay so a lot of people have posted a similar question, however I don't seem to be able to find a solution to my problem in any of them. So this is my situation. Yesterday I was working with my SQL Server Express through SQL Server Management Studio. I close my projects as I've done multiple times before and then this morning when I tried to connect again with the tool is gives me this error: TITLE: Connect to Server Cannot connect to .\SQLExpress. ADDITIONAL INFORMATION: A network-related or

instance servername sql server 2012

落花浮王杯 提交于 2019-12-23 02:56:48
问题 Hello I have installed management studio 2005(x64) alse I have microsoft sql server 2012 in my pc. But cant connect server due to dont know server name. (if sql server 2008 express were in my pc, default servername would be "./sqlexpress") How can I connect server in my own pc ? And also I wanted to know; Should I use another management studio ? can there be a problem use ms2005 with sqlserver 2012 ? Do you recemmond other studio ? (with exp. reason please) Thank you anyone who just feel to

SQL Server could not find stored procedure 'show'

别说谁变了你拦得住时间么 提交于 2019-12-10 21:04:19
问题 I can't use the most basic procedure, show , as it throws an error: Msg 2812, Level 16, State 62, Line 1 Could not find stored procedure 'show'. I used: SHOW DATABASES Please help me find answers to this issue. 回答1: To list all Databases in SQL Server, Select * from sys.databases To exclude in-built DBs, Select * from sys.databases WHERE name NOT IN ('master', 'tempdb', 'model', 'msdb'); 回答2: Try to refresh local Cache which is under the Intellisense. 来源: https://stackoverflow.com/questions

In SQL Server Management Studio 2014, the New Trigger menu option is disabled

安稳与你 提交于 2019-12-04 16:56:12
问题 I want to add a new trigger to my table. As seen in the picture, New Trigger button is not active. new index, new column, new contraints, new statics is active. I do not understand what is the problem. 回答1: You don't need to use the menu item to create a trigger. Just open up a query window and write the create trigger statement there. To get some help with the syntax you can use a snippet in the editor. Right click on the surface of the query editor and select Insert Snippet and then select

CREATE DATABASE ends up cloning an old database

不羁的心 提交于 2019-12-01 23:46:03
问题 I have run into something quite odd, i haven't had this issue before, or maybe i'm missing something here. In SQL Server Management Studio 2012 i am trying to run a Query to create a new database but it ends up cloning an old database, the code i'm using is: CREATE DATABASE SEC_SSG_INOUT; GO USE SEC_SSG_INOUT; GO The database gets created with the correct name but it contains the same tables and stored procedures as an old database called SEC_SSG, but with empty data. What is going on here?

CREATE DATABASE ends up cloning an old database

安稳与你 提交于 2019-12-01 21:29:55
I have run into something quite odd, i haven't had this issue before, or maybe i'm missing something here. In SQL Server Management Studio 2012 i am trying to run a Query to create a new database but it ends up cloning an old database, the code i'm using is: CREATE DATABASE SEC_SSG_INOUT; GO USE SEC_SSG_INOUT; GO The database gets created with the correct name but it contains the same tables and stored procedures as an old database called SEC_SSG, but with empty data. What is going on here? You must have added these objects to your model database by mistake at some point. This gets used as the