ssms

SSMS results as a clickable link

大憨熊 提交于 2019-12-02 02:46:35
问题 I am fairly new to SQL and I have looked around to see if i could find a way to do this if it is possible Here is my SQL query text: SELECT *, CONCAT('https://domain:8080/analyzer?sipid=',SIPCallId,'&cmd=GetAnswerWAV') 'FaxScope: Inbound Audio (WAV) Link', The result: https://domain:8080/analyzer?sipid=b38f9368905eadc713c42d5894512203898221635dac1a50e70-0084-7302&cmd=GetAnswerWAV In the SQL Query results, I have to copy/paste the url into a web browser to get the data this link should provide

Database created in SQL Server Management Studios cannot be found by Visual Studio 2010

不羁岁月 提交于 2019-12-02 00:19:26
I created a new database ( AC_2012 ) on my localhost in SQL Server 2008 Management Studio. I'm trying to connect it via connection string in web.config in Visual Studio 2010 Premium. It won't pick it up. <configuration> <configSections> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </configSections> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <connectionStrings> <add name="AC_2012" connectionString="server=.\SQLEXPRESS

Restored database missing views, stored procs and foreign keys

情到浓时终转凉″ 提交于 2019-12-01 23:08:46
I'm trying to create a copy of a database in SQL Management Studio (SQL Server Express) using Backup-Restore. Local to local. When I do it it copies tables and data, but ignores views, stored procedures and foreign keys. Object Explorer -> write-click "Databases" -> "Restore Database..." -> put in a name -> select a "from" database -> go This is the script that gets generated: RESTORE DATABASE [DbName_raw] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Backup\DbName.bak.1' WITH FILE = 1, MOVE N'GeoDo' TO N'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS

SQL Server Templates - How Do I Escape The Less Than Character?

我与影子孤独终老i 提交于 2019-12-01 21:49:32
问题 I like to use SQL Server 2005 templates to run frequently used queries. You can include parameters in your templates using this syntax: <LastName, varchar, 'Bob'> I have a query that needs the less than or equals to operator <= but unfortunately the SQL Server 2005 template interprets that as the start of a parameter. I have been unable to find a way to use the < (less than character) as a literal. 回答1: when I Specify Values for Template Parameters, this runs fine for me: select * from <xyz,

Unable to import/deploy database to SQL Azure: “The service objective (Business/Web) specified is invalid.”

烂漫一生 提交于 2019-12-01 20:29:12
问题 I'm trying to move my databases to a newer Azure subscription. I used to simply click "Deploy to Azure" on a local database from SSMS and have it deployed to a specified Azure server. Importing/Exporting a BACPAC file also works. However, I can't seem to do any of this on the new server. I keep getting the error: "The service objective 'Web' specified is invalid." Googling around, I found this thread explaining the need to update the CREATE DATABASE template to accommodate Azure Databases

Unable to import/deploy database to SQL Azure: “The service objective (Business/Web) specified is invalid.”

大兔子大兔子 提交于 2019-12-01 18:26:40
I'm trying to move my databases to a newer Azure subscription. I used to simply click "Deploy to Azure" on a local database from SSMS and have it deployed to a specified Azure server. Importing/Exporting a BACPAC file also works. However, I can't seem to do any of this on the new server. I keep getting the error: "The service objective 'Web' specified is invalid." Googling around, I found this thread explaining the need to update the CREATE DATABASE template to accommodate Azure Databases (Azure upgrade, I'm guessing). However, the hotfix provided is specifically for SQL Server 2014 and I'm

Cannot connect to SQL Server Analysis Services even though it seems to be running

限于喜欢 提交于 2019-12-01 17:15:09
问题 I just ran an "update edition" to update from SQL Server 2008 R2 Express to Enterprise. I first ran the update edition process, and then separately added the Analaysis Services component. All these processes ran without reporting any errors. When I open SQL Server Configuration Manager, I can see under "SQL Server Services" that Analysis Services is running. However, when I start up SQL Server Management Studio and get to the "Connect to..." dialog, in the "Server Type" dropdown I don't get

How to set (combine) two primary keys in a table

混江龙づ霸主 提交于 2019-12-01 17:02:06
For a small sales related application, we designed database using logical data model. Come to the stage to convert in to physical model. While creating table in SQL Server Management Studio Express, according to our logical data model, we need to combine two attributes to form unique id. Is it possible to combine two primary keys and set it? But while observing Northwind Sample, we found that in the ORDER DETAILS table, we can see two primary keys Order Id & Product Id . And according to rule table can't have two primary keys. So how it happened in Northwind? In my case how should I set two

Where are all those SQL Server sessions from?

為{幸葍}努か 提交于 2019-12-01 16:57:39
问题 After launching SSMS (2008 R2) on my dev machine, which I launch with "D:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" -nosplash -S localhost -d testdata without doing anything, in Activity Monitor I observe some sessions (TestData is my default database) Details of session 51: select @@spid; select SERVERPROPERTY('ProductLevel'); Details of session 52: DBCC INPUTBUFFER(52) Details of session 53: SELECT CAST(serverproperty(N'Servername') AS sysname) AS [Name

How to enable automatic transaction scoping on SQL Server Management Studio?

≯℡__Kan透↙ 提交于 2019-12-01 16:54:31
I'm used to work with tools like Toad or PL/Sql Developer for Oracle and every SQL statement I run on the query window runs automatically under a trasaction scope. So, if my SQL statement is not correct, or even if I miss something on the SQL script I can rollback only by clicking on a button at the UI. If everything worked as expected, I can click on another button for commiting the current transaction. On those tools I mentioned, I don't need to write SQL statements for begin, commit or rollback a transaction. Every SQL statement has an implicit transaction associated with. Is there a way to