SQL Server 2008 :: Database Level Selection Settings?
Apr 23, 2015
I have following table structure
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[FAS_LEDGER](
[TID] [INT] IDENTITY(1,1) NOT NULL,
[TDATE] [DATETIME] NOT NULL,
[code].....
in this table I have 1571182 rows
the problem is someone did some changes in this LEDGER table
I can insert new rows in this table but when I try to fetch latest rows on the basis of following query then I did not get the latest row.
means
following query gives all the rows of this table
SELECT * FROM dbo.FAS_LEDGER ORDER BY TID DESC
and when I try to filter Master_code = '02-07-01-008-0001' and apply oder by TDATE I do not get latest rows
SELECT * FROM dbo.FAS_LEDGER WHERE MASTER_CODE = '02-07-01-008-0001'
ORDER BY TDATE DESC
View 4 Replies
ADVERTISEMENT
Sep 8, 2010
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.
View 9 Replies
View Related
Aug 4, 2015
I found this script online..
SELECT prin.[name] [User], sec.state_desc + ' ' + sec.permission_name [Permission]
FROM [sys].[database_permissions] sec
JOIN [sys].[database_principals] prin
ON sec.[grantee_principal_id] = prin.[principal_id]
WHERE sec.class = 0
ORDER BY [User], [Permission];
but the results are this: 2 columns - User and Permission
User Permission
User1 GRANT CONNECT
User2 GRANT CONNECT
IS there a way in SQL Server (2005/2008/2012) to run a script against a Database that will show all users that have permissions to that Database and the type of permissions?
View 7 Replies
View Related
Jul 2, 2015
Referencing an article regarding MAXDOP and cost threshold for parallelism from Brent Ozar's website: [URL] .....
We have a 2 physical CPUs that are 4 cores each with hyper threading enabled. When looking through the task manager, under the performance tab, I see 16 CPU threads.We have set the MAXDOP value is set at 4.
Reading further, cost threshold for parallelism setting is recommended at 50 to start with.
Our setting is at the default 5.
View 2 Replies
View Related
May 28, 2008
I would occasionally get the error below when trying to access a database in my project/App_Data folder using Visual Web Developer Express 2008.
I would re-boot and the problem would go away.
I now have the problem all the time and am unable to access my database file in the App_Data folder nor ASPNETDB.mdf.
I am not trying to access a remote database. I have not knowingly changed any settings.
Has anyone seen this problem?
Can anyone help?
Thanks,
Charles Smith
ERROR MESSAGE:
€¦ under the default settings SQL Server doesn't allow remote connections. (provider: SQL Network Interfaces, error 26 €“ Error locating Server/Instance specified)
View 1 Replies
View Related
Jun 23, 2014
I am currently designing a SSIS package that will migrate data from Syabse to Sql server. If these packages are to be deployed to file system (as this is one time run for migrating data) or to SSIS catalog or to Sql server.
Also, I have not changed the default protection level value in packages during design time and would like to know if I have to change it while handling the deployment using DTutil (yes, i need to deploy & execute using command line utilities).
Please note that I do not have access to PROD, UAT environments and deployment team will use my BAT file that is expected to deploy and execute the packages.
View 3 Replies
View Related
Aug 20, 2015
I am trying to parse out
<Discharge_x0020_Time>
<time>
<Hour>11</Hour>
<Minute>:00</Minute>
<AM_x002F_PM>AM</AM_x002F_PM>
</time>
</Discharge_x0020_Time>
Into Hours, minutes, and ampm
I use
Select...
,DISCHARGEHOUR.value('(./Discharge_x0020_Time/time/Hour)[1]', 'varchar(10)') AS [hour]
,DISCHARGEMINUTES.value('(./Discharge_x0020_Time/time/Hour:minute)[1]', 'varchar(10)') AS [Minutes]
,DISCHARGEAMPM.value('(./Discharge_x0020_Time/time/Hour/minute/AM_x002F_PM)[1]', 'varchar(10)') AS [ampm]
FROM ...
CROSS APPLY data.nodes('/Data') a(DISCHARGEHOUR)
CROSS APPLY data.nodes('/Data') b(DISCHARGEMINUTES)
CROSS APPLY data.nodes('/Data') b(DISCHARGEAMPM)
But minutes AND AMPM come up as NULL I assume I am setting up something wrong with the level on minutes AND AMPM. Also, can I disregard the ":" in the minutes.
View 1 Replies
View Related
Apr 30, 2015
We are using sql 2008r2 standard edition.One of our Production database is using default isolation Readcommitted.The transactions also using read committed. But we want change isolation level to read comitted snapshot isolation and test it to avoid deadlocks.
Is it possible to set in the transaction level for some queries or do we need to change entire database isolation level by using alter database "ALTER DATABASE AdventureWorks2008R2 SET READ_COMMITTED_SNAPSHOT ON"
View 8 Replies
View Related
Jun 15, 2007
Hi There
We currently have the following scenario:
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?
Thanx
View 1 Replies
View Related
Jan 16, 2008
I want to perform column level and database level encryption/decryption....
Does any body have that code written in C# or VB.NET for AES-128, AES-192, AES-256 algorithms...
I have got code for single string... but i want to encrypt/decrypt columns and sometimes the whole database...
Can anybody help me out...
If you have Store procedure in SQL for the same then also it ll do...
Thanks in advance
View 1 Replies
View Related
Dec 7, 2007
Will the 2008 edition of SQL Server Express contain the new row level compression features? Is it available in the current CTP for us to try out?
Thanks
View 1 Replies
View Related
Aug 31, 2007
The problem that I am having is that with Visual Web Developer I am creating a webpage and having it directly put online, so for example when I start a new ASP.NET page, I select the location to be HTTP, with the location http://MYWEBSERVER/Website and for the language and Visual BasicI notice a couple of things, first that there is no longer a a link under the Main toolbar "Website" selection called the ASP.NET configuration. So how can I configure what I want to have users be able to do? It seems that this choice is only available if I am building the ASP.NET page on my "localhost". So that is the first problem. So I am able to get the pages to work, atleast the things such as the textboxes to show up etc, (Even things as advanced as the "Login" box). How ever when I try to get someone to try to login I am taken to a page that has an server error. The error is:
"The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file. "
The Stack Trace Errors are at the bottom. I think this is happening because the automatically generated databases are not getting built online as they are on my computer. On my computer I have MSSQL express. So either the databases are not getting built for some reason, (and I think that is the case as I don't see any in the folder). So I think that somehow I have to create a database on my server, and then somehow configure the ASP.NET file, perhaps in the Web.Config file to look for that new database. Is this the correct methodology? Is there some simpler way that I can just somehow upload things as they are and have them work correctly on my server? The error says that either the Server did not find the database or that the trust level was insufficient. I don't think that is it as I just looked again and I don't see any .MDF files. So how would I go about getting this to work right? Is there a way to do this with MySQL also? So that I don't have to use MSSQL? My server only allows 1 DataBase for that.
Thanks and I hope my question makes sense. It is basically how can I get it to be able to create and check users etc. online?
Brian
[ProviderException: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.] System.Web.DataAccess.SqlConnectionHelper.EnsureSqlExpressDBFile(String connectionString) +2555237 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +87 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160 System.Web.UI.WebControls.Login.AttemptLogin() +105 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
View 1 Replies
View Related
Nov 2, 2006
We want to use sql 2005 failover clustering feature, so that upgrade sql 2000 is necessary. But some of the stored procedures built in 2000 are not working directly in 2005, set the compatibility level to 80 could make them work. In this case, can somebody here tell me if down grade the database level will affect failover clustering running properly? e.g. will data still be synchronized properly? Thanks in advance.
View 3 Replies
View Related
Jul 13, 2007
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!
-chris
View 12 Replies
View Related
Aug 25, 2015
<g class="gr_ gr_78 gr-alert gr_gramm Punctuation replaceWithoutSep" data-gr-id="78" id="78">Friends,</g>
<g class="gr_ gr_78 gr-alert gr_gramm Punctuation replaceWithoutSep" data-gr-id="78" id="78">I</g>
i am migrating one database from SQL Server 2008 where I have around 20 databases to SQLServer 2012. To migrate the login I was thinking about to use SP_Help <g class="gr_ gr_114 gr-alert gr_spell ContextualSpelling ins-del multiReplace" data-gr-id="114" id="114">revlogin</g>Â store procedure but now what I believe is this SP scripts out whole server level login and I don't need all the logins in the server except related to the database that I am migrating to.
<g class="gr_ gr_418 gr-alert gr_gramm Grammar multiReplace" data-gr-id="418" id="418">please</g>
best way to migrate logins only related to the specific database to the new server.Â
View 4 Replies
View Related
Apr 14, 2008
From the sql server management studio i cannot see database properties
logical file name of mdf, location of the mdf
logical file name of ldf, location of the ldf
what setup should i change to see the properties.
View 5 Replies
View Related
Mar 8, 2015
I had to to relocate the database log file and I issued an Alter database command but by mistake I put a space in the file name as below. The space is at the beginning file name. Now I am unable get the database loaded to SQL Server. The database has 2 replications configured, so deleting and re-attaching the database means the replication needs to be re-configured. Is there an alternative way to issue a command to update the database FILENAME ? Not sure if this can be edited in master database (sys files).
ALTER DATABASE [User_DB]
MODIFY FILE (NAME = User_DB_log, FILENAME = 'I:SQLLogs User_DB_log.ldf')
GO
View 1 Replies
View Related
Feb 5, 2010
I have created a new SSRS Server and done all of the basic security setup for the site but I am having trouble with client machine access...At first I had an issue with being able to access report manager from any client and ended up having to shut off windows authentication on the client IE settings to get it to work. Now I am trying to run Report Builder from a client machine and it will not download. The client machine is on the same domain and my user id is set as an administrator within SSRS and as a local admin on the 2008 server.Â
I had the thought that without windows auth in the browser maybe it can't permit me access to the application but if I turn it on I can't get to it to download it. I have set Full Control rights to the folder as well. Most of the info out there is for 2005 and that uses IIS to host the pages where as 2008 does not. Here is the details of the error:
PLATFORM VERSION INFO Windows    : 6.1.7600.0 (Win32NT) Common Language Runtime  : 2.0.50727.4927 System.Deployment.dll   : 2.0.50727.4927 (NetFXspW7.050727-4900) mscorwks.dll    : 2.0.50727.4927 (NetFXspW7.050727-4900) dfdll.dll    : 2.0.50727.4927 (NetFXspW7.050727-4900) dfshim.dll    : 2.0.50727.4927 (NetFXspW7.050727-4900)
[URL] ....
View 2 Replies
View Related
Apr 26, 2007
I have over 50 rows in this table and my bizIDNum is always getting set to 4. Please take a look at the code and tell me whats wrong. If I do the select statement in the database the return number is correct. here is the code
// db connection
SqlConnection sqlConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["work4tipsConnectionString"].ConnectionString);
sqlConnection.Open();
string sqlSelect = "SELECT MAX(bizID) FROM business";
SqlCommand sqlCommand = new SqlCommand(sqlSelect, sqlConnection);
//sqlCommand.Parameters.Add("@Username", SqlDbType.VarChar).Value = username;
string bizIdNum = (string)sqlCommand.ExecuteScalar();
sqlConnection.Close();
sqlConnection.Dispose();
View 2 Replies
View Related
Jun 15, 2007
I'm working on a script to convert data from one software packageto another. Greatly simplified, it looks something likecreate procedure import_widget asbegininsert into our_widget (foo, bar)select baz, quux from their_db.dbo.their_widgetendgoThe problem is that the name of the source database varies fromone system to another, so I want to pass the database name as aparameter. I think I could do the following, but is there abetter way to go about it?create procedure import_widget (@db_name sysname) asbeginexec 'create view their_widget as select * from '+ @db_name + '.dbo.their_widget'insert into our_widget (foo, bar)select baz, quux from their_widgetdrop view their_widgetendgo
View 3 Replies
View Related
Mar 8, 2001
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.
Thanks in advance for ur great help.
Its very urgent because its a production machine.
View 4 Replies
View Related
Jul 17, 2002
Hi,
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
Select @vSubject = 'Report as of :' + convert(varchar,getdate()-1,1)
Select @vMessage = 'Automatic Report'
EXEC xp_sendmail @recipients = 'Bob',
@query = "FetchEmailData",
@attachments = 'DailyReport.wri',
@subject = @vSubject,
@message = @vMessage,
@attach_results = 'TRUE',@width = 250
End
The DailyReport.wri file appears corrupt when opened with notepad. The same happens to .xls reports too.
Are there settings I need to change or is this a SQL2K issue ?. Any suggestions/help would be appreciated. SQL Server 2000 runs on Windows 2000 Adv.
Thanks.
View 1 Replies
View Related
Sep 20, 2006
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?
View 7 Replies
View Related
Jul 20, 2005
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
View 2 Replies
View Related
Jan 22, 2008
I am using this function for my datasource; "="data source=" & Parameters!Server.Value & ";initial catalog=" & Parameters!Database.Value"
When I set my database parameter to be a multivalued, it does not work, it will only let me select one db at a time. I would like to grab a table named pm00200 from many databases.
Does anybody have a solution for this?
Thanks!!
Ryan
View 1 Replies
View Related
Aug 17, 2007
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.
John55616
View 3 Replies
View Related
Jun 8, 2006
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???
View 1 Replies
View Related
Apr 27, 2007
Hello all...
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.
Thanks,
Andreas Renberg
View 1 Replies
View Related
Jan 4, 2013
if you can restore a database to Server B using Server A as the service. Meaning we would issue the command on Server A but somehow point to Server B as where we want the restore to happen.
The backup file would be in a location independent of both servers.
View 4 Replies
View Related
Jun 20, 2008
1) I can't get the 'copy database' function to work from SQL Server 2008 to SQL Server 2005. I connect ok. Everything goes to the last step and then it fails.2) I cant get a SQL server 2008 backup to restore on SQL SEerver 2005 either.
The only way I know that works is to script the creation of all tables then export and import. This does work.
How can I get the 'entire' database, structure and data, from 2008 to 2005?
ThanksSQL newbie.
View 2 Replies
View Related
Jan 22, 2015
We have setup a report server where a db's tables are refreshed from a backup daily.
All SP and views are created in a different DB but look at the daily refresh tables
Can I setup the DB that creates the view to point at the DB with the tables so when I say new view it looks at the tables in that DB ...
View 4 Replies
View Related
Apr 9, 2015
I was having issue with one of my databases in SQL EXPRESS. It is offline this morning …it said “Database 'MyDB' cannot be opened due to inaccessible files or insufficient memory or disk space. When I checked the error log ..it only said “FCB::Open failed: Could not open file D:DatabasesMyDB_Data.mdf for file number 1. OS error: 32(failed to retrieve text for this error. Reason: 15100).
I did alter database offline and and online ..it works for me( I can access the database again but I need to find the cause of this issue )I checked the max memory setting is still by default .. not limited for SQL ..it could be the cause ?
View 9 Replies
View Related
Jun 29, 2007
Hi, all here,
Just heard about the coming release of SQL Server 2008. Anyone here got some ideas on what are significant new features in SQL Server 2008 Database Engine compared to SQL Server 2005 Database Engine? Would be very interesting to know that.
Thanks.
With best regards,
Yours sincerely,
View 1 Replies
View Related