SQL Server 2014 :: Not Able To Create Temporal Table

Jul 18, 2015

I was trying to create temporal table feature which gets introduced in SQL Server 2016 but I am getting this error while trying to create it; Cannot enable compression for object 'Department_History'. Only SQL Server Enterprise Edition supports compression

I have installed SQL Server CTP 2.0 on my system.
Microsoft SQL Server 2016 (CTP2.0) - 13.0.200.172 (Intel X86) May 21 2015 11:16:44 Copyright (c) Microsoft Corporation Express Edition on Windows NT 6.2 <X86> (Build 9200: )

View 3 Replies


ADVERTISEMENT

SQL Server 2014 :: Error - Cannot Create More Than One Clustered Index On Table

Aug 18, 2015

i have created a fact table which has unique cluster index as below,

CREATE UNIQUE CLUSTERED INDEX [FactSales_SalesID] ON [dbo].[FactSales] (salesid ASC)
WITH (DATA_COMPRESSION = PAGE)
GO
however later when i add CLUSTERED COLUMNSTORE INDEXES :
CREATE CLUSTERED COLUMNSTORE INDEX CSI_FactSales
ON dbo.FactSales WITH (DATA_COMPRESSION = COLUMNSTORE)
GO

it prompts error.

Msg 35372, Level 16, State 3, Line 167 You cannot create more than one clustered index on table 'dbo.FactSales'. Consider creating a new clustered index using 'with (drop_existing = on)' option.

View 4 Replies View Related

SQL Server Admin 2014 :: Create Dynamic Columns In Temp Table?

Jun 9, 2014

I want to generate dynamic temp table so, from one strored procedure am getting an some feilds as shown below

CM_id,CM_Name,[Transaction_Month],[Transaction_Year],''[Invoice raised date],''[Payment Received date],''[Payout date],''[Payroll lock date]

for i want to generate table for the above feilds with datatype

View 5 Replies View Related

SQL Server Admin 2014 :: Create Temporary Table With Dynamics Column

Jun 10, 2014

I have created a stored procedure for retrieving column name, as shown below

CM_id, CM_Name, [Transaction_Month], [Transaction_Year], [Invoice raised date],[Payment Received date],[Payout date],[Payroll lock date]

Now I am trying to create a temporary table using the above generated coluimns from Stored Procedure with datatype.

View 3 Replies View Related

Temporal Table Vs. Table Variable

Nov 26, 2004

Hello, everyone:

I want to save some temporal data in the stored procedure. Comparing temporal table and table type variable, which one is better regarding to the performance?

Thanks

ZYT

View 1 Replies View Related

SQL Server 2014 :: Create Auto Relationship Between Tables

May 12, 2014

I would like to create a auto relationship between tables.

Currently I am using Northwind DB with tables (Orders, OrderDetails, Customers)

Orders ( OrderId, Customerid)
OrderDetails(OrderId)
Customers(CustomerID)

Now, if the user wants to generate a relationship automatically based on SAME FIELD Names.

What is the approach?

View 9 Replies View Related

SQL Server Admin 2014 :: Unable To Create Credentials

Jul 23, 2014

What is the needed permission to create credential except for sysadmin?

Already granted securityadmin but still user does not have permission to perform this action.

View 1 Replies View Related

SQL Server Admin 2014 :: Create Format File For BCP

Nov 10, 2014

We have one table where we store all documents in one of the column called "Doc" with varbinary(max) data type.

We want to download those documents from sql table to windows explorer and i wrote BCP in sql 2005. And things were fine.

The format file I used there looks like this,

9.0
1
1 SQLBINARY 0 0 "" 1 Doc ""

Now we are in 2014 and when I try the same code with same format file, it hangs in the middle. So I changed the file to 12.0 instead of 9.0 but still not working.

View 0 Replies View Related

SQL Server Admin 2014 :: Create A Master Key In The Database

Jun 15, 2015

in my environment I am running the SQL Server agent job.i am getting below message.

create a master key in the database or open a master key in the session before performing this operation” error 

View 5 Replies View Related

SQL Server Admin 2014 :: Create Three AGs And Listeners In Same Instance

Jul 28, 2015

I have built a SQL 2014 Always on Cluster. I need to create three Availability groups and listeners in the same instance. Do I need 3 separate IP address for each listener or one IP address can be shared for all 3 Listeners ?

View 3 Replies View Related

SQL Server Admin 2014 :: Can't Create Model After Clean MDS Install

Apr 17, 2015

I have made a clean install of SQL 2014 including MDS on a server with Win Server 2012 R2.

After the installation I cant create new models because on an error saying that "Must declare the scalar variable "@Version_Id". "

I can see that the tables gets created in the MDS database but the models dont show up in the web interface.

I get the same error message when I try to deploy an old model.

View 0 Replies View Related

SQL Server Admin 2014 :: How To Close Active Connections Or Create Connection Timeouts

Dec 9, 2014

we have roughly 22 people connected to one database. But after a while, their applications begin to drag due to in and out communication with the server. When i check the active connections on the sql server, some times i see 157 active connections, please how to i set a timeout or connection interval close, so as reduce the heavy load being put on the server. Or how can i automatically close connections when they get higher than 50 connections.

This settings should be sql server 2008 related.

View 5 Replies View Related

Temporal And Spatial

Feb 2, 2008

Hi
In data mining, I came across the term called "temporal/spatial" perspective....what does this really trying to convey and mean ? Will anyone please provide some light on it ? Thank you

View 1 Replies View Related

SQL Server Admin 2014 :: Insert A Row To A Table Based On Table Values?

Jun 10, 2015

Here is my table:

My question is: How can I insert a row for each unique TemplateId. So let's say I have templateIds like, 2,5,6,7... For each unique templateId, how can I insert one more row?

View 0 Replies View Related

SQL Server Admin 2014 :: Few Record Loss In Table Primary Key Where Same Records Exists In Foreign Key Table?

Jun 21, 2015

Previously same records exists in table having primary key and table having foreign key . we have faced 7 records were lost from primary key table but same record exists in foreign key table.

View 3 Replies View Related

Temporal Data And Implications

Oct 27, 2014

I'm working with a temporal database of inventory which is updated daily. It looks something like this: TableID ProductID InventoryValue DateAdded DateExpired

The DateAdded field is placed when the row is inserted & each time new information is evaluated, it is considered against this row. DateExpired is finally set when a new row comes to replace it with a change in information. That part works.The part that doesn't work is that often, my distributors will omit inventory as a way of specifying a 0 quantity value. So If I had 100 rows & now I have 95, this means that 5 are now out of stock. Considering the way that my db is set up, it's difficult to identify whether no change was made or if I did not receive the inventory value. How would you set it up such that this is a consideration?

View 1 Replies View Related

SQL Server 2014 :: Updating A Column In One Table From Another Table

Dec 23, 2013

We have two tables with names X and Y.

X has a,b columns. And Y has c,d columns.

I want to update b column in X table with the values from d column in Y table on condition X.a=Y.c.

View 3 Replies View Related

SQL Server 2014 :: Repetition Of A Table When Joined With Another Table

Jul 29, 2014

table1

id value
1 11
2 12
3 13
4 14

table2

id1 value1
1 21
2 22
1 31
2 32

in need output as follows

id value id1 value1
1 11 1 21
2 12 2 22
3 13 null null
4 14 null null
1 11 1 31
2 12 2 32
3 13 null null
4 14 null null

View 9 Replies View Related

SQL Server 2014 :: How To Add Missing IDs In Table

Jan 12, 2015

I have a scenario where I would need to add +4 IDs with the existing IDs, below is an example:

IDWorkloadUnits
1EXO 3
7SPO 4
15LYO 10

Desired output should be as follows:

IDWorkloadUnits
1EXO 3
2
3
4
5
7SPO 4
8
9
10
11
15LYO 10
16
17
18
19

I am not worried about other attributes in the same table.

View 6 Replies View Related

SQL Server 2014 :: How To Add Script Into A Table Row

Apr 10, 2015

I have one environment where we get number of changes everyday. It takes time to take backup of database and then apply the script. I am thinking to automate it as

1. SQL Script (Hot-fix) will put in Shared folder accessible by SQL server.
2. I am writing a SP which will have parameters. Database name, SQL script, HF number.

SP will first take copy_only and compressed (all db's are 2008R2) backup of database. It will record SQL HF script from table into one row and it will apply that script to database using executesql. I am not able to take that SQL script in row.

View 2 Replies View Related

SQL Server 2014 :: Synchronize Table On Remote Server Via Update Trigger Failing

Jul 21, 2015

We have a database on a 2005 box, which we need to keep in sync with one on a 2014 box (until we can turn off the one on 2005). The 2005 database is still being updated with changes that must be applied to the 2014 database, given the nature of the data (medical documents) we need to ensure updates are applied to the 2014 database in very near real time (these changes are - for example - statuses, not the documents themselves).

Cunning plan #1, ulgy - not at all a fan of triggers - but use an after update trigger to run a sp on the remote box via a linked server in this format, with a SQL Server login for the linked server with permissions to EXEC the remote proc.

CREATE TRIGGER [dbo].[SourceUpdate] ON [dbo].[SourceTable]
AFTER UPDATE
AS
SET XACT_ABORT ON;
SET NOCOUNT ON;
IF UPDATE(ColumnName)

[Code] ....

However, while the sp can be run against the linked server as a standalone query OK, when running it in a trigger it's throwing

OLE DB provider "SQLNCLI" for linked server "WIBBLE" returned message "The transaction manager has disabled its support for remote/network transactions.".

Msg 7391, Level 16, State 2, Procedure TheAfterUpdateTrigger, Line 19

The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "WIBBLE" was unable to begin a distributed transaction.

Whether it actually possible to call a proc on a remote box via a trigger and if so what additional hoops need to be jumped through (like I said, it'll run OK called via SSMS)?

View 3 Replies View Related

Error Not Enough Space For Temporal Database When Processing Decision Tree Model

Sep 4, 2007

Hello,
I have a table (in Access) with about 30 fields and 1,700,000 records.
I had created a mining model in AS2005 with only one key (the autonum column called ID)
and other attributes marked as Input and/or predict.
When processing the model, it finish (after 15 min.) with an error: 3183
"Not enough space in temporal disk"
After some search , I encountered that is close related to the memory asigned to the tempdb.
I tried to increase the size of tempdb but it is imposible, moreover, it starts
with 8MB but it is autosized when needed.

I don't know how to solve this issue. Or, if it is a question of memory/disk space management (I have 100GB of free space in disk).

I tried the same model changing the KEY (I assign StudyID as key) then with the same data but 60,000 StudyIDs it is ok, so the mining model is ok (no nested tables, no case, too easy for getting a memory error)...

Please, can anyone recommend a possible solution for this issue?.
Many Thanks.

View 2 Replies View Related

SQL Server 2014 :: Bulk Import XML To Table

Jun 19, 2014

I found loads of things but nothing seems to work...

I'm trying to get a link with XML data inside the page into a table but I can't find anything

View 9 Replies View Related

SQL Server 2014 :: BCP In Tab Separated File To A Table

Jan 8, 2015

I am trying to bcp a log file into a table. Fields are "tab" separated and rows are "crlf" separated.

The rows of the file are uneven, in the sense, one row might have 35 tabs and the next one might have 10.

The table i am trying to insert to has 40 columns (maximum no.of columns i calculated from the log file).

I tried both these commands

BCP.EXE TEST.dbo.LOG IN E:syslog.TXT -c -e error.txt -T -S

BCP.EXE TEST.dbo.LOG IN E:syslog.TXT -c -t -r
-e error.txt -T -S

(I also tried using a format file from table)

When I run this, the table is loaded with data but not in the intended way.This is what I have from the table

If the 1st line in the text file has 35 columns and the row ends after it, in the table the 1st row has correct info until the 35th column and instead of going to the next row for the next line in file, it continues to use the next 5 columns in table before it goes to the next row. I think its not getting the row delimiter.

How do I force it to next line.

View 4 Replies View Related

SQL Server 2014 :: Counting Corresponding Rows In Table

Mar 21, 2015

Select statement joining file1 to file2. File 1 may have 0, 1, or many corresponding rows in file2. I need to count the corresponding rows in table2. Table2 also has a Boolean column and I need to count the number of rows where it is true. So I need to count the total number of matching rows and the count of those that are set to true. This is an example of what I have so far. I had to add each column being selected into a Group by to make it work, but I do not know why. Is there some other way this should be set up.

SELECT c.CarId, c.CarName, c.CarColor, COUNT(t.TrailerId) as trailerCount, (add count of boolian, say t.TrailerFull is true)
FROM Car c
LEFT JOIN Trailer t on t.CarId = c.CarId
GROUP BY c.CarId, c.CarName, c.CarColor

View 3 Replies View Related

SQL Server 2014 :: Partition A Big Table Into Years?

Jun 4, 2015

I'm looking to partition a big table into years.

I have a big table with data going back to 2001.

I need to partition this into file groups each for the last 5 years, and the rest into its own file group

I was going to convert the inherent date time field into the format int(yyyymmdd) and partition on that field.

Is this an acceptable way to achieve this? Is there a better way to partition on date? [not time]

View 4 Replies View Related

SQL Server 2014 :: Replace Rows With Other In Same Table

Jul 5, 2015

I have the below table :

IDName Date_StartDate_End Time_StartTime_End
9xxxxx@gmail.com 13/06/2015NULL 23:00.0 NULL
10xxxxx@gmail.com NULL 14/06/2015 NULL 00:00.0
11xxxxx@gmail.com 15/06/2015NULL 00:00.0 NULL
12xxxxx@gmail.com NULL 15/06/2015 NULL 00:00.0
13xxxxx@gmail.com 14/06/2015NULL 00:00.0 NULL
14xxxxx@gmail.com NULL 14/06/2015 NULL 00:00.0

Then i need to replace second row with value with first row with null and so on :

IDName Date_StartDate_End Time_StartTime_End
9xxxxx@gmail.com 13/06/201514/06/2015 23:00.0 00:00.0
10xxxxx@gmail.com NULL NULL NULL NULL
11xxxxx@gmail.com 15/06/201515/06/2015 00:00.0 00:00.0
12xxxxx@gmail.com NULL NULL NULL NULL
13xxxxx@gmail.com 14/06/201514/06/2015 00:00.0 00:00.0
14xxxxx@gmail.com NULL NULL NULL NULL

View 3 Replies View Related

SQL Server Admin 2014 :: Add New Column To A Table

Aug 24, 2015

I am new in SQL Server, What to check ,what action do i need to take while adding a new column to a table.

View 5 Replies View Related

SQL Server 2014 :: Show Sum Of Particular Column In Last Row Of Table

Sep 18, 2015

I have a table with some rows and columns what i want is i want to Show sum of particular column in the last row. This is my code.

SELECT DISTINCT Cluster.ClusterName, Gruppe.GruppeName, Arbeitspaket.ArbeitspaketName, BMWProjekt, AnzahlAP, Abgerechnet, InBearbeitung, Billanz FROM Bestellung
INNER JOIN Cluster ON Bestellung.Cluster = Cluster.rowid
INNER JOIN Arbeitspaket ON Bestellung.Arbeitspaket = Arbeitspaket.rowid
INNER JOIN Gruppe ON Bestellung.Gruppe = Gruppe.rowid
WHERE Projekt ="EA-284-Nxx" AND AnzahlAP <> 0 AND Abgerechnet is 1 AND InBearbeitung is NULL AND Billanz is NULL;

View 4 Replies View Related

SQL Server 2014 :: Find Table In A Linked Server?

Feb 2, 2015

I have multiple linked servers and trying to find if a table (approximate table name) exists in one of the linked servers.

I have a code to find it in local DB....how can I modify to include all linked servers as well:

ALTER PROCEDURE [dbo].[FindTable]
@TableName VARCHAR(256)
AS
DECLARE @DBName VARCHAR(256)
DECLARE @varSQL VARCHAR(512)

[code]....

View 3 Replies View Related

SQL Server 2014 :: View To Physical Table Options?

Jun 18, 2014

I have a view which select some few columns from multiple tables with where clause and have 5 unions of different category of data.

For the best performance i need to change this to physical table or any other options which can increase my performance.

View 2 Replies View Related

SQL Server 2014 :: Bulk Insert Data Into Table

Jul 29, 2014

I need to load the following data into a SQL table. This is how the vendor is able to provide it to us.

CRCorp Daily Report,,,,,,
,,,,,,
Facility,Location,Purchase Order #,Vendor,Inventory #,Date Ordered,Extended Cost
09-Mowtown 495 CRST,09-402A Women's Imaging,327937,"BARD PERIPHERAL VASCULAR, INC.",113989,7/25/2014,650
09-Mowtown 495 CRST,09-402A Women's Imaging,327936,"WB MASON CO., INC.",112664,7/25/2014,8.64
01-Mowtown 499 CRST,01-302B Oncology,327947,McKesson General Medical,n/a,7/25/2014,129.02

[Code] ....

I have attempted to bulk insert it into this table with no luck.

CREATE TABLE POMaster
(Facility VARCHAR(75),
Location VARCHAR(75),
PONum INT,
VendorNm INT,
INVENTORYNUM VARCHAR(25),
orderDte DATE,
ExtendedPrice NUMERIC(10,2)
)
GO

It does not like the double quotes. How to make this format work? Do I need a format file?

View 2 Replies View Related

SQL Server Admin 2014 :: Backup Of Indexes For A Particular Table?

Aug 9, 2014

how to take backup of indexes for a particular table.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved