Tag Info

New answers tagged

1

The paths in the generated script are the locations where the data and log files should be on your laptop. If you copy paste the script to amazon AWS that will be the location where the files are created when you create the database. If that path doesn't exist on the Amazon instance you will get errors. You could comment out the lines and then the files ...


0

You have just downloaded the Management Studio, which is nothing else as an IDE. It seems to me, that you haven't downloaded/installed the SQL Server itself. You can download it right here. On the website, just hit the download button and check the SQL Server, which is called something like SQLEXPR_x64... or if you running a 32 bit system SQLEXPR_x86.... ...


3

The logical built in place to put this kind of metadata about columns might be in the description box when the column is selected in the table designer. Behind the scenes this gets saved as an extended property with MS_Description as the property name. It would be extremely pushing it to claim that this is "standard" or common practice though.


0

After researching and reading different threads on this website I was able to resolve my own issue... The syntax below will allow you to place comments either before or after your query, so that the comments display on the output.txt file BEGIN DBMS_OUTPUT.PUT_LINE('TEXT GOES HERE '); END; / Here are some commands you can use while using ...


4

The query will be executed by sp_send_dbmail asynchronously, on a separate session that has msdb as current database. So you must use three-part names in your query: @query = N'select substring(PostOfficeBox,1,4) as [Postcode] ... from TestCRM.dbo.AccountExtensionBase as a JOIN TestCRM.dbo.CustomerAddressBase as b ON a.AccountId = b.ParentId ...'


0

following command can be generated FT properties first page (bottom Catalog Action) -> rebuild catalog USE [DBNAME] GO ALTER FULLTEXT CATALOG [FT Name] REBUILD after this Processing notifications turn to Idle and Rebuild command become enabled


2

This should give you a start. It assumes that you've already cloned all the relevant objects and that all of your permissions are at the object or schema level (if you have column-level permissions, the script gets a little more complex, but not too bad). DECLARE @oldschema SYSNAME = N'schema1', @newschema SYSNAME = N'schema1_dev'; DECLARE @sql ...


8

You could create a domain group that you could use to create as login and user on your SQL Server and YourDatabase. After creating the domain group, you could do something like: USE [master] GO CREATE LOGIN [DOMAIN\AllUsersForYourDatabase] FROM WINDOWS GO USE [YourDatabase] GO CREATE USER [DOMAIN\AllUsersForYourDatabase] FOR LOGIN ...


1

You can simply use this : SELECT sc.name +'.'+ ta.name TableName ,SUM(pa.rows) RowCnt FROM sys.tables ta INNER JOIN sys.partitions pa ON pa.OBJECT_ID = ta.OBJECT_ID INNER JOIN sys.schemas sc ON ta.schema_id = sc.schema_id WHERE ta.is_ms_shipped = 0 AND pa.index_id IN (1,0) GROUP BY sc.name,ta.name ORDER BY SUM(pa.rows) DESC Various other methods ...


1

Drop the WHERE object_name(object_id) = 'xxx' and instead GROUP BY your object name. Also, join back to sys.objects to get those objects of type 'U'. SELECT OBJECT_NAME(st.object_id), Total_Rows = SUM(st.row_count) FROM sys.dm_db_partition_stats st INNER JOIN sys.objects AS o ON o.object_id = st.object_id WHERE (index_id < 2) AND o.type = 'U' ...


0

I would suggest you to verify the service accounts you are using: SQL Server service account requires CONNECT permissions to partners’ endpoints Best option is to use domain accounts for all partners If using Local Service or Local System, must use certificate authentication. Ensure that the start date of the certificate is the current date or a day ...


3

What you should check first is your server or client DNS settings It's not the rare that your SQL Server have the problem connecting to Active Directory. If you try with local Windows account I am sure that you will not have the at issue. It's not unusual that server is configured with public internet DNS and when SQL Server connects to DC to check the ...


0

It looks like the only thing I can see to change is .csv to .txt such as: 'bcp "exec admin..sp_ReportInventoryIssues" queryout \\test01\testqdls\invtrans\testfile.txt -c -t, -T -S'+ @@SERVERNAME source EDIT: My first answer is way off, beg your pardon. I think it may have to do with quotes for the executable string: set @sql = 'bcp "exec ...


0

Turns out that our GoDaddy dedicated server had a Cisco hardware firewall that had one IP permitted for TCP port 1433. My VM was on the network that had that IP, while my other machine was not. After spending several hours trying to get the Cisco ASDM software to launch properly, I was able to add the IP address of my other machine and it's now working. ...


0

Could you try : Named Pipes instead of TCP in SSMS connection properties SQL authentication (create a SQL login if needed) instead of Windows


0

You can use CDC(Change Data Capture) It will track changes. But if you alter the table, CDC Will not work.. you can handle this by ... 1. Copy all data from change table to another table... 2. Disable CDC For that table.. 3. Alter table... 4 Enable CDC For that Table.. CDC Works fine. it is assynchronous with transactions. --Enable ...


0

I won't use a own product for this. You have two simple ways to do it on your own. You can use CDC (Change-Data-Capture) which will do this automatically. You can retrieve the changes afterwards for some time. (If you don't need that every value is hold back for ever) You can create an Before-Update trigger, which will generate a own log for a record ...


7

Try running a trace with SQL Profiler while you, and then your coworker, connect to the server. Select RPC, SQL Statement & PreConnect - Starting/Completed. Select Save Results To Table option, then compare the 2 tables to find the bottleneck. Or, since you're connecting by IP, it could be doing a Reverse DNS lookup. If so, add a entry in your hosts ...


2

Use SSMS 2014 SP1. That works. Currently.


0

Here are some of the things from my connection issue checklist Check for an alias on the machine that can't connect Check for firewall rules Check and make sure the SQL Server drivers on the machines that don't work are up to date. Try connecting with servername:port rather than just servername Try pinging the SQL Server IP address from the machines that ...



Top 50 recent answers are included