Primary Key Analysis Tool
Sep 28, 2007
I have a client database where the users are experiencing very unpredictable behavior and I found after investigating that the majority of the tables don't have primary keys. :o
They were imported from an Access database and I think the table creator or the Access wizard itself added auto-number fields, so I know most of the tables have at least one column that could become the primary key.
Is there a free tool available that will allow me to analyze these tables to identify and list the tables that need primary keys and also help identify candidate columns for the primary key?
It would be helpful if I could automate some of the script generation to install the primary keys so I don't have to do them all manually.
View 6 Replies
ADVERTISEMENT
Dec 29, 1998
I need to search through a database that has a large number of tables to see if each table has an index that is based on the
primary key. I need this information in order to determine whether I can setup database replication or not. I believe all tables
involved with a replication need to be indexed on the primary key. Does anyone know of a stored procedure or command file that
will provide this information for me in a timely manner? I've used the sp_pkeys stored procedure but it is very time consuming
running this against one table at a time.
View 1 Replies
View Related
Sep 18, 2015
I am writing a query to display the count of products when a month is the primary month (Month where large sales happened)..Please consider the following query..
With Member ProductRank as
Rank([Date Due].[Calendar].currentmember,TopCount([Date Due].[Calendar].[Month],1,[Measures].[Sales Amount]))
Member PrimaryProd as
Count(Filter([Product].[Product].[Product],[Measures].ProductRank=1))
Select PrimaryProd on 0, Order([Date Due].[Calendar].[Month],PrimaryProd,bdesc) on 1 from [Sales]
Output:
It runs for 13 seconds on my laptop. I have modified the query to get the results fast like With
Set MySet as TopCount([Date Due].[Calendar].[Month],1,[Measures].[Sales Amount])
Member ProductRank as
Rank([Date Due].[Calendar].currentmember,MySet)
Member PrimaryProd as
Count(Filter([Product].[Product].[Product],[Measures].ProductRank=1))
Select PrimaryProd on 0, Order([Date Due].[Calendar].[Month],PrimaryProd,Bdesc) on 1 from [Sales]
Output:
This query runs instantly and result is not the same. Am I missing something here?
View 2 Replies
View Related
Mar 2, 2006
is it possible to change the settings on this tool. i want to have it so that it does not time out at all? or is that possible??
View 1 Replies
View Related
Jul 23, 2005
Hi all.I'm looking for a tool which should act like some kind of middleware/logical layer bewtween the SQL server and the webbased user interface.- It should be possible to easily create simple web forms (only datainput and output) without programming effort by "clicking" the fieldsand their order on the web mask within an admnistrative interface.- It should also be bossible to add "new fields" to the database,including field type, permissions, value lists etc. (excluding anybusiness logic) without programming effort by administration.I know, that most workflow tools or "Trouble Ticket Tools", based ondatabases have this feature to easily configure new masks and add newfields to the database, but i need it as an tool-unspecific layer forthe MS SQL Server.Thank you very much for your feedback, any ideas are welcome!Best regards, Heiko.
View 1 Replies
View Related
Mar 5, 2015
I have, a SSAS 2012 tabular instance with SP2, there is a database on the instance with a read role with everyone assigned permissions. When configuring the Power BI analysis services connector, at the point where you enter Friendly Name, Description and Friendly error message, when you click next I receive the error "The remote server returned an error (403)." I've tested connecting to the database from Excel on a desktop and connect fine.I don't use a "onmicrosoft" account so don't have that problem to deal with.
We use Power BI Pro with our Office 365. As far as I can tell that part is working ok as I pass that stage of the configuration with a message saying connected to Power BI.The connector is installed on the same server as tabular services, its a Win2012 Standard server. The tabular instance is running a domain account that is the admin account for the instance (this is a dev environment) that account is what I've used in the connector configuration. It's also a local admin account. There is no gateway installed on the server.
View 10 Replies
View Related
May 13, 2014
I have a cube that we are processing nightly via an Analysis Service Processing Task in SSIS. In order to increase the performance of the processing time, we elected to use a lot of rigid dimension attributes, and do a full process of everything in the SSIS task. The issue that I am having is that after that task completes, I need to go into Visual Studio to deploy the cube becuase we are unable to browse or use the cube. This issue seemed to start once we changed the SSIS Analysis Service Processing Task to do a full process on the dimensions, rather than an incremental.
I would expect that once development is done, and it is processed and deployed, that is it. My thinking is that the SSIS task should just update the already deployed cube,
View 2 Replies
View Related
Jun 12, 2015
How to right choose key column in"Mining Structure" for Microsoft Analysis Services?
I have table:
"Incoming goods"
Create table Income (
ID int not null identity(1, 1)
[Date] datetime not null,
GoodID int not null,
PriceDeliver decimal(18, 2) not null,
PriceSalse decimal(18, 2) not null,
CONSTRAINT PK_ Income PRIMARY KEY CLUSTERED (ID),
CONSTRAINT FK_IncomeGood foreign key (GoodID) references dbo.Goods ( ID )
)
I'm trying to build a relationship(regression) between “Price Sale” from Good and “Price Deliver”.But I do not know what column better choose as “key column”: ID or GoodID ?
View 2 Replies
View Related
Feb 18, 2013
It is possible to create Analysis Services project (*.dwproj) in Visual Studio 2012 Data Tools?
View 5 Replies
View Related
Nov 24, 2015
I am using
SSAS: version 2008
Excel: version 2013
I am connecting to SSAS cube from Excel and I have date dimension with 4 fields (I have others but I don't use it for this case). I created 4 fields in order to test all possible scenarios that I could think of:
DateKey:
- Type: System.Integer
- Value: yyyyMMdd
Date:
- Type: System.DateTime
DateStr0:
- Type: System.String
- Value: dd/MM/yyyy (note: I am not using US culture)
- Example: 01/11/2015
DateStr1:
- Type: System.String
- Value: %d/%M/yyyy (note: I am not using US culture)
- Example: 1/11/2015
Filtering on date is working fine:
Initially, in excel, filtering on date was not working. But after changing dimensional type to time, and setting DataType to Date, as mentioned in [URL] filter is working fine as you can see in the picture.Grouping on date is not working:
I have hierarchy in my Date dimension and I can group based on hierarchy, no problem. But user is used to pre-build grouping function of excel, and he wants to use that. Pre-build functions of Excel, Group and ungroup seems to be available as you can see in following picture:
But when user clicks 'Group', excel groups it as if it is a string, and that is the problem. User wants to group using pre-build grouping function available in Pivot table. I also find out that Power Pivot Table does not support this excel grouping functionality. And if I understood well, this pre-build grouping functionality of excel, needs to do calculation at run time, and that is not viable solution if you have millions of rows. So Power pivot table does not support pre-build grouping functionality of excel and hence we need to use dimension hierarchy to do the grouping. But I am not using Power Pivot table, I am using simple Pivot Table. So I expect grouping functionality to be working fine. Then I tried to do simple test. I created a simple data source in excel itself. And use it as source of my Pivot table. Then grouping is working fine. The only difference that I can see is (When double click the Measure value in Excel),For date values of my simple test, excel consider them as 'Date'.
For date values of my data coming from cube, excel consider them as 'General'
2.1. But value here is same as it was in simple test.
2.2. 'Date Filter' works just fine.
2.3. If I just select this cell and unselect it, then excel change type to 'Date' though for that cell.
2.4. I have created 4 different types of fields in my date dimension thinking that values of attribute of my dimension might be the problem, but excel consider 'General' for all of them.
2.5 This value (that can be seen when double clicking on measure) comes from 'Name Column' of the attribute. And the DataType defined is WChar. And I thought that might be the reason of issue. And I changed it to 'Date'. But SSAS does not allow it to change to 'Date' giving error : The 'Date' data type is not allowed for the 'NameColumn' property; 'WChar' should be used.
So, I don't know, what is the puzzle piece that I am missing.
1. Date filter works, group does not work
2. Excel consider it as 'General' string.
3. SSAS does not allow to change 'NameColumn' to Date.
View 2 Replies
View Related
May 30, 2015
I would like to know the best practice for running analysis service in terms of port usage. Is it better to run on a specific port or have dynamic ports ? We have clustered servers that run default on 2383 but not sure with non clustered what's the best way to get performance.
View 2 Replies
View Related
Aug 6, 2015
I want to find out if it is possible to create a role in a cube without an AD account, e.g. using a GMail email address.
View 3 Replies
View Related
Jan 11, 2007
Uma writes "Hi Dear,
I have A Table , Which Primary key consists of 6 columns.
total Number of Columns in the table are 16. Now i Want to Convert my Composite Primary key into simple primary key.there are already 2200 records in the table and no referential integrity (foriegn key ) exist.
may i convert Composite Primary key into simple primary key in thr table like this.
Thanks,
Uma"
View 1 Replies
View Related
Aug 28, 2002
Hi all,
Can anyone suggest me on Adding primary key to a table which has already a primary key.
Thanks,
Jeyam
View 9 Replies
View Related
Aug 13, 2007
Hi,
I have recently been looking at a database and wondered if anyone can tell me what the advantages are supporting a unique collumn, which can essentially be seen as the primary key, with an identity seed integer primary key.
For example:
id [unique integer auto incremented primary key - not null],
ClientCode [unique index varchar - not null],
name [varchar null],
surname [varchar null]
isn't it just better to use ClientCode as the primary key straight of because when one references the above table, it can be done easier with the ClientCode since you dont have to do a lookup on the ClientCode everytime.
Regards
Mike
View 7 Replies
View Related
Feb 4, 2015
We have a table, which has one clustered index and one non clustered index(primary key). I want to drop the existing clustered index and make the primary key as clustered. Is there any easy way to do that. Will Drop_Existing support on this matter?
View 2 Replies
View Related
Oct 17, 2007
Hi,
I have some questions about SQL Servers 2000 and 2005 compatibility.
In my configuration I have to use both servers.
The cubes are stocked in 2005 server.
May I transfer from 2005 to 2000 Analysis Services the cubes?
If yes, what is the procedure? The result of migration is the same in the two different versions?
If not, how can I solve this problem?
Thanks in advance.
View 3 Replies
View Related
Jan 28, 2004
Hi all
I have the following table
CREATE TABLE [dbo].[property_instance] (
[property_instance_id] [int] IDENTITY (1, 1) NOT NULL ,
[application_id] [int] NOT NULL ,
[owner_id] [nvarchar] (100) NOT NULL ,
[property_id] [int] NOT NULL ,
[owner_type_id] [int] NOT NULL ,
[property_value] [ntext] NOT NULL ,
[date_created] [datetime] NOT NULL ,
[date_modified] [datetime] NULL
)
I have created an 'artificial' primary key, property_instance_id. The 'true' primary key is application_id, owner_id, property_id and owner_type_id
In this specific instance
- property_instance_id will never be a foreign key into another table
- queries will generally use application_id, owner_id, property_id and owner_type_id in the WHERE clause when searching for a particular row
- Once inserted, none of the application_id, owner_id, property_id or owner_type_id columns will ever be modified
I generally like to create artificial primary keys whenever the primary key would otherwise consist of more than 2 columns.
What do people think the advantages and disadvantages of each technique are? Do you recommend I go with the existing model, or should I remove the artificial primary key column and just go with a 4 column primary key for this table?
Thanks Matt
View 5 Replies
View Related
Jul 22, 2005
hiis there any tool to write stored procedurei have long queries to write instead of that i want a tool or editor where i can click or drag and drop to write procedurei make my work to complete fasterif any please tell me the site to downloadthanx byeramesh
View 1 Replies
View Related
Aug 5, 2005
Hello,I'm looking for recommendations for SQL tools used for comparing schemas from different databases. I would like the tool to be able to compare schemas for at least two databases and list the difference in tables, sps, functions, and view. Even if the both schemas contain the same structures I would like to know what differences exist. Also, I would like to be able to type in a table field name and get a list of every place in the db that field is referenced. On another note, how do others go about maintaining a version history of db structures? Any tools available for this functionality? Currently, I use visual source safe for my app. code. I could place copies of my SPs in visual source safe and edit them within visual studio. I'm not sure how I would easily get the edited version into my sql database without having to create a script or copy the edited version back to the db. Any thoughts?Any information is appreciated.Oscar
View 1 Replies
View Related
Apr 23, 2008
Hi guys, Im trying to use Bulk copy to transform a csv file into a table
BULK INSERT [BULK_INSERT_TEST]
FROM 'c:stock.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = 'N'
)
--*STOCK LOOKS LIKE THIS
stockcode,barcode,qty
10002,"10002087",0
TABLE Looks like this
id, stock,barcode, qty
can anyone give any guidance on performing this - at present this doesn't seem to work. Worth mentioning id is autoincrementing. I would also need to strip quotes around the second field. Note. Stock file has a header - do I need to strip this to use BCP?
Any help appreciated.
2,10002,"10002087",0
View 4 Replies
View Related
Oct 18, 2007
Hi,
I am using bcp to copy some data from a flat file to a data table using the format file that look like this.
9.0
7
1 SQLCHAR 0 4 "" 1 Col1 SQL_Latin1_General_CP1_CI_AS
2 SQLCHAR 0 9 "" 2 Col2 SQL_Latin1_General_CP1_CI_AS
3 SQLCHAR 0 8 "" 3 Col3 ""
4 SQLCHAR 0 7 "" 4 Col4 SQL_Latin1_General_CP1_CI_AS
There are 4 columns in total, however some rows have missing values for Column 4, and but given there are no field separators (all columns have fixed width and data is truncated if needed), how should the format be written to define a row terminator to apply to Column 3 if Column 4 is null.
Thanks for your suggestions.
View 3 Replies
View Related
May 23, 2008
I'm in the process of delivering a SQL Server BI solution to a customer. I have the cube built, SSIS working and an SSRS package with several hundred reports. They would like to roll their own reports.
I've looked at ProClarity (or whatever MS calls it now) and Report Builder. Both seem to have their pros and cons.
What tool does the community recommend?
Thanks.
View 4 Replies
View Related
Jul 20, 2006
I think Service Broker is the right tool for what I want to do but need confirmation. Here is what I want to do.
Our company sells small business consulting services. When a client signs up with us, we put a server at their site that runs our app (using SQL Server 2005). Once the server is setup at their site and operational we constantly send certain information from that server to our central corporate server. There could be thousands of records every day being sent from each of these servers to our corporate server. We're using webservices now to transfer this data from each server but I'm afraid we're reaching a point where webservices will no longer work because of the volume of data.
1) I assume that Service Broker was created, in part at least, to address these types of situations?
2) If #1 is correct, is there any step by step examples/instruction that shows me how to use Service Broker to communicate between two SQL Server databases on two different servers?
Thanks very much.
Amos.
View 1 Replies
View Related
Jul 3, 2007
Hi, I'm not sure this is the right place to ask this question (please re-direct me if it isn't). I would like to learn about SubSonic tool:1. do you recommend this tool ? if so what are its best uses?2. is its license allows me to work with it for free for commercial uses? any license limitations I should be aware of for using it as a tool? thanks,
View 6 Replies
View Related
Nov 10, 2007
Hi all,
I downloaded the StudentActivities sample app from http://technet.microsoft.com/en-us/library/ms345152.aspx
When I want to go through this tutorial I encounter the following problem:
Database 'C:WebSitesStudentActivitiesRegistryDataStudentActivities.mdf' cannot be upgraded because its non-release version (587) is not supported by this version of SQL Server. You cannot open a database that is incompatible with this version of sqlservr.exe. You must re-create the database.Could not open new database 'C:WebSitesStudentActivitiesRegistryDataStudentActivities.mdf'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 950)
So attaching the DB seems to doesn't work. The reason for this is probably that this sample app src was written in an older version of Visual WebDeveloper Express 2005 +SQL Server Express 2005.
Therefore I would like if someone can provide me with the sql src of this StudentActivities database. Then I can create the database myself from this. Or is there some tool which canconvert a mdf to sql?
I hope someone can help me with this. Thanks in advance.
GJ
View 1 Replies
View Related
Nov 12, 2007
Hi all,
I downloaded the StudentActivities sample app from http://technet.microsoft.com/en-us/library/ms345152.aspx
When I want to go through this tutorial I encounter the following problem:
Database 'C:WebSitesStudentActivitiesRegistryDataStudentActivities.mdf' cannot be upgraded because its non-release version (587) is not supported by this version of SQL Server. You cannot open a database that is incompatible with this version of sqlservr.exe. You must re-create the database.Could not open new database 'C:WebSitesStudentActivitiesRegistryDataStudentActivities.mdf'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 950)
So attaching the DB seems to doesn't work. The reason for this is probably that this sample app src was written in an older version of Visual WebDeveloper Express 2005 +SQL Server Express 2005.
Therefore I would like if someone can provide me with the sql src of this StudentActivities database. Then I can create the database myself from this. Or is there some tool which canconvert a mdf to sql?
I hope someone can help me with this. Thanks in advance.
GJ
View 4 Replies
View Related
Mar 6, 2008
I have a typed dataset where I used the sql query builder to build the following:
SELECT DealManager.*, Contact AS Expr1FROM DealManagerWHERE (Contact = @Contact)
How can I incorporate the "where % % " clause into this statement and still except the required parameter. In other words, I want something like this:
SELECT DealManager.*, Contact AS Expr1FROM DealManagerWHERE (Contact like %@Contact%)
but I get an error when I compile this...
Any help always appreciated!!!
View 2 Replies
View Related
Apr 4, 2008
Hi Guys
Got this problem, ive setup some new roles and users through asp.net configuration and it creates ASPNETDB.MDF in the App_Data folder when ive got a DB in SQL server 2005 express.
Basically how do i change it so the tables created for the users and roles are created in the SQL Server 2005 Db? p.s I'm very new to sql server 2005
Thanks
View 5 Replies
View Related
Mar 4, 2004
Hi,
I've been having trouble getting this tool to work with my server/database. I'm using XP Pro, MSDE, .NET 1.1.4322 and IIS 5.1. IIS has been installed and tested with the help of others. .asp pages are being served locally and to another PC on the network. No obvious problem here. When I installed MSDE I used the SAPWD='strongpassword" command to create a password. I also built a new database. I had positive feedback on both of these actions.
Now to the tool - when I activate the administrator it pops with the little window saying Web Server Configuration. It lists the following options:
Desired Port:
IIS
Cassini Personal Web Server
Restore Faults
and Start and Stop buttons.
If I leave the setting on IIS and click Start it opens a webpage entitled Web Data Administrator. Moving further down I have a welcome message and then the line -
Please enter a SQL Server name:
Username: [Desktopob shadowed entry]
Password
Server (local)
Authentication Method:
Windows Intergrated
SQl Login
and then a Login button
If I select SQL Login and enter "sa" as the username and then my password leaving (local) as the server I get the following error:
Invalid username and/or password, you are using a windows login that is not your own, or server does not exist.
I have tried all combination of \desktopsa, sa, you name it. The password I selected is correct because I made a point of writing it down so I wouldn't forget it. I have also tried all the combos using Cassini as well.
This is where I'm stuck at this point. All suggestions are appreciated.
Thanks,
Bob
View 3 Replies
View Related
Jan 6, 2005
Hello,
For management that doesn't have the software I do, I've been using a PDF postscript utility to print the model and give it to them. However, I have to fit the model for the specific page (which is really small, and you have to zoom in), or you have to view it on multiple pages. Well multiple pages can be a pain, because the table you are looking at is on page 1, but the relationships are on page 12, 22, or 50, for example. So I was looking for a tool that is cheap enough to implement that we could look at the entire model on one "surface" (not necessary to print), that the model could be viewed in.
Thanks,
Brian
View 2 Replies
View Related
Dec 3, 2005
Does anyone knows a good FREE tool for documenting a DB?
so far i'm with ApexSQL but its not free, wondering if anyone knows a free tool.
Thanks,
View 1 Replies
View Related
May 1, 2001
Hi All,
I have to load data from from a text file ( approx 3-5 million rows) into a table .
I can use straight bcp with the format file , but the loading of data has to follow some business logic
Let me know if there are any third party tool to load the data instead of regular bcp
I have SqlServer 7.0 on Windows NT 4.0
Thanks in advance
View 2 Replies
View Related