Is There A Way To Change Logical And Physical Datebase Filenames?
Aug 23, 2006
A database was set up as a test database and then the database name changed but the logical and physical filenames still have test in their name - obviously not a good idea. I have tried to change the physical file name but get the error message that the physical file name cannot be changed once the database has been created. I have also tried detaching the database and renaming the mdf and ldf files but these could not be re-attached so had to revert back to the original names.
View 2 Replies
ADVERTISEMENT
Oct 24, 2001
Pros,
I would like to change the logical filenames for a database on my test server. I know this is done with ALTER DATABASE, but I'm not sure of the exact syntax. Can anyone help?
rb
View 3 Replies
View Related
Mar 26, 2015
I have a folder with 1000 text(.txt) files in it.
I want to insert the filenames into a table in sql server.
Is it possible in SQL Server 2008..?
View 4 Replies
View Related
May 19, 2008
hi we are in the process of developing a project and we r at the initial phase i.e. at the analysis phase and we have been discusssing on what is physical and logical database design. can any body send any links or articals on this will be hightly appreciated.
View 1 Replies
View Related
Sep 12, 2005
What is the difference between the logical database schema and the physical database schema?
Thanks!
View 4 Replies
View Related
Jun 16, 2003
Does anyone have any recommendation on whether it's better to monitor the average queue lenght for physical or logical drives? What about for a RAID set?
Just wondering,
thanks
View 6 Replies
View Related
Jul 9, 2014
What is the difference between Logical Join and Physical Join and there Types?
View 6 Replies
View Related
Apr 3, 2011
Is there a query or sp that I can pull all databases on the server along with their logical file names and physical file names?
View 5 Replies
View Related
Oct 22, 2015
We have an OLTP database and operational reporting is carried out on a replica server / database. We have plans to build a new data warehouse and an analysis services cube.
Question 1:Should a cube be designed to extract data from a physical star schema rather than a logical one (3NF relational (ODS?) using a data source view to derive the star)? I'm guessing for performance it's better to pull data from similar structures (physical facts and dimensions as required by analysis services) but is the difference significant?
Question 2:Depending on the answer to q1, is it bad practice to ETL data from a staging database (replica > staging) directly to a star schema (multiple data sources and cleansing / business rules required)? Or should it be processed from staging to an ods and only then to a star schema (physical or logical). I still don't know if an ODS is required but I guess the consideration for this decision is whether the business would require  daily operational (or ad hoc) reporting on the consolidated data sources (without needing historical DW functionality).
View 2 Replies
View Related
Jan 18, 2000
I cannot find the answer to this: how do you update the logical file name for a database? Restore database "Alpha" over "Beta" specifying WITH MOVE parms allows "Alpha"'s physical files to overlay "Beta"'s, but now "Beta"'s logical file names are "Alpha_Data" and "Alpha_Log".
Updating sysfiles directly gives back a 270; "Get outta here!"
Can this not be done?
View 2 Replies
View Related
Aug 9, 2006
I'm trying to restore about 70 databases onto a new SQL server andwanted to script the creation and restore. I've done the creation withno problems, but on the restore, the logical names (of the originaldata) are all over the place and were historically wrong.So, when I use the script below... I've had to work out the Logicalname for the data and the log file and alter the script accordingly.Creation------------Create Database MyDatabase ON (NAME = MyDatabase_data, FileName ='D:DatabaseMSSQLDataMyDatabase.mdf') LOG ON (NAME = MyDatabase_log,FileName = 'D:DatabaseMSSQLDataMyDatabase.ldf') COLLATESQL_Latin1_General_CP1_CI_ASRestore-----------RESTORE FILELISTONLYfrom disk ='D:DatabaseMSSQLBACKUP2006-08-07MyDatabase_db_200608072100.BAK'restore database MyDatabasefrom disk ='D:DatabaseMSSQLBACKUP2006-08-07MyDatabase_db_200608072100.BAK'with REPLACE,MOVE 'SomeOtherRubbish_Data' TO'D:DatabaseMSSQLDataMyDatabase.mdf',MOVE 'SomeOtherRubbish_Log' TO'D:DatabaseMSSQLDataMyDatabase.ldf'goWhen I then look at the properties of the database, it shows the oldconvention which I don't want.So, even though I've been neat creating the database, it getsoverwritten with the odl rubbish name. How can I change the logicalname so that I can have a nice and neat naming convention ?Oh, Yes I know I added the collation when creating the database, butthat's another thing that we need to address at some point.Thanks in advance
View 2 Replies
View Related
Jul 20, 2005
Hi,Is there an option (stored procedure) or whatever to change to logical nameof the databasefile and the database log file ?Arno de Jong, The Netherlands.
View 1 Replies
View Related
Nov 5, 2006
Can someone please explain this statement: At the logical level where there can be any number of entities in a relationship while physically you define relationships between two tables.
thx,
Kat
View 1 Replies
View Related
Jan 3, 2001
Hy,
I´ve a litel question.
I restored a Database with the Enterprice Manager. The database has a snapshotreplication configuried.
The restor of the database are correct.
But at this time, in the Enterprice Manager at the database it stand <DBNAME> (loading). I don´t what is this. I´ve got some more databases restored. But i´ve nerver seen this before.
Can some one tell me what is this? Or what must I do???
Thanks
Manfred
View 1 Replies
View Related
Mar 14, 2004
Im the new in ASP.net.
I find no way to connect remote datebase(sql server 2000).
Everybody who have ways help me.
Thank you!
View 3 Replies
View Related
Jul 11, 2004
I have a samll problem in my select statement. my database filed is sendingDate as dateTime datatype
I have form that accpet date as text
i need to search for this text in my datebase. can any body help me to write a select statement that search for the text filed in my datebase.
Expamle
Textbox.text="11/07/2004"
SendingDate in the Database = 2004-07-11 00.00.00.000
please help me on that soon.
View 4 Replies
View Related
Nov 27, 2006
hi noob here to ask a question.
I am trying to restore a database to a new box, but I only want to restore the tables, sp, diagram... everyththing but the data. Is it possible?
View 5 Replies
View Related
Sep 15, 2006
OK this is going to sound like a very easy question but for the life of me its not working.
I have got a login called "Sales" and it is binded to a user called "sales"
The sales user has of course got the public role for my database.
I have created a Role on the database called "Sales Role" and given all the needed permissions to all the tables in the database.
As soon as i give the user the new role and then go to the securables area and look at the tables and hit the "Effective Privileges" button there is nothing listed....
If i take off the "Sales Role" role from the user and go back and look at the "Effective Privileges" it is filled with the privileges the public role has given it.
Any one no why as soon as i give the user my role (which has got privileges set for every table) the user does not have any effective rights on any table?
View 4 Replies
View Related
Jan 23, 2004
Hi all,
does someone know an Internet Provider for MSDE database?
Regards
Leonid Pavlov
View 1 Replies
View Related
Nov 13, 2007
How do I build a dynamic filename using an SSIS package? Do I do this thru Expression Building?
View 10 Replies
View Related
Oct 10, 2007
I'm using SQL2005 and need to script a bunch of Tables (and possibly other objects) to files. I can't make one big file with all the objects in it. I need to create an indiviual file for each object and each filename needs to be something like dbo.objectname.sql. I will be checking each file (object script) into VSS. Can someone tell me how to do this withouth having to manually generate a script for each object? Is there a way to check each object you want scripted and the SSMS spit out a file per object?
Thanks
View 7 Replies
View Related
Feb 8, 2007
I was wondering if it is possible to create a variable that holds the filename as an expression. I am using a For each loop to pick up files and i want to insert the 'Filename' as a colum in to the destination Table so that i can differentiate among the rows in my destination Table.
Using the 'Derived Colum' in DTS I can link the colum to a variable. However i do not know how to create the variable which will dynamically store the filename for each file....
Any Clues...
Would really appreciate the help.....
Or is anyone knows any other simple way of inserting the filename as a column in the destination Table ...Been stuck on this for a while...
View 6 Replies
View Related
Sep 3, 2007
Hi all,
I want to find the list of filenames associated with the SQL server instance programmatically. As VDI is concerned with taking backup of SQL server. Can we find the list of filenames associated with a DB using VDI ? or Is there any other way to know filenames?
Thanks in Advance,
Ram
View 1 Replies
View Related
Mar 13, 2006
I have a table which has three fields.
The table name is Filename,and it has three fields:Id,ArticleID and Filename
I have an integer variable int
I want to select all the filenames that have ArticleID=int
I used the following SQL statement but it didn't work
Select Filename from Filename where ArticleID=int
wHAT'S wrong with it
Thanks
View 3 Replies
View Related
Aug 27, 2015
I’m working on building a file list from a directory I have and wish to loop through the filenames. I’ve worked out I can get the list using
EXEC
xp_dirtree @path, 10, 1
I’m just not sure out I pass this to my loop 1 element at a time.
E.g. Let’s say there are 10 files in my folder, I wish to loop through each name using my @Filename parameter
DECLARE @Path
varchar(50), @FileName
varchar(20)
SET @Path
= 'C:myFiles'
EXEC
xp_dirtree @path, 10, 1
[Code] ....
View 5 Replies
View Related
Jan 24, 2006
Due to circumstances beyond my control, I have to restore a full database backup from October 1, 2005 and then over 4400 transaction logs to bring a database up to Jan 01, 2006 on a development server (storage team lost all daily full backups from 10/02/2005 to 01/01/2006). Since the backups were not taken on this machine originally, the information I would pull from the sysjobhistory tables to get the transaction backup names is not available. Does anyone have a link or a script to pull the filenames from the backup directory into sql server so I can build a dynamic script to apply the tran logs instead of running all 4400+ of them by hand? Thanks, Tom
View 5 Replies
View Related
Oct 11, 2015
I am trying to break apart a list of filenames that was inserted into a database. It only breaks out the first one then moves onto the next record. If I do them individually then seem to work but not the whole table when queried. I need to break out each file into a temp table then insert them into a documents field in a database.
my filenames look like so and can have from 1 file name to 10 file names in the string.
test.pdf,test2.pdf,test4.tif,test5.pdf
somedoc.tif,test.docx,test4.pdf
This is my current method, I needed to create a cursor around it to go through all the records, split out the filenames and insert into a temp table. But if there is a better way ill do it. The problem with this is only the first file is getting inserted into the temp table and nothing else even if the filename has 4 files in it.
Create table #tempFiles (OldStrId int, OldPercent int, strfilename varchar(max), RequestId int, OblId int)
declare @OldStr int, @OldPer int, @FileName varchar(max), @intcount int;
Declare filenames CURSOR FOR Select intSTRBonusID, intPercentID, strFileName from tblSTR where strFileName > ''
UNION ALL
Select intSTRBonusID, intPercentID, strFileName from tblSTRHist where intPercentID in (61,62) and strFileName > ''
[code]....
View 2 Replies
View Related
Apr 3, 2007
It's very easy to make a generic xml configuration file for the connection to the database for all packages my project contains. The connectionstring is the same for all these packages
Now I want to do the same for all flat file sources I have in my project where the connectionstring is not the same for all packages.
For example I use the following flat files in my project:
c:AAA.txt
c:BBB.txt
c:CCC.txt
If I move the packages to the production database the flat file sources are located in another directory.
So in fact for the flat file sources there is a generic part for all files (in this case 'c: ') and a specific part ('AAA.txt', 'BBB.txt' and 'CCC.txt').
Can I indicate this in the package configurations sections? And how?
Thanks,
John
View 3 Replies
View Related
Apr 20, 2015
I am importing Differennt Excels Files into table. my require ment is after importing completed I need to insert all these Filenames ,File creation date into table. (for Auditing).
View 9 Replies
View Related
Feb 13, 2008
Hi all
We generally modify the logical name of a data file or log file from the vendor defined to our standard name. Is there any impact that you know about this? If you have 2 seperate database and accidently you have 2 same logical name .. I dont' think that will be an issue ... correct?
ALTER DATABASE XXX_UAT
MODIFY FILE (NAME = 'mdd_Data', NEWNAME = 'XXX_UAT_Data')
GO
ALTER DATABASE XXX_UAT
MODIFY FILE (NAME = 'mdd_Log', NEWNAME = 'XXX_UAT_Log')
GO
View 1 Replies
View Related
Jul 17, 2007
Hi,I want to change the logical name of the database. My database name and.MDF has the same name, but the logical name is different. Willchanging it impact anything?--sharif
View 1 Replies
View Related
May 21, 2008
I have a query. on my search page i have a number of textboxes e.g. title, subtitle, ISBN where users can enter a search string and when they click on a button the data is displayed in the gridview below.
my query seems to be bringing up the right records but with some additional records into the gridview. I have tried the same query within the SQL server management studio and it brings back two records like indicated but within my aspx page it brings back 6 additional records that have no relevance to the query. Im quite baffled as to why this is happening and i have debugged but nothing comes to light.
my code in my aspx page is as follows:
public void BindData(){String _BookID = TxtBookID.Text;String _Title = TxtTitle.Text;String _Subtitle = TxtSubtitle.Text;String _ISBN = TxtISBN.Text;String AuthorFName = TxtForename.Text;String AuthorLName = TxtSurname.Text;
SqlDataAdapter ad = new SqlDataAdapter("SELECT Book_ID, Book_ID_Internal AS [Book Internal ID], Title, Subtitle, ISBN, Edition, Publication_Date AS [Published Date] FROM Book WHERE Book_ID_Internal = '" + _BookID + "' OR Title = '" + _Title + "' OR Subtitle = '" + _Subtitle + "'", conn);DataSet ds = new DataSet();ad.Fill(ds, "Book");if (ds.Tables[0].Rows.Count == 0){//if there are no rows returned-state in the gridds.Tables[0].Rows.Add(ds.Tables[0].NewRow());GridView1.DataSource = ds;GridView1.DataBind();int columncount = GridView1.Rows[0].Cells.Count;GridView1.Rows[0].Cells.Clear();GridView1.Rows[0].Cells.Add(new TableCell());GridView1.Rows[0].Cells[0].ColumnSpan = columncount;GridView1.Rows[0].Cells[0].Font.Italic = true;GridView1.Rows[0].Cells[0].Text = "No Records Found";}else{GridView1.DataSource = ds;GridView1.DataBind();}}
if i input the same query into SQL management studio:
SELECT * FROM Book WHERE Book_ID_Internal = 'ITD 450' OR Title = 'HTML 4.0'
it returns two records which is correct.
Can anyone see where i am going wrong?
View 4 Replies
View Related