Autoincrement ID For Locations That Members Create
Aug 22, 2013
I'm using a SQL 2008 database on a SQL 2012 hosted server. I have an autoincrement ID for locations that my members create. These go up by 1.... eg. 9400, 9401, 9402.
Tonight a member attempted to make a new location and the ID went from 9407, 9408 and JUMPED to 10408. Any subsequent creations only continue from 10408 onwards.
What happened here? 9409 to 10407 just aren't available.
I am looking to create an SSRS report based on multiple locations. There will be one report that presents a summary of all reports, and then individual report for each location.Instead of creating 2 separate reports, is it possible in SSRS to display different datasets based on the parameter selected?
I am Srinivas working on SSAS 2005. I am not able to create or drop dimension members. I need to drop and create all members in one dimension before cube processing, as the columns are coming dynamically.
E.g. ALTER CUBE [Reporting] DROP DIMENSION MEMBER [Tbl Analysis Test].[Name] Here cube is [Reporting] , dimension is [Tbl Analysis Test] and member is [Name].
Its giving the following error " Parsing the query ... Query (1, 46) The member '[Name]' was not found in the cube when the string, [Tbl Analysis Test].[Name], was parsed. Parsing complete"
Please look into this issue, advice me what do I do ASAP.
I am Srinivas working on SSAS 2005. I am not able to create or drop dimension members. I need to drop and create all members in one dimension before cube processing, as the columns are coming dynamically.
E.g. ALTER CUBE [Reporting] DROP DIMENSION MEMBER [Tbl Analysis Test].[Name] Here cube is [Reporting] , dimension is [Tbl Analysis Test] and member is [Name].
Its giving the following error " Parsing the query ... Query (1, 46) The member '[Name]' was not found in the cube when the string, [Tbl Analysis Test].[Name], was parsed. Parsing complete"
Please look into this issue, advice me what do I do ASAP.
The relationship between state and sales region is n:1, i.e. one state belongs to exactly one sales region, and one sales region can consists of one or multiple states. Unfortunatly I can't define this attribute relationsship in the dimension because it would lead to a diamond-shaped relationsship without a user-defined-hierarchy to back it up. So far that isn't much of a problem, user don't drill down from sales region to state. But now I want to define a calculated member that multiplies a measure from the main measure group with another measure from a weighting factor measure group at the state level and above. The granularity attribute of the geography dimension in the dimension usage tab of the weighting factor measuregroup is the state.
So far what I've got is:
CREATE MEMBER Currentcube.Measures.[weighted measure state and above] AS NULL; SCOPE (Measures.[weighted measure state and above], Descendants(geography.[political territory].[all member],3,SELF_AND_BEFORE), Descendants(geography.[salesterritory].[all member],2,SELF_AND_BEFORE), ... Descendants(geography.[hierarchy 9].[all member],1,SELF_AND_BEFORE)); this = sum(existing(geography.[political territory].state.members), measures.[main measure group measure] * measures.[weighting measure group measure]);END SCOPE;
This works from a functional point of view, but is rather slow when querying any other hierarchy than the political territory hierarchy, because SSAS first goes down from the state level to the key attribute of the geography dimension, and then aggregates from there to the sales region.In other words, I want SSAS to resolve the relationsship (which state belongs to which sales region) through the dimension, and not through the fact, and apply the calculation afterwards. Like some kind of currency conversion, but only from a certain level upwards.
hey i am going to be writing a query to search for stock in a certian location, but what i wnat to do is allow the user to search in all locations as well, how could i do this? or would it be more asp based? Jez
I know I've seen documentation on this but I can't find it at the time. What's the recommended file locations for a SQL install.. System and Data on a RAID drive and logs on a separate drive that's mirrored..? Oh and if anyone has links to this info let me know also.
I am a newbie in SQL Server Administration. I decided to make the move within my company that no one else wanted.
I have SQL Server 2000 running at this time; users are connecting and using it. My question I guess pertains to the backups.
I have two drives setup for data and transactions logs (D: E:)
My backups are running but backups are being sent to the d:systems datamssqlackup folder. once backups are comlete I normally copy the backups to a network share that is being backed up nightly to tape.
My question is this:
How do i create a device location under backup properties to point to a network share? i would like for the backups to go straight to a network drive so i do not have to copy the backups every morning when i come in.
I am trying to split the log and data files between two drives on a newSQL-Server 2000 installation. I followed the instructions from the MSarticle 224071 (Moving SQL Server databases to a new location withDetach/Attach).Unfortunalty, when I try to move the Master database, as perinstructions, access to SQL-Sever is lost;the service will never startagain. I've tried this twice after re-installing with the same results.Anyone have any ideas as to what is going wrong?Tim
Hello I have a table with inventory where each item has a field called location. What i would like to do is to get a summry with how many items there are in in each location. All the data is stored in one single table named article. inside this table i have Counter (PK), Artnr, location, type and some other things. 2 other importent columns are date and interval. Date is the last time the item was inspected and interval is an integer saying how many months untill the next inspection. So i guess Counter, location, date and interval, are the ones i need to use in my query to do the following. Wo what i would like to do is to present a short list with all locations and then a number that says how many items need inspection in 3 months or less (and even items that have apssed their date). Im somewhat new to sql so iv only been doing the regular insert, delete and update here and there but i have a feeling this query is a bit more complicated. The list does not need to say what items needs inspection. I only need to know how many. Could anyone help me out with constructing this query?
I have a server that is being rebuilt soon and the data storage is going to be be restructured at the same time. Currently all data, logs and backups are held in the default e:mssql7 directory (on a RAID 1+0 system). After restructure data will be one one drive (RAID 5), backups logs and templdb will be on various others. I have a couple of questions;
1. My plan is to detach all databases and backup the .ldf and .ndf files (logs are not as important after this point). Then backup master and msdb databases. Once the new server is built (specifying the new file locations at install), I will restore master and msdb and finally reattach the databases from their new locations. Does this sound reasonable?
2. At the point of server install, I intend to specifiy the default locations for data and log files. When I come to reattach the data files I want SQL Server to create a new log, but place it in the new default location. Will it do this automatically?
If you have a question or problem with SQL Server you might want to try three places before/in addition to listing questions here... only because it will be quicker for you rather than waiting for someone to post a response.
1) SQL Server Books OnLine (install on hard disk when you install SQL Server... full set of manuals and highly indexed) 2) http://www.microsoft.com/Support/ (you may need to register but it is free) (Use Support OnLine and look under SQL Server for specific support) 3) http://support.microsoft.com/support/default-faq.asp (FAQ)
Both can help with error numbers and #2 is especially good to find known bugs, fixes, work arounds, etc.
I'm fairly new to SQL, waiting on a course on how to use it, but wanting to get stuck it.
I was wondering how I can get SQL to copy a file, say in Access, from one location to another. This would be part of my job with delivering data extracts users.
Here is what I am trying to accomplish. I need to move *.pdf files from a local directory into a local staging directory, then from the Staging directory FTP them up to the customers site. Then move the files from the staging directory to an archive directory. I can do this fine as long as all values are static in SSIS, I need help to figure out hoe to do this using variables. The Directories to be used are to be supplied by the DB all that is give in the directory itself all files in the directory need to be moved. Any help would be appreciated. Thank you, Mike
Hi, I have to create a datebase for an assignment and I am using MSSQL and need a little bit of help for something that I don't think can actually be done. Basically I have an artist table. Now each artist may well have a website of their own where their biography can be found. In my artist table I have an artist_bio field where I want the URL of the artists bio to be placed and only the URL. So for example I would want www.iamanartist.com/mybio to be put into that field. So I was wondering if there was a constraint that could do this? I don't think there is because URLS can be so complicated but if someone could tell me whether it is or isn't possible I would be really grateful. I am also wanting to do something similar with the location of a hardcopy of their work. So I have a digital_images table with a location field where the loaction of their work will be on a harddrive. Is this possible or not as well? Cheers for any help you can give, Liam
SQL Express is quite sizable for what I want to do but it appears to have many features that could turn out to be highly desirable.
It makes sense that the entire SQL Express must be installed at the developer's location, but what portion of it is required at the application user's location? All, or some?
The area to change my default database location is "greyed" out. I wish to put all my data on a seperate drive than the OS (D:). What am I missing that I can't change the default database location?
I have a maintenace plan that copies production backup files in DR server. The production is mission critical and runs 24/7. We have a round the clock backups. Backups include full backup, differential backups and log backups.
To secure these backup files, I was asked to keep these files in different server at the same time as it goes to DR Server. As I am using maintenace plan for scheduled backups that go to DR server and I had no idea how to incorparate copying these files to another server in the same maintenence plan. I came up with idea using xp_cmdshell stored proc that I attached on the maintenace plan in executeT-SQL statement task. The statement looks like
What is the recommendation for having multiple data files ? I've read 1 per CPU etc... some say keep it all in one data file.
How do multiple sql data files help when they are located in the same raid group/single volume ?
This is the setup that I have: 4 CPU box with 2x P400 array controller to 2x MSA10 exclosure (for data only, tempdb,logs,backups are on other arrays) one array controller per enclosure. single big RAID 10 volume on each ( or should I do 4-4-2 separation). (In single big raid 10, All disks would help for performance of each query... I don't want to create separate raid groups, mostly due to growth constraints in the future, am I wrong ?)
How should I split database across these two enclosures ? one,two data files on each or more ?
i have a table for storing username and password. the following are the fields in table ID -int UserName-nvarchar(50) Password-nvarchar(50)
i dont want to have a separate field for id i want to autincrement them plz give me an idea am using SQLServer Express am new to this field so plz forgive me for this simple question
I've have a simple question. After running the SSIS deployment utility to install a couple of SSIS packages into a SQL Server, is there a way of determining programmatically (at some later stage) where the dependency files (in my case a simple xml configuration file) for the SSIS packages were installed (if the user chose not to install it into the default location).
I have been asked by the powers that be to make sure that my configuration database gathers some auditing information. I have looked over these and have no idea where to find the information in SQL Server. If you could tell me the table and database that the informations are located in, I could write the T-SQL to find them. IMPORTANT you do not have to answer all of them, I am grateful to those that pick and choose even one to help me with.
SQL Server Auditing
General/Access Auditing Items
Software Install (DB): Verify that the sample and demonstration databases are not installed and remove the temporary setup files created by SQL Server setup process
Authentication and Access Control
Default user accounts & passwords (DB): Default user account passwords will be changed and will follow the corporate password standard for frequency of change, length and complexity User authentication (DB): Windows authentication is preferred. Mixed mode authentication can be used. User passwords (DB): All user passwords (mixed mode, SQL authentication, Windows authentication) will follow the corporate password standard for frequency of change, length and complexity. Sharing database user accounts (DB): Sharing of database user accounts is not permitted without an explicit exception documented and granted by IS Information Security. Normal users submitting jobs (DB): Normal user jobs should not be run as SA. Create a role-based policy for normal users that must be allowed to run jobs. They should be included in the role created for job submission.
Monitoring and Reporting
Auditing (DB): For all database installs after XX/XX/XXXX, Auditing should be turned on and at minimum set to log failed connections. Logs should be saved to a different hard drive than the one which data files are stored. SQL error log (DB): Processes should be in place to protect error log data so it can be reviewed for seven days prior to being overwritten or deleted from the system.
Networking
Cross-database ownership chaining (DB): Cross-database ownership chaining is disabled. Code of stored procedures, triggers and views (DB): Who has access Public access to SYSXLOGINS and SYSDATABASES tables: The public role will not have access to the SYSXLOGINS or the SYSDATABASES tables. Public access to SYSOBJECTS and SYSCOLUMNS tables: The public role will not have access to the SYSOBJECTS and SYSCOLUMNS tables. Public access to stored and extended stored procedures: The public role will not have access to stored or extended stored procedures. Public access to xp_regread and xp_instance_regread: Restrict public role access to xp_regread and xp_instance_regread. Public group access to mswebtasks table: The public group will not have insert, update, delete or select permissions to the msdb.dbo.mswebtasks table. Temporary directories: For all database installs after xx/xx/xxxx, all temporary directories will be cleaned on a periodic basis. Auditing II: Auditing should be turned on and at minimum set to log failed connections. Logs should be saved to a different hard drive than the one which data files are stored. SQL Server instances visibility: All SQL Server instances should not be visible across the network. They should be set up with the hidden option activated. Default ports: SQL Server should be configured to not use the default ports.
Hi All I am using SQL server Database in one of my table there is a column which is set to Identity=Yes i.e., The ID is increment by one on every insert and if the insertion failed then the id generated goes off then in the next generation it uses new id ..........EXfirst insertion id=1 then in the second insertion if while adding data to other rows if i get some error then the id 2 is not used and when i correct the error and insert it then id=3? can any one give me the solution for this and NextWhen i delete the datafrom the table see the ids are upto 20 and i delete all the records from the table after insertion of new record the id will be 21plese help me in this
This may sound quite easy for you, however I am a newbie in SQL.
So I have an identity field, which I wish to increment automatically every time I do an insert. However the starting integer has to be the MAX value from another table.
So for example I am doing an insert in a #temp table INSERT INTO #temp(name, surname) SELECT name, surname from table1
Now the personId of the #temp table has to start from the MAX of table2 Ie SELECT MAX(personId) from table2
The SELECT MAX(personId) from table2 can also be NULL, ie the first time I am inserting, so I also have to cater for this scenario.
Hi all, i am deleting rows of a table and reinserting new ones. This table has an auto increment primary key. what is the function used to set it to zero each time i delete the rows in order to rebegin counting from 1 when i refill the table. Thanks in advance...