Viewing 15 posts - 826 through 840 (of 13,445 total)
SQL-DBA-01 (9/26/2016)
Wanted to know if there is there any way to have database names aliases in SQL Server?
For example, there is a database with Name: "database A". Can...
September 26, 2016 at 2:56 pm
there's a neat trick using FOR XML to get a delimited list of columns.
here's a snippet i wrote that i use in a procedure to generate sample insert/update/merge statements.
it assumes...
September 20, 2016 at 4:32 pm
First, use Central Management Servers or Registered Servers; that will be where you add new servers as you discover them.
That functionality is built into SQL Server Management Studio, so there's...
September 20, 2016 at 7:44 am
Besides running the script with an impersonated credential, which solves the SQL problem,i would think you need an explicit path to your sql file:
sqlcmd -S myserver -E -i "C:\Data\AutomatedScripts\DeleteRecordsTest.sql"
September 13, 2016 at 7:40 am
for a large script, you'll want to execute it via sqlcmd instead of trying to open it in SSMS and executing it.
September 12, 2016 at 5:54 am
did you try selecting from the temp table, and left joining the larger table?
from your description, it sounds like your first table is the larger table, and you inner join...
September 12, 2016 at 5:42 am
you are doing it correctly, but it depends on what is doing the presenting.
In Grid mode in Management Studio, CrLf are ignored(converted to spaces) FOR PRESENTATION ONLY, if you copy...
August 30, 2016 at 7:56 am
SQL_Student (8/29/2016)
Thanks I tried that, but if user has sysadmin role he still has access to the db 🙁
in general, If someone has sysadmin access, you cannot restrict access to...
August 29, 2016 at 5:34 am
when the view is actually compiled, the wild card is expanded to the list of actual column names in the compiled version of the view;that's to avoid dynamically having to...
August 28, 2016 at 5:57 am
there's a number of powershell scripts that use SMO to script out all objects as well;
you could easily set something up to call that on a regular basis.
I'll see if...
August 23, 2016 at 11:23 am
tobypaul509 (8/23/2016)
I need to purchase a tool for my...
August 23, 2016 at 9:04 am
ChrisM@Work (8/23/2016)
JasonClark (8/23/2016)
CREATE TRIGGER [TR_ProtectCriticalTables]
ON DATABASE
FOR
DROP_TABLE
AS
DECLARE @eventData XML,
@uname NVARCHAR(50),
...
August 23, 2016 at 8:54 am
GilaMonster (8/22/2016)
Try filtering on database_id, or is the db_id the id of the connection rather than the table?
doh simple and obvious;
the database_id =2 , regardless of what database context that...
August 22, 2016 at 9:52 am
whenever the difference between estimated rows and actual rows is off by a lot(order of magnitude or more,
it usually means the statistics are out of date enough to adversely affect...
August 17, 2016 at 7:15 am
it's an easy fix.
change the NOINIT TO INIT
that is append vs create/overwrite.
mwinn (8/11/2016)
August 11, 2016 at 2:04 pm
Viewing 15 posts - 826 through 840 (of 13,445 total)