Tag Info

New answers tagged

1

Never mind. Found it. sp_helptext 'TriggerName' worked like a charm.


0

Parse checks that the syntax of the query is correct, but it does not check the object names. It can not check object name: if you are using nested SPs with temp tables for example, the temp table will not exist when the subsequent SP is parsed (it is defined in the 'parent' sp).


0

I don't think there's any way to do this with a parse, but you could try running the script inside a transaction then rolling back that transaction at the end. If there's an error, it should throw it, but even if there isn't, there won't be any lasting changes.


0

Rght click on SSMS, Run as administrator, sometimes this error appears. Once i couln't attach mdf file to database due this error.


2

There is also a way to create SQL Scripts Repository. Add new template folder Add script files


0

I've used both Subversion and GIT in the past (both free), and I think Red Gate has some tools that integrate into SSMS.


0

The default install of SQL Express installs a named instance, SQLExpress. To have more than one instance, you'd have to have done more than one install. You probably just need to refresh the one that is missing the databases in your image. If you think you have more than one instance of SQL Express installed, you can verify this by opening the SQL Server ...


2

Hypothesis one: You have installed a named instance called SQLExpress. This instance was configured to listen on the default SQL Server port 1433. Therefore wether you connect to 'localhost' or to 'localhost\SQLExpress', you are connecting to the same instance. Hypothesis two: You have installed two different SQL Server instances, one named SQLExpress and ...


0

Ram, start your own thread (Ask Question - in top right). You'll get a better response that way. When you do start your own thread - include more detail: Can you log in to the Instance at all? Are you using Mixed Mode authentication? What version of SQL/ORACLE? Etc. Don't post your new question at the end of someone else's thread - that's not cool.


3

Yes, this is possible by creating a user with 'securityadmin' server role and then if required Deny his access to SQL Server Query Window through LOGON Trigger USE [master] GO ----Create Login CREATE LOGIN [DBA_ErrorLogUser] WITH PASSWORD=N'123', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF GO --- ...


2

Variable length character types only store actual content put into it and odn't keep the extra space allocated (thus the name "variable length"). As a result, when you INCREASE the size of a variable length column, the data storage doesn't actually change (in the table or the index). The SQL engine is smart enough to know that and doesn't do anything to ...


2

When you script the index you need to make sure the scripting option is not set to SQL Server 2005. Tools / Options / SQL Server Object Explorer / Scripting / Script for server version I suspect this is the problem (and it happened to me, too).


1

Here's a long shot: I think your Management Studio has for some reason changed the keyboard mappings to the 2012/2014 default setup, which is more similar to the regular Visual Studio apps. This changed as of SQL Server 2012 so, among other things, Ctrl+F1 now opens Books On-Line. To verify if this is the case for you, you probably won't be able to execute ...


2

Step 1: Get query session id using below query SELECT sqltext.TEXT, req.session_id,----- SPID req.status, req.command, req.cpu_time, req.total_elapsed_time,req.start_time,db_name(database_id) DatabaseName FROM sys.dm_exec_requests req CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext where [status] <> 'background' and command<> 'TASK ...


1

Use KILL (SPID) to kill the query.



Top 50 recent answers are included