Alter Database File Extension
May 14, 2008
Hi,
I'm trying to change the file extension of one of the database files of a big database that contains 10 years of EPOS data.
When this file was created, at the beginning of 2008, with the following script:
USE [Live]
ALTER DATABASE [Live] ADD FILE (NAME = 'Live_2008',
FILENAME = €˜E:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataLive_2008') TO FILEGROUP [2008]
the .ndf file extension was not added to the filename. So the file now has a file type of "File", instead of "SQL Server Secondary Data File"
I tried, in a test environment, to bring the database offline, change the filename to "Live_2008.ndf" and bring the database back online, but it gives me an error message saying that "cannot open the Live_2008 file", i'm guessing because it's looking for "Live_2008" and it finds "Live_2008.ndf" instead.
This file is quite big (5Gb) and I cannot afford to risk to lose any data.
The situation is complicated even further by the fact that it seems that a partition for 2008 does not exist.
How can I find out what data this file contains?
Is it going to be an issue if I leave the file like that?
Thanks
View 3 Replies
ADVERTISEMENT
Apr 4, 2001
I'm attempting to alter a database by removing one of two log files. I have truncated both log files successfully and the database has no processes but I get an error stating file cannot be removed because it is not empty. Help
View 2 Replies
View Related
Jun 25, 2015
We are running into the following error while changing a column data type from nvarchar (1200) to varchar(8000)
"Msg 1105, Level 17, State 2, Line 1
Could not allocate space for object 'dbo.TBL1 '.'PK_CL_ID' in database 'Client01' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
The statement has been terminated."
Now tried to change the filegrowth of the log file to unlimited
ALTER DATABASE Client01
MODIFY FILE ( NAME = Client01_log, MAXSIZE = unlimited);
The query executes without error but I do not see the auto growth as unrestricted. It's still 2GB
View 6 Replies
View Related
Nov 6, 2015
I can run this command to make changes for 1 DB USE [master]
GO
ALTER DATABASE [DBName] MODIFY FILE ( NAME = N'Name_log', FILEGROWTH = 10000KB )
GO
Is it possible to create a script which changes log file size to let's say 100MB for all DBs in all servers instead of running the above command by logging into each server? We have about 200 servers and close to 3000 DBs.
View 2 Replies
View Related
May 8, 2015
I checked quickly one network  and I ran into the folders; I found out the folder MSSQL backup, nothing strange so far. Within that folder, anyway, I found out several backup and one very huge file (datawarehouse) with extension FILE. I am wondering what can be? I got datawarehouse mdf of course and datawarehouse log but what is that huge file (1 TB)?
View 6 Replies
View Related
Sep 27, 2006
I was told by my website provider that they do not support the .mdf extension and only support the mdb extension. What am I not getting here? I am using SQL Server Express 2005. Is .mdf a subset of .mdb?
View 1 Replies
View Related
Aug 16, 1999
Hi,
I need to read a binary file with extention *.dat like this:
tat.dat and import it in ms sql server 7.0.
Thanks for any help
Dr Bangaly Diané
View 2 Replies
View Related
Oct 25, 2006
Hi,
If access database has an extension of .mdb then what is sqlserver2000 file extension?
View 1 Replies
View Related
Feb 2, 2008
Hello there!
I am in need of urgent help. i do believe that when you used the command SPOOL filename without specifying an extension name, it automatically puts an .lst extension name. Can you help me identify if there is any way i can generate a file without an extension name? I am in need of help right now. I hope someone will answer my post as soon as possible. I really really appreciate it!
Thanks,
Jen
View 1 Replies
View Related
Jul 20, 2005
Hi All,I am receiving the following message when I run Dts package which iscreating a cube.Error Source : Microsoft Data transmission Services (DTS)PackageError Description: File name or extension is too longAny help will be appreciated!Thanks in advance,Mohammed SarwarOcp dba oracle 9i,8i,8.0*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
View 1 Replies
View Related
Jan 4, 2006
In document for encryption in SQLServer with application XP_Crypt, i see file with extension .pem when using private key or public key. How to create file .pem. Please explain me private key or public key.
View 1 Replies
View Related
Jul 5, 2006
I set up a basic ForEach enumerator loop and specified files of type *.sql.
In the directory, I had some files I needed to keep but didn't want the package to touch, so I changed the extension to *.sqlo. Much to my dismay, the ForEach loop picked up those files. (Though it did skip the *.xml and *.bat and a few other types...)
Sounds like a bug to me.
View 3 Replies
View Related
Sep 26, 2007
I programmed a Source extension, that accesss a text file. In my code I have the following code to open a file:
protected override void reader(PipelineBuffer buffer)
{
TextReader reader = File.OpenText(_filename);
The komponnet works well. How do I grant permissions to access this text file? Because I got problems when I try to run my package using a task created in the SQL Server Agent.
View 3 Replies
View Related
Apr 18, 2007
i have sql server 2000 db with two data file... primary data file has extension mdf and secondary file has extension ndf (as per microsoft recommendation)..
when i try to backup the db and restore thru the enterprise manager .. in the restore -> options window ... i see both the files has the same extension mdf.. and when the restore completed, the new database still has extension mdf for both the file..
why this behaviour?
* i even try to create a new test db with two files, still its the same behaviour.
View 10 Replies
View Related
Dec 8, 2008
I have just begun to try out differential backups. Almost every reference I found on the internet said to use a .dif file extension. Books Online "Back Up Database Task (Maintenance Plan) MS.SQLCC.v9/MS.SQLSVR.v9.en/uirfsql9/html/ed1ef012-fa14-4ba5-bafe-d1527ba065b3.htm only says :
Backup file extension Specify the extension to use for the backup files. The default is .bak.
                                                                                                                                  Â
Using .dif for the differential shows "Microsoft Office Excel Data Interchange Format" as the type when looking at the backup folder. URL... indicates that .dif has 11 different uses, including "Difference data file." In a couple of posts in this forum in April and May of this year David Dye said that the file extension for differential backups is .bak, the same as for the full backup.
Â
If this is the case, this would cause a problem with our maintenance plan policy which is to retain the two most recent backup files on the server. If we do a full backup for the base on the weekend and differential backups the rest of the week, our full backup would have to be restored from out tape system before we could do a restore. Recoveries are pretty rare, but when we get that panicked phone call that someone accidently deleted all the records of a major client, time is of the essence in getting that point in time restore done.
View 6 Replies
View Related
Apr 18, 2007
Hello,
I try to add an data extension who take the information to connect to the database in a config file. But It's could not retreive the values corresponding to the key.
I'm using the class ConfigurationManager from the namespace System.Configuration.
ConfigurationManager.AppSettings["QueryModel"]
Without the config file, the extension is working well.... I got the impression that reporting service and Visual Studio BI don't find the config file.
If someone can help me or have some advices. I will be pleased
View 1 Replies
View Related
Nov 30, 2015
I have a source file as filename.mar it is microsoft access report. When I am loading into my database the file name was something like filename.nov (its current month).
When I ran the package its shows error system cannot find the file filename.nov.
View 2 Replies
View Related
Jun 29, 2015
I use an execute sql task and excel connection manager to craete excel file.
Execute sql task:
In the connection:
Â
It works. But when i choose file path to: C:1111.xlsx
And excel version to micorsoft excel 2007. When open the file it created,it promotes the format is not correct. How to solve this?
View 5 Replies
View Related
Feb 24, 2010
When I am saving a SSRS report in excel format in a shared network drive, how can I add the date extension to the filename ?I assume this is something that needs to be handled within the SSRS reporting side rather than the subscription side.
View 5 Replies
View Related
Jun 24, 2006
hello ... I am trying to copy 1 field from a table in database called DB1 to a same table in DB2 .. I am not sure if this is possible. I found out form www3.schools.com it's doable using Select Into ... but it uses MS Access for example (Northwind.mdb) ... I wonder what's the extension database in MS SQL? Does anyone know where can we check the query syntax on the web? Can anyone tell me it's correct? I dun have MS SQL from home .. so :(
======copy prodID from DB1 to DB2 table called production1 (both DB1 and DB2)=======
// this is done in SQL QUERY ANALYZER under DB1?
SELECT production1.prodID INTO production1 IN DB2 FROM DB1
=====create VIEW in DB2=======
// this has to be done in DB1 ... if I have multiple databases, is there anyway to do it using something like SELECT INTO to create view in differences databases?
CREATE VIEW production_id AS SELECT prodID from DB1
View 1 Replies
View Related
Jun 16, 2015
Using SSRS 2008R2 is it possible to change the file extension of a CSV data driven subscription? Â I'm outputting a text file with a .csv extension, but users have access to these files and I don;t want them opened with Excel and then saved back in an incorrect format.Â
These are the options I have from the report "manage" option. Â
View 2 Replies
View Related
May 6, 2015
I have implemented a package to load multiple files to a destination. Since the source was a txt file, i have created as flat file source. However now we are getting files in excel format as well.
Is there anyway the source gets changed dynamically based on the file extension, output of the foreach file enumerator? I can think one solution to have 2 dataflow tasks based on precedence constraining and expression one is for .txt and other one is for .xls.
View 6 Replies
View Related
Sep 2, 2007
Greetings, I have just arrived back into the country (NZ) and back into ASP.NET.
I am having trouble with the following:An attempt to attach an auto-named database for file (file location).../Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
It has only begun since i decided i wanted to use IIS, I realise VWD comes with its own localhost, but since it is only temporary, i wanted a permanent shortcut on my desktop to link to my intranet page.
Anyone have any ideas why i am getting the above error? have searched many places on the internet and not getting any closer.
Cheers ~ J
View 3 Replies
View Related
Aug 15, 2006
Good Morning..
We're having a heck of a good time trying to implement our first CDE project in SSRS 2005.
In our SDE class library we have included an App.Config file where we want to store configuration settings..
Trouble is that when we view the configuration settings or connection string settings in debug mode, they're not being read for some reason..
Here's our app.config file:
-------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<appSettings>
<add key="eventLogName" value="FocusDPEEventLog" />
</appSettings>
<connectionStrings>
<add name="PassConnString" connectionString="Data Source=SOMEDATASOURSE;Persist Security Info=True;User ID=SOMEUSERNAME;Password=SOMEPASSWORD;Unicode=True"
providerName="System.Data.OracleClient" />
</connectionStrings>
</configuration>
-------------------------------------------------------------
Here's what our Immediate window Debugger is tellin' us about our configuration settings:
-------------------------------------------------------------
ConfigurationManager.AppSettings
{System.Configuration.KeyValueInternalCollection}
[System.Configuration.KeyValueInternalCollection]: {System.Configuration.KeyValueInternalCollection}
base {System.Collections.Specialized.NameObjectCollectionBase}: {System.Configuration.KeyValueInternalCollection}
AllKeys: {Dimensions:[0]}<----incorrect should be 1
ConfigurationManager.ConnectionStrings
Count = 1 <----ok, is one, but the wrong 1, see 3 lines down...
base {System.Configuration.ConfigurationElementCollection}: Count = 1
ConfigurationManager.ConnectionStrings[0]
{data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true}<--Should be PassConnString
base {System.Configuration.ConfigurationElement}: {data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true}
ConnectionString: "data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
Name: "LocalSqlServer"
ProviderName: "System.Data.SqlClient"
Now notice the stuff in bold...I have NO IDEA where this gosh-danged thing is reading, but it doesn't seem like it's the app.config file in our class library...
thanks..
Doug
View 1 Replies
View Related
Sep 5, 2006
I want a database user to be able to alter login, database user and database role from my application. so, i assigned that user to sccurityadmin server role, db_accessadmin and db_securityadmin database roles....By now, the user can add or remove login and database user. However, the user cannot add or remove any database role membership. What am I missing here?? What should I do so that the user can create, and alter database roles in the database??
View 1 Replies
View Related
Jul 20, 2015
I have a script that automates some db drop/restore operations and bringing the database to single user mode is part of it: ALTER DATABASE ... SET SINGLE_USER WITH ROLLBACK IMMEDIATE...I want this to executes under a login, that has restricted privileges, so I've created a login and granted it a dbcreator role + ALTER ANY DATABASE privileges.
Problem: When I run the script against a database with an active/sleeping connection:It fails when using the restricted login: "Msg 5061...ALTER DATA BASE failed because a lock could not be placed on database ..."It completes successfully when using a sysadmin login According to stackoverflow.com the solution is to kill the active/sleeping connections to the database, before ALTER-ing it, which works fine, but the question is....
Questions: Why the "ALTER DATABASE..." statement works under the sysadmin login, but not under a dbcreator one?Does this mean the sysadmin login kills the connections to the target database in the background?Is it possible to grant additional privileges to the restricted login, so the "ALTER DATABASE..." statement won't need preventive killing of the connections?
View 5 Replies
View Related
Oct 31, 2005
I have the next question, and i would like to hear what do you thinkabout, and if is there a better solution for "my problem"here is the question, I have a huge table with 60GB of data (imagefiles). The problem happen always when i try to ALTER the structure ofthe table. For example I change a field char(3) to char(4)...thesqlserver then performs the "alter table" command...that must besomething similar than "insert into the new table + drop the actualtable" and for that I need about 60GB o space for my LOG file, andtakes hours to complete the operation.Is this the only way to alter a single field in my table??I would like to heard you opinions...Thanks..ALberto
View 2 Replies
View Related
Oct 9, 2007
yes,I have an error, like 'The database file may be corrupted. Run the repair utility to check the database file. [ Database name = SDMMC Storage Cardwinpos_2005WINPOS2005.sdf ]' .I develope a program for Pocket Pcs and this program's database sometimes corrupt.what can i do?please help me
View 4 Replies
View Related
Aug 25, 2000
I am using SQL 6.5. Can I create a database and Alter the same
database in one SQL Script?
Thanks in advance.
View 1 Replies
View Related
Jul 23, 2005
Hi people,I?m trying to alter a integer field to a decimal(12,4) field in MSACCESS 2K.Example:table : item_nota_fiscal_forn_setor_publicofield : qtd_mercadoria integer NOT NULLALTER TABLE item_nota_fiscal_forn_setor_publicoALTER COLUMN qtd_mercadoria decimal(12,4) NOT NULLBut, It doesn't work. A sintax error rises.I need to change that field in a Visual Basic aplication, dinamically.How can I do it? How can I create a decimal(12,4) field via script in MSACCESS?Thanks,Euler Almeida--Message posted via http://www.sqlmonster.com
View 1 Replies
View Related
Jan 23, 2001
I am trying to move one of my database log to different location but I am geeting an error when I try to do this.
I am moving Registration DB log file from 'c:mssql7
egistrstion_log.ldf'
to 'e:sql
egistration_log.ldf'
Here the syntax I am using to do this:
alter database registration modify file (name='registration_log',filename= 'e:sql
egistration_log.ldf')
But I get the following error:
Server: Msg 5037, Level 16, State 1, Line 2
MODIFY FILE failed. Do not specify physical name.
Thank You,
John
View 1 Replies
View Related
Jul 31, 2006
Hi all this is my first of most likely many posts.
I am writting a stored proc that will be used on many diffrent named databases and i am setting the database name with a variable. I would like to use this variable in the following situation any clues on this would be greatly appreciated.
DECLARE @DBName varchar(50)
SET @DBName='Database'
alter database @DBName set recovery full
regards
Phil
View 4 Replies
View Related