Selecting A Location Or All Locations
May 7, 2007
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
View 16 Replies
ADVERTISEMENT
Jun 18, 2008
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?
View 2 Replies
View Related
Aug 29, 2015
there are several remote locations where sql is running, my company has asked me to find a way to collect all the data from the remote locations to a central location automatically,for example day to day data should be synced at night time from 2am to 7 am and it should be compressed automatically before data transfers to the central location. NOTE there is no domain only standalone workstations
View 3 Replies
View Related
Sep 20, 2007
I've got a big problem that I'm trying to figure out:
I have an address table out-of-which I am trying to select mailing addresses for companies UNLESS a mailing address doesn't exist; then I want to select the physical addresses for that company. If I get multiple mailing or physical addresses returned I only want the most recently edited out of those.
I don't need this for an individual ID select, I need it applied to every record from the table.
My address table has some columns that look like:
[AddressID] [int]
[LocationID] [int]
[Type] [nvarchar](10)
[Address] [varchar](50)
[City] [varchar](50)
[State] [char](2)
[Zip] [varchar](5)
[AddDate] [datetime]
[EditDate] [datetime]
AddressID is a primary-key non-null column to the address table and the LocationID is a foreign key value from a seperate Companies table.
So there will be multiple addresses to one LocationID, but each address will have it's own AddressID.
How can I do this efficiently with perfomance in mind???
Thank you in advance for any and all replies...
View 2 Replies
View Related
Jan 17, 2007
Can oracle91 and MS SQL2005 be on same server
View 20 Replies
View Related
Apr 23, 2001
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.
Thx!
View 4 Replies
View Related
Mar 23, 2004
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.
View 8 Replies
View Related
Jul 23, 2005
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
View 3 Replies
View Related
Apr 18, 2007
Hello there,
I need to install SQL 2005 in one drive on my computer, and data folders in another drive. Can anyone tell me how this can b done during setup please?
Thanks in advance.
Hemant
View 1 Replies
View Related
Aug 13, 2001
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?
Thanks in advance for your help
Jonathan
View 1 Replies
View Related
Aug 6, 1998
Just as an aside...
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.
Hope this helps,
Don
View 1 Replies
View Related
Dec 2, 2005
Hi,
We have a 2 node cluster and want to move our database files from the F: Drive to the G: Drive.
The user databases are easy enough (detach/reattach).
Can anyone give any ideas how to move the system databases?
Thanks
View 1 Replies
View Related
Dec 14, 2005
Hi,
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.
Many thanks in advance
View 5 Replies
View Related
Apr 14, 2008
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
Michael Alawneh, DBA
View 1 Replies
View Related
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.
View 2 Replies
View Related
May 11, 2007
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
View 1 Replies
View Related
Oct 3, 2006
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?
Thanks
View 1 Replies
View Related
May 17, 2006
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?
View 1 Replies
View Related
Oct 25, 2007
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
Exec master..xp_cmdshell 'copy e:DRbackup*.bak \fgh-sql16ackup$'
Above statement copy all backup files on DR server and takes these to remote server called fgh-sql16.
My question here is ....are there any other effective methods to copy backup files simultaneously to different servers via maintenace plan.
Thanks all
View 6 Replies
View Related
Oct 23, 2007
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 ?
How would this look in OLAP vs OLTP scenarios ?
Thank you.
View 1 Replies
View Related
Jul 24, 2007
Hi all,
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).
Thanks,
Johan
View 1 Replies
View Related
Aug 27, 2007
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.
View 5 Replies
View Related
Feb 28, 2006
I have a package and added a configuration file to it to hold settings such as connection strings etc.
When I open the package up in the designer and check where the configuration file is from, it likes to specify it with a full path like this:
\myserverprojectspackageslah.xml
Where blah.xml is the configuration file and the package file is in the same exact directory.
This creates an issue when I use build and then try to install the package on a server. When installing, the server tries to read the config from \myserverprojectspackageslah.xml which it can not.
Conversely I've tried editing the location in the designer changing it to just be "blah.xml". Then after using the build option I am able to install the package successfully on the server (it can not find the xml file).
However when I then load the package later in the designer to try to edit or chagne it, the designer complains that the "configuration file could not be loaded" and it can't find it even though it is in the same directory that the package definition file is in.
What's going on with this and how do i solve it?
View 1 Replies
View Related
Feb 13, 2015
I have an invoice table with customer, date, sales location, and invoice total. I want to total the invoices by location by customer and see what location sells the most to each customer. My table looks like this.
CustDate LocAmt
A1/1/2014 1520
A1/1/2014 1560
A1/1/2014 2575
A1/1/2014 3580
B1/30/2014 15100
B1/30/2014 15200
B1/30/2014 2575
B1/30/2014 25150
B1/30/2014 35250
I want to get this, because for customer A, location 35 had the largest SUM of sales and for customer B, location 15 had the largest SUM.
CustLoc
A35
B15
If I have to use CTEs to get there, I can do that too. Just a little lost on how to get only the one location per customer.
View 2 Replies
View Related
Oct 23, 2015
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?
View 3 Replies
View Related
Apr 20, 2010
When I go to open a file in SSMS, the Open File dialog box appears. In the left side of that box, there is a panel containing shortcuts to various locations: Desktop, My Projects, and My Computer. I would like to add some shortcuts to folder that I use in this area, but I haven't been able to figure out how. how to do this?
View 9 Replies
View Related
Jun 22, 2007
When adding an SSIS step to a SQL Server Agent job, when selecting the location of a config file, the dialog lets you select from the database server you're working with. If selecting the location of the package itself (when the source is File System), the dialog lets you select from the machine where Management Studio is sitting instead of from the database server. Is that intentional? And if so, why? Should I just use a fully qualified file name for the package location rather than one using a drive letter?
View 3 Replies
View Related
May 7, 2008
Hello there,
I've some really big problems with SQL Server 2005 Express. I Recently, I had 2 instances on my machine, one was a SQL Server 2000 Developer and the other a 2005 Express Version. The 2000 version was not necessary anymore, so I unstalled it, since then, the Express version keeps having probems.
Under the Server Properties -> Database settings -> Database Locations I've changed the path to D:sqldatamssql, but now, the programm always takes the "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData" to store and load the databases, no matter what I do.
And there are more problems see here:
Restoring does not work=======================
I wanted to restore a database called "fw40_admin" from a backup file (.bak), but that didn't work at all, it always says this as an error:
"System.Data.SqlClient.SqlError: The operating system returned the error '5(error not found)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'D:sqldatamssqlfw40_admin.mdf'. (Microsoft.SqlServer.Express.Smo)"
But as soon as I type in the installation path "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData" inside the "Restore As" under "Options", it works.
Why does the backup only work in "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData", BUT the database locations under the server properties is indicated with "D:sqldatamssql"????
Attaching does not work=======================
Attaching an existing database does not work either. Most databases (mdf) are located on the path D:sqldatamssql, but as soon as I press
Attach Databases -> Add
The dialog window appears with the "D:sqldatamssql" path, but it is unable to find any *.mdfs altough THERE ARE .mdfs in this directory. But Express can find databases in the selected installation: "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData".
Why can't Express see the directory on the D: partition???
What is wrong? Here? Can anybody help me?
View 5 Replies
View Related
Apr 18, 2002
Hi,
Just a quick one.
Is it advisable to have the data files and log files for a database in the same folder or different folders and what is the difference if any.
Thanks for the advice.
Stevfe
View 2 Replies
View Related
Feb 21, 2006
A colleague of mine has a view that returns approx 100000 rows in about 60 seconds.
He wants to use the data returned from that view in an OLE DB Source component.
When he selects the view from the drop-down list of available tables then SSIS seems to hang without any data being returned (he waited for about 15 mins).
He then changed the OLE DB Source component to use a SQL statement and the SQL statement was: SELECT * FROM <viewname>
In this instance all the data was returned in approx 60 seconds (as expected).
This makes no sense. One would think that selecting a view from the drop-down and doing a SELECT *... from that view would be exactly the same. Evidently that isn't the case.
Can anyone explain why?
Thanks
-Jamie
View 2 Replies
View Related
Oct 19, 2006
It is very intersting to find out that when we are backuping a database we are not able to specify a shared folder .Why?Is it because security concern or it is idenfied as bug or is there any work around.Only thing we are able to specify is that it points to the local drive of the particular server. Help would be more appericated.
View 7 Replies
View Related
Mar 27, 2007
Does anyone know where a good article pertaining to where you should locate your Data and Log files (in SQL Server 2005)?
I read an article several years ago stating that Log files should be on a seperate RAID 1 and Data on a seperate RAID 5.
Anyway, any help is appreciated.
View 1 Replies
View Related
Apr 10, 2007
I am getting this error when i run my aspx project..Server Error in '/' Application.
Incorrect syntax near '.'.
Description: An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '.'.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): Incorrect syntax near '.'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857354 System.Data.SqlClient.Sql is there anyway that i can get the line number ,file or any other information regarding location off error.. i got abt 3 aspx files..so i dont really know where to look for the error..
View 2 Replies
View Related