I just upgraded to SQl Server 2000 from 7, and realized that all my reports created with existing scripts no longer work fine. The reports appear corrupt. Below is an example of a report script:
declare @vSubject varchar(30),
@vMessage varchar(20)
Begin
The company for which I work did not have a DBA until I started a few weeks ago. Whoever installed SQL2K used the wrong CD so they have been running Personal Edition on their servers. I have installed a new SQL2K standard instance and have restored everything except the jobs and DTS packages. Can the msdb from the Personal edition be restored to the standard instance?
Is it possible to downgrade SQL from Enterprise to Standard Edition, or do you have to remove the previous installation (uninstall) and reinstall. Meaning you would also have to restore all user databases? Thanks.
I had a peculiar problem yesterday with SQLserver2000 database restore from one server to the other. I copied the .BAK file ( 11.2 GB) from source server to target server. Target server already had the same name database. I use SEM to do restore the database using the disk file .BAK as source to restore. The NT drive space was 13.5 GB available after copying. Restore failed with an error that not enough disk space is available to restore and it needs 23 GB of space for expansion. What does it mean? The database went into "Loading" state and it got corrupted. I tried to drop the database and cleared the DBF and LDF files on the drive and again tried to restore from .BAK file but it failed again with the same error message that not enough space is available for expansion. Now I do not have the original database or am not able to build the new database.
Finally I did attach/detach methods where I could bring back the database in running state.
What is it complaining about not enough space? Why did it ask for almost 100% more space for some expansion in restore process? Why it did not fail when doing attach/detach methods from other server.
Hi! After upgrading SQL Server from 6.5 to 7.0 my production database compatibility level is "65". I checked that by executing sp_dbcmptlevel <database_name>. I can change it to "70" but my question is how it's going to affect the application and do I have to change it?
One of the forum user suggests that I need to post the following issue to this area relating on data corruption.
Here's where I am up to in detail: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=74599
Summary: Basically, I made a daily automatic testing restore to TARGETSERVER and every database are ok except the master database. I do DBCC CHECKDB on master database in the SOURCESERVER .. and no error what so ever. But the result of restoring of the master backup does. This happens everday.
Let me start off by saying that under normal circumstance I would just restore from the last good backup. However in this case it appears as though the last good backup was sometime last August ... arg! After much yelling at the person responsible I've been attempting to get my blood pressure below 200 and see what data is recoverable.
First off, this was a RAID5 system that failed 1 drive. Secondly, before we got someone in there to replace said drive it failed a second drive and the system went down. We managed to massage the system back online but it appears that there is some corruption as a result which is no surprise.
I've done DB repairs in the past and it hasn't been too bad, but this time it is looking a little gnarly.
I've kicked everyone off the server and tried starting SQLServer several different ways.
I tried starting the service normally and then flagging the bad DB into single user mode with "ALTER DATABASE foo SET SINGLE_USER". I then did a select * from sysdatabases to make sure it took, which it did. I also tried starting the whole SQLServer in single user mode from the command line, "SQLServr -m".
I can run "DBCC CHECKDB('foo')" and I get a long ugly list of allocation errors. I posted it to a link as the 1349 lines returned is a little long: http://chrisnet.net/sqlbad/dbcc_checkdb.txt
But when I attempt to bite the bullet and destroy data in an attempt to put things back together with: "DBCC CHECKDB('foo', REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS" I get: Server: Msg 7919, Level 16, State 2, Line 1 Repair statement not processed. Database needs to be in single user mode. DBCC execution completed. If DBCC printed error messages, contact your system administrator.
But yet the database is in single user mode, according to everything I check check on. Is this just SQL's way of telling me the corruption is too severe to be repaired? No output is displayed in the shell cmd window like it is for a successful DBCC either (when running sqlservr -m).
Greetings all,This should be an easy task, and Im sure it is, but as many times as I havetried, I cant seem to get this to work properly.We changed ISPs recently from a shared host to a co-located server, and ourformer host was nice enough to send us a backup of our old SQL2000 database(about 5MB).I went into Enterprise Manager, created an empty database with the same nameand used the Restore Backup tool successfully. I took a look at the db andsaw all the Tables and data intact.Next I wanted to re-create the DSN to match the old one so that I wouldnthave to fiddle with any of the old connection strings in my asp pages.Thats where the fun began. The old DSN was created by our host via an emailrequest and I never got a look at the actual creation process of that DSN.I created one on our colo server with the same name, but it would only passthe connection tests when I used the Windows User Authentication rather thanSQL Server Authentication. No big deal I figured, and just went ahead andset it up using the same DSN name.Next I tried the main.asp page to test the DSN and lo and behold I got theODBC connection errors. I tinkered with the connection strings a bit andmanaged to get a wide variety of connection errors and fine-tuned to thepoint that it said "Unable to login with user 'SERVER169/nacog'". At thispoint, I went into Enterprise manager and added 'nacog' to the User list andthe connection string no longer produced errors. (By the way, my connectionstring simply contains "DSN=YAVAPAICONNECT;")My next step was to actually execute a SELECT statement which produced thefollowing error:Microsoft OLE DB Provider for ODBC Drivers error '80040e09'[Microsoft][ODBC SQL Server Driver][SQL Server]SELECT permission denied onobject 'ADMINS', database 'YAVAPAICONNECT', owner 'dbo'./nacog/admin/main.asp, line 189Why was I not surprised?I went back to Enterpise Manager, saw the all the tables had 'dbo' as theowner, and tried to give 'nacog' all the permissions at the table level, butthe error persists.To preserve my sanity I stopped there, because I spun my wheels for hoursand days the last time this happened. and my eye has not stopped twitchingsince ;)I am quite sure that this has something to do with one or all of thefollowing:1) The way SQL2K was installed (it was installed by someone else)2) My creation of the db with the windows login, rather than SQL auth, priorto import3) My creation and handling of the DSNMy background is mainly in ASP programming, and I understand bits and piecesof this puzzle, but for the life of me I cannot piece this thing together.Can anyone help point me in the right direction or suggest a good tutorial?I would be very thankful to anyone who could help put me on the right track.Best Regards,Ben M.
I have captured some trace output for performance evaluation for an application which has just been upgraded. Originally, this application can only run with database compatible 70.
So, after we have switched this level from 70 to 80, I noticed that all T-SQL statements which executed thru the use of "sp_executesql" have much higher IO usuage. The usage increased from approximately 50 I/O to approximately 12000 I/O. When I reviewed the profiler output, I noticed that all select statements which executed thru this "sp_executesql" statements performed "index scan".
When I switch back to run with database compatibility level 70, my profiler output shows that all these "sp_executesql" statements performed "index seek".
All these statements use the same unique non-clustered index.
Is it a SQL Server bug? Does anyone know which service pack or hot fix address this problem?
I have been migrating Databases from a SQL Server 7.0 Instance to a 2000 Instance. Basically the method I use is as follows:
a)Create a new Database on the Destination Server (same name as the Source) When I create the new Database on my destination server, the compatibility mode is '80' and the source is always '70'
b) do a 'revlogin' on the Source Server and use the output from that query to recreate the logins on the destination server
c) make sure that the default DB for the newly creates logins are correct and change them if necessary
d) Backup the DB on the Source Server and Restore it to the Destination Server.
e) Check login permissions and fix any orphaned users - usually I don't find any that need to be fixed, but I always check.
I've read BOL on Changing the compatibility mode on the Database... but I'm still unsure when I would have to do this and why???????????????? SHOULD I be changing the compatiblity mode from 80 to 70 when migrating Databases from 7.0 to 2000???? Any advice on moving DBs in this manner would be appreciated.
When my app starts up I want to ensure that the database compatibility level has been set to 90. I know about sp_dbcmptlevel, but that only seems to work in an interactive session; the documentation says it can't be used in a stored procedure, and that appears to be true. Does anyone know how I could read the database compatibility level in a stored proc?
In topic http://forums.microsoft.com/TechNet/showpost.aspx?postid=3143663&siteid=17 I have mentioned a problem I have. I was told that this forum is a better place to ask for a solution.
The problem I have:
On a fresh installed Windows 2003 R2 with SP2 (x86) I have installed ACT 5.0.5428.1056. The installation went well but no data is transferred from the ACT Share to the database. All the data is moved to the 'Failed' folder. On the same server MS SQL Server 2005 with SP2 has been installed successfully.
In the eventvwr I see the following error messages:
Source: ACTUpload Categorie: NONE EventID: 0
ACTUPLOAD: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
at System.Security.Cryptography.MD5CryptoServiceProvider..ctor()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Security.Cryptography.CryptoConfig.CreateFromName(String name, Object[] args)
at System.Security.Cryptography.MD5.Create(String algName)
at System.Security.Cryptography.MD5.Create()
at Microsoft.ApplicationExperience.Common.DataManipulation.HashGenHelper..ctor(ObjectContext existingContext)
at Microsoft.ApplicationExperience.Common.DataManipulation.XmlDataProcessor..ctor(String inputConnection, EventLog actLog, XmlSchemaCollection schemaCollection, ObjectContext objectContext)
at Microsoft.ApplicationExperience.Common.DataManipulation.XmlDataService.InsertXmlDocument(String xmlFile, Boolean checkVersion)
at Microsoft.ApplicationExperience.Common.DataManipulation.XmlDataService.InsertXmlDocument(String xmlFile)
[queuer.exe] [Queuer] Cannot insert log file \SPNLAPP90125ACT_LogFilesSTATUS-WPNLL9000812{8C869987-5D71-4DD2-9893-7405B274E13C}.xml to the database! Details:
The Act Log Processing Service is running with the logon as a service account. This account is local admin on the ACT-server. Also this account has 'db-owner', db-datareader' and 'db-datawriter' rights on the ACT-database.
Other installed software: - Dot Net 1.1 - Dot Net 2.0 MS SQL Server 2005 Details: MS SQL Server 2005: Microsoft SQL Server Management Studio 9.00.3042.00 Microsoft Analysis Services Client Tools 2005.090.3042.00 Microsoft Data Access Components (MDAC) 2000.086.3959.00 (srv03_sp2_rtm.070216-1710) Microsoft MSXML 2.6 3.0 4.0 6.0 Microsoft Internet Explorer 7.0.5730.13 Microsoft .NET Framework 2.0.50727.832 Operating System 5.2.3790
---> My question is: what do I have to do to get this running?
How do i find who has changed the settings in the database.
basically when i looked at this morning i saw a database which is set in single user mode.when i tried to look at the errorlog i found nothing except the spid's of different people and as far as i know i think that spid's are assigned randomly depending on there availability.
Now this has happened twice recently and now i want to find out who the culprit is his username, machine name but not spid.
Can i do it if how can i.
how do i track each and every users info what he is doin and at what time.
do i need to set up or configure any options.
sometimes i also see that there is a dbcc command run by as it says winnt/system what does this mean how is this running.
I had an idea to put all my web design settings, css text and web content in the database..This way it would be easy for others to edit remotely. Do you guys think this would have an impact on performance if I do this?
Hi,I would like to know how to get a list of configuration settings for adatabase.Is there a table that I can select this info from?Or a file (perhaps an ini file?) of some kind?Things like timeout settings, rollback space, table space, etc.Thanks
We have a reasonably large (several TB) database that was recently migrated from 2008 to a new box running 2014. Before giving it back to the users we forgot to change the compatibility level of the DB to bring it up to date with it's new environment.
We want to do some testing with backup compression so want to change the compatibility level, but we are unsure whether making the change on such a large database would cause slowness or downtime for our users.
Does the process of changing the compatibility level simply allow options that are not available in the older version or does it make structural changes to the database that would cause the users to notice slowness or downtime?
We are planning to upgrage our SS 2000 databases(couple of hundreds) to SS 2005.
To minimise the potential work arounds, it is agreed to have complex databases, continue running on compatibility mode 80. What are the potential impact of having database on mode 80(apart from not being able to use new feature)on SS2005?
Fruther how we can we import SS 2000 DTSs to SS 2005 SSIS in an cluster environment?
I noticed that a database I am working with has a compatibility level set to SQL Server 2000. The instance is actually SQL Server 2005. I'm guessing that it was created like this because the database originally existed on 2000 and was created via backup/restore.
I'm trying to figure out if this needs to be changed and if so how to go about making the change in a non-disruptive manner. What features of 2005 are turned off as a reult of having a 2000 compatibility level?
In SQL Visual Basic 2005 Express Edition, I was wondering if it is possible in the Add Connection dialog under Advanced settings to change the Data Source SQL server from the local .sqlexpress to a network SQL Express server. It seems as though the option is locked. I am in a doman, and using Windows Authentication. I also have TCP/IP enabled on the SQL server, and no firewall restrictions for the SQL service. Also, my account permissions should also allow me to do this.
I'm using Visual Studio 2005 (8.0.50727.42) and going into the menu option Website > ASP.Net Configuration, access the security tab and all I get is an error message stating that there is a problem with the selected data store "Unable to Connect to the SQL Server Database"
I have SQL Server 2005 (Express Edition). I have created a database "NetDev" with the right connection, etc.
I can use the SQL server fine for my Windows applications, but somehow this ASp.Net Configuration tool is not making any sense.
I also used the aspnet_regsql command from framework 2.0 to create a DataBase to no avail.
Does anyone out there knows if there is a bug with this tool???
Hello all,i'm moving all my development to the new 2005/Fw2 environment.Now, i have an MSSQL 2005 server on the development server. To restore an existing database, i've created a new database with MSSQL 2000 compatibility level, and i've restored the backup over it. Everything seems ok, but when i try to create a diagram, i get the following error message:"Database diagram support objects cannot be installed because the database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects."I've checked the properties and there seems to be the right owner (sa). If i create a new database with 2005 compatibility level, everithing works fine.Where is the problem?Also, a side question: by setting compatibility level to 2000, is it correct that the database can be deployed to a 2000 Server environment with no problems?Thanks in advance for any advice. -LV
Script to Reverse Engineer / Script out your EXISTING database mail settings?
I set up a profile to use gMail, and it seems logical for me to export out the settings to a script, then run the script on my laptop, other servers, etc.
There's no built in option, so I figured i'd ping the forum before i do it myself.
There are example scripts where you fill in the blanks, examples how to set up dbmail, but i did not find anything that scripts out existing settings.
I am working on a project that contains several databases in SQL and many settings. The problem I am encountering is that I want to be able to update the program for all my customers. That is no problem.
The problem I am meeting is where, when the program is updated, all the settings and all the information in the databases reverts to the default values, or the values that were compiled with the new update.
I want to be able to update their program without deleting all the settings they have.
I installed SQL Server 2005 Developer Edition. When i create a new database (using the "New Database" dialog) i cannot set the new database's compatibility level to "SQL Server 2005(90)" because this option is not in the "dropdown list". the only items shown are: "SQL Server 7.0(70)" and "SQL Server 2000(80)". I set the owner to "sa". How do i get "SQL Server 2005(90)" in my "compatibility level" drop down list? Is this an installation option that i missed? Thanks in advance for any assistance!
Hi, pls can anyone help me out with this? I'm installing SQL2005 SP2 over an Itanium machine with W2003 SP2 but it keeps on failing on those features. Client components got installed with no problems. I've installed SQL2005-SP2 over x86 and x64 (not Itanium) machines many times before successfuly. I've been investigating this issue for several days with no luck so I'm a bit clueless at the moment. As I'm using Administrator account I think it is not file permission related. Summary says "Unable to install Windows Installer MSP file".
4 app servers with regional date and time settings of locale A.
1 database server with locale settings B.
What is happening is that timestamps are being generated on the app servers, these are then in a sql command which fails on the database server since the timestamp format is invalid.
It was suggested that we change the regional locale settings of the database server, but will this not have serious implications , for example every current timestamp format in the datbase will become invalid?
In a nutshell is it safe to change a database servers regional date time locale settings ? Or are there serious implications?
it is taken from SQL2K5 SP2 readme.txt. Anyone have idea what to do to implement this ? Our sp2 is failing. we suspect the above problem and researching it.we are running on default instance of SQL2K5 on win2003 ent sp2
"When you apply SP2, Setup upgrades system databases. If you have implemented restrictions on the ALTER DATABASE syntax, this upgrade may fail. Restrictions to ALTER DATABASE may include the following:
Explicitly denying the ALTER DATABASE statement.
A data definition language (DDL) trigger on ALTER DATABASE that rolls back the transaction containing the ALTER DATABASE statement.
If you have restrictions on ALTER DATABASE, and Setup fails to upgrade system databases to SP2, you must disable these restrictions and then re-run Setup."
I am a newbie developing a web site. My local machine has sql 2005 standard edition on it. The host that I am trying to use only has sql 2005 64 bit version.
would I be able to do the use the same database between the two ( i.e. once my site is running at host, would I be able to download the database on my local machine, make changes to my site and then upload again on the hose without any glitches?). In addition, how about sql express doing the same with sql 2005 64 bit.
Hi,I am having a problem in moving data from execl to sql2k. The data looks like 16.70% , 12.5% etc and when I move it it changes to 0.16700000000000001 etc.. any idea what datatype I should use so that it don't changes it's mode... Thanks in advance
Hi, I am new to sql 2k. Iam been asked to install sql2k on a new box . What all things I should keep in mind when I go for the installation of sql2k? Any / All suggestions appreciated. Jai
Hi, I have to move 2 fields from sql 7 to sql 2k . the field is text. feild a is text field b is text. I have to add field a and field b and move it to another field (say field c which is also text )in sql 2k. How to go about it? TIA. Jsi